{"id":110026,"date":"2020-06-01T10:42:03","date_gmt":"2020-06-01T02:42:03","guid":{"rendered":"http:\/\/4563.org\/?p=110026"},"modified":"2020-06-01T10:42:03","modified_gmt":"2020-06-01T02:42:03","slug":"es-%e9%9b%86%e7%be%a4%e4%bc%98%e5%8c%96%ef%bc%8c%e6%b1%82%e5%a4%a7%e4%bd%ac%e6%8c%87%e7%82%b9%e4%b8%80%e4%b8%8b","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=110026","title":{"rendered":"ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SKYNE <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h4>0. \u80cc\u666f<\/h4>\n<p>a. \u521a\u5165\u804c\u51e0\u5929\uff0c\u4e3b\u8981\u8d1f\u8d23\u7ef4\u62a4\u516c\u53f8\u7684 ES \u96c6\u7fa4\uff0c\u5934\u5927\u3002\u3002\u3002<\/p>\n<p>b. \u7b80\u5355\u6574\u7406\u4e86\u96c6\u7fa4\u7684\u76f8\u5173\u60c5\u51b5\uff0c\u89c1\u4e0b\u6587\uff0c\u70e6\u8bf7\u6709\u76f8\u5173\u7ecf\u9a8c\u7684\u5927\u4f6c\uff0c\u5e2e\u5fd9\u770b\u770b\u4f18\u5316\u65b9\u6cd5\u5408\u7406\u5417\uff0c\u6709\u6ca1\u6709\u66f4\u597d\u7684\u5efa\u8bae\uff0c\u975e\u5e38\u611f\u8c22\u3002<\/p>\n<p>c. \u81ea\u5df1\u611f\u89c9\u96c6\u7fa4\u8d44\u6e90\u5df2\u7ecf\u975e\u5e38\u5145\u8db3\u4e86\uff0c\u4f46\u4e0d\u5408\u7406\u7684\u8282\u70b9\u914d\u7f6e\u548c\u4e0d\u5b8c\u5584\u7684\u7d22\u5f15\u7ba1\u7406\u7b56\u7565 [\u4e25\u91cd] \u5f71\u54cd\u4e86\u6574\u4f53\u7684\u6027\u80fd<\/p>\n<p>d. \u81ea\u5df1\u5bf9 ES \u7ef4\u62a4\u4f18\u5316\u7ecf\u9a8c\u4e0d\u591a\uff0c\u6b22\u8fce\u5927\u4f6c\u6307\u70b9\u4e00\u4e8c\u3002<\/p>\n<h4>1. \u96c6\u7fa4\u6982\u51b5<\/h4>\n<p>a. \u7248\u672c\u4fe1\u606f\uff1aCentOS7, ES 7.3.0, \u5355\u673a\u591a\u5b9e\u4f8b\u914d\u7f6e<\/p>\n<p>b. \u6570\u636e\u65b9\u9762\uff1a20+ indices\uff0c650+ shards\uff0c80 \u4ebf+ doc<\/p>\n<p>c. \u8282\u70b9\u65b9\u9762\uff1a1 master\uff0c36 data + ingest + coordinating , 1 ingest + coordinating<\/p>\n<p>e. \u8d44\u6e90\u65b9\u9762\uff1a\u5177\u4f53\u5982\u4e0b\u56fe\uff0c\u6bcf\u4e2a\u6570\u636e\u8282\u70b9\u6302\u8f7d\u4e86\u4e24\u5757 1.5T \u7684\u673a\u68b0\u78c1\u76d8\uff0c\u5e76\u90fd\u914d\u5728\u4e86 path.data \u4e0b\u3002 <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200602_5ed6493320989.png\" alt=\"ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b\" \/><\/p>\n<h4>2. \u7d22\u5f15\u60c5\u51b5<\/h4>\n<p>a. \u6bcf\u4e2a\u7d22\u5f15 32 \u4e2a\u5206\u7247\uff0c1 \u4e2a\u526f\u672c\u5206\u7247<\/p>\n<p>b. \u6bcf\u6708\u751f\u6210\u4e00\u4e2a\u65b0\u7d22\u5f15\uff0c\u6309\u6708\u6eda\u52a8<\/p>\n<p>c. \u5355\u4e2a\u7d22\u5f15\u6709 500G ~ 800G \u6570\u636e\u91cf<\/p>\n<p>d. \u7d22\u5f15\u4e2d\u4f7f\u7528\u4e86 [\u7236\u5b50\u6587\u6863]<\/p>\n<p>e. \u5355\u4e2a\u5206\u7247\u4e2d\u6709\u4e9b\u8d85\u8fc7\u4e86 26G<\/p>\n<p>f. \u4ece 2019.11 ~ 2020.5 \u6570\u636e\u589e\u957f\u6765\u770b\uff0c\u6bcf\u5929\u5927\u6982\u589e\u957f 20G \u5de6\u53f3<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200602_5ed6493988727.png\" alt=\"ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b\" \/><\/p>\n<h4>3.\u7d22\u5f15\u7ba1\u7406<\/h4>\n<p>a. \u6ca1\u6709\u5212\u5206\u8282\u70b9\u5c5e\u6027\uff0c\u4e5f\u5c31\u6ca1\u6709\u505a\u51b7\u70ed\u6570\u636e\u5206\u79bb<\/p>\n<p>b. \u7d22\u5f15\u751f\u547d\u5468\u671f\u7ba1\u7406\u4e0d\u5b8c\u5584\uff0c\u4ec5\u4ec5\u5bf9\u8d85\u8fc7 30 \u5929\u7684\u7d22\u5f15 forcemerge \u548c\u8d85\u8fc7 90 \u5929\u7684\u526f\u672c\u5206\u7247\u7f6e\u4e3a 0\uff0cfreeze \u7d22\u5f15<\/p>\n<h4>4.\u5f53\u524d\u95ee\u9898<\/h4>\n<p>a. \u6570\u636e\u8282\u70b9\u6709\u65f6\u4f1a\u79bb\u7ebf \uff08\u731c\u6d4b\u662f\u4e0d\u5408\u7406\u7684\u67e5\u8be2\u8017\u5c3d\u4e86\u5806\u7a7a\u95f4\uff09<\/p>\n<p>b. \u5199\u5165\u6570\u636e\u6162\uff0crabbitmq \u961f\u5217\u6570\u636e\u5806\u79ef \uff08\u8fd8\u6ca1\u6574\u660e\u767d\u5177\u4f53\u7684\u60c5\u51b5\uff09<\/p>\n<p>c. \u96c6\u7fa4\u6062\u590d\u8017\u65f6\u957f (\u5e94\u8be5\u662f\u7d22\u5f15\u6ca1\u6709\u5212\u5206\u4f18\u5148\u7ea7)<\/p>\n<p>d. \u4e0b\u56fe\u662f kibana 24h \u7684\u6570\u636e\uff0c\u7d22\u5f15\u5305\u542b\u4e86 kibana \u7684\u4e00\u4e9b\u7d22\u5f15\u548c\u5206\u7247\uff0c\u4e0a\u8ff0\u53d9\u8ff0\u4e2d\u53bb\u6389\u4e86\u8be5\u90e8\u5206\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200602_5ed6494109eab.png\" alt=\"ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b\" \/><\/p>\n<h4>5.\u4f18\u5316\u601d\u8def<\/h4>\n<p>a. \u6839\u636e\u4e3b\u673a\u8d44\u6e90\u60c5\u51b5\u5212\u5206\u5408\u7406\u7684\u8282\u70b9\u89d2\u8272\uff0c\u8282\u70b9\u5c5e\u6027\uff0c\u63d0\u9ad8\u96c6\u7fa4\u7684\u8d44\u6e90\u5229\u7528\u6027\uff0c\u53ef\u7528\u6027\uff0c\u5065\u58ee\u6027\u3002<\/p>\n<p>b. \u51b7\u70ed\u6570\u636e\u5206\u79bb\uff0chot \u8282\u70b9\u9ad8\u914d\u7f6e\u4f4e\u5b58\u50a8\uff0cwarm \u8282\u70b9\u4f4e\u914d\u7f6e\u5927\u5b58\u50a8\u3002<\/p>\n<p>c. \u70ed\u6570\u636e\u8282\u70b9\u5355\u4e3b\u673a\u5355\u5b9e\u4f8b\uff0c\u51b7\u6570\u636e\u8282\u70b9\u5355\u4e3b\u673a\u591a\u5b9e\u4f8b\u3002<\/p>\n<p>d. \u7d22\u5f15\u751f\u547d\u5468\u671f\u7684\u7ba1\u7406\uff0c\u5305\u62ec\u51cf\u5c11\u4e3b\u5206\u7247\u6570\uff0c\u5408\u9002\u7684\u6a21\u677f\uff0c\u7d22\u5f15 Rollover\uff0c\u7d22\u5f15 Allocation \u7b49\u3002<\/p>\n<p>e. \u5065\u5168 ES \u4e3b\u673a\u8d44\u6e90\u76d1\u63a7\u544a\u8b66\uff0cJVM \u91cd\u70b9\u6307\u6807\u76d1\u63a7\u544a\u8b66\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1834758\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liamyoung <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b\u770b\u54ea\u79cd gc \u65b9\u6cd5\u66f4\u9002\u7528\u3001\u7981\u6b62\u4f7f\u7528 swap \u7a7a\u95f4\u3001es \u7684\u7248\u672c\u5347\u7ea7\u9ad8\u4e00\u70b9(\u4f4e\u7248\u672c\u7684 es \u6d88\u8017\u5185\u5b58\u66f4\u591a)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834759\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hasdream <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             es \u96c6\u7fa4 \u70ed\u6570\u636e SSD \u51b7\u6570\u636e \u673a\u68b0\u786c\u76d8 <br \/>\u5199\u5165\u6162 \u6bcf\u53f0\u51e0\u4e2a \u591a\u4e2a data.path \u6bcf\u4e2a\u5bf9\u5e94\u4e00\u7ec4 RAID \u76d8 \u89c2\u5bdf\u7cfb\u7edf\u7684 IOWAIT \u4fe1\u606f (\u5206\u7247 \u5c3d\u91cf\u5e73\u8861\u6bcf\u53f0\u673a\u5668)<\/p>\n<p>\u76d1\u63a7 \u63a8\u8350 promethus (node_exporter elasticsearch_exporter ) \u89c2\u5bdf\u4e3b\u673a\u5199\u5165 IOPS \u548c IOWAIT \u53ca ES \u96c6\u7fa4 GC \u7b49                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834760\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rrfeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0a\u9762\u65b9\u6848\u5df2\u7ecf\u4e0d\u9519\u4e86\uff0c\u518d\u63d0\u4e00\u70b9\u5c31\u662f index mapping \u662f\u5426\u5408\u7406\u8bbe\u7f6e\u975e\u5e38\u5f71\u54cd\u6027\u80fd\u3002<\/p>\n<p>\u5173\u95ed\u8fc7\u671f\u7d22\u5f15\uff0c\u51b7\u70ed\u5206\u79bb\uff0c\u7d22\u5f15\u9884\u5efa\uff0c\u63a7\u5236\u5206\u7247\u5927\u5c0f\u3002\u5199\u5165\u7684\u8bdd\u63d0\u9ad8\u5237\u65b0\u95f4\u9694\uff0c\u5199\u5165\u65f6\u5355\u526f\u672c\uff0c\u5199\u5b8c\u518d\u589e\u52a0 replica \uff08\u5982\u679c\u6570\u636e\u5b89\u5168\u8981\u6c42\u6ca1\u90a3\u4e48\u9ad8\u7684\u8bdd\uff09                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834761\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : SKYNE <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liamyoung \u597d\u7684\uff0cswap \u90fd\u7981\u7528\u4e86\uff0c\u5fd8\u4e86\u8bf4\u4e86\u3002\u5347\u7ea7\u65b0\u7248\u672c\u6ca1\u505a\u8fc7\u540e\u9762\u7814\u7a76\u7814\u7a76\u3002\u591a\u8c22\u60a8\u7684\u5efa\u8bae\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834762\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : SKYNE <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hasdream \u597d\u7684\uff0c\u591a\u8c22\u591a\u8c22\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834763\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : SKYNE <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rrfeng \u7d22\u5f15 mapping \u5408\u7406\u6027\u786e\u5b9e\u9700\u8981\u591a\u82b1\u65f6\u95f4\u7814\u7a76\u4e0b\uff0c\u636e\u540c\u4e8b\u8bf4\u5bf9\u6570\u636e\u5b9e\u65f6\u6027\u8981\u6c42\u4e0d\u9ad8\uff0crefresh_interval \u5df2\u7ecf\u8c03\u5230 30s \u4e86\u3002\u975e\u5e38\u611f\u8c22\u60a8\u7684\u5efa\u8bae\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834764\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hackerwin7 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9700\u8981\u660e\u786e\u4e0b data \u8282\u70b9\u79bb\u7ebf\u7684\u539f\u56e0\u3002\u5982\u679c\u662f\u810f\u67e5\u8be2\u7684\u8bdd\uff0c\u96c6\u7fa4\u4f18\u5316\u7684\u6548\u679c\u6050\u6015\u5e76\u4e0d\u660e\u663e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1834765\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : SKYNE <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hackerwin7 \u8bf7\u95ee\uff0c\u810f\u67e5\u8be2\u5177\u4f53\u6307\u7684\u662f\u4ec0\u4e48\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>ES \u96c6\u7fa4\u4f18\u5316\uff0c\u6c42\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b \u8cc7&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/110026"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110026"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/110026\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110026"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}