{"id":34,"date":"2018-08-17T00:00:41","date_gmt":"2018-08-16T16:00:41","guid":{"rendered":"http:\/\/172.81.211.114\/?p=34"},"modified":"2018-08-17T00:00:41","modified_gmt":"2018-08-16T16:00:41","slug":"%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1%e6%88%91%e5%81%9a%e7%9a%84influxdb%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.yinyubo.com\/?p=34","title":{"rendered":"\u8bb0\u5f55\u4e00\u6b21\u6211\u505a\u7684influxDB\u6027\u80fd\u6d4b\u8bd5"},"content":{"rendered":"<p>InfluxDB\u6027\u80fd\u6d4b\u8bd5\u62a5\u544a<br \/>\n\u88ab\u6d4b\u73af\u5883\uff1a<br \/>\n\u817e\u8baf\u4e91<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"144\">CPU<\/td>\n<td width=\"144\">\u5185\u5b58<\/td>\n<td width=\"144\">\u5e26\u5bbd<\/td>\n<td width=\"144\">\u7248\u672c\u53f7<\/td>\n<\/tr>\n<tr>\n<td width=\"144\">4\u6838<\/td>\n<td width=\"144\">16G<\/td>\n<td width=\"144\">1Gbit\/s<\/td>\n<td width=\"144\">Ubuntu 4.8.4-2ubuntu1~14.04.3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<br \/>\n\u5730\u5740\uff1a<br \/>\n&nbsp;<br \/>\n\u88ab\u6d4b\u7a0b\u5e8f\uff1a<br \/>\nDocker\u4e0b\u5b89\u88c5\u7684influxDB \u7aef\u53e38086<br \/>\n&nbsp;<br \/>\n\u538b\u6d4b\u73af\u5883\uff1a<br \/>\n\u817e\u8baf\u4e91<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"144\">CPU<\/td>\n<td width=\"144\">\u5185\u5b58<\/td>\n<td width=\"144\">\u5e26\u5bbd<\/td>\n<td width=\"144\">\u7248\u672c\u53f7<\/td>\n<\/tr>\n<tr>\n<td width=\"144\">2\u6838<\/td>\n<td width=\"144\">8G<\/td>\n<td width=\"144\">1Gbit\/s<\/td>\n<td width=\"144\">Ubuntu 4.8.4-2ubuntu1~14.04.3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<br \/>\n\u5730\u5740\uff1a<br \/>\n&nbsp;<br \/>\n\u6d4b\u8bd5\u7a0b\u5e8f\uff1a<br \/>\n\u4ecegithub\u4e0a\u627e\u7684influxdata\u516c\u53f8\u63d0\u4f9b\u7684\u4e24\u6b3e\u6d4b\u8bd5\u5de5\u5177<br \/>\ninflux-stress \u7528\u4e8e\u5199\u5165\u6d4b\u8bd5<br \/>\ninfluxdb-comparisons\u7528\u4e8e\u67e5\u8be2\u6d4b\u8bd5<br \/>\n&nbsp;<br \/>\n\u6d4b\u8bd5\u573a\u666f\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"575\">\u5199\u5165\u6d4b\u8bd5<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u5de5\u5177\u540d\u79f0<\/td>\n<td width=\"475\">influx-stress<br \/>\n&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u5de5\u5177github\u5730\u5740<\/td>\n<td width=\"475\">https:\/\/github.com\/influxdata\/influx-stress<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u6d4b\u8bd5\u539f\u7406<\/td>\n<td width=\"475\">\u8be5\u5de5\u5177\u662f\u901a\u8fc7go\u8bed\u8a00\u7684fasthttp\u5e93\u7f16\u5199\u7684\u3002<br \/>\n1.\u00a0\u00a0\u00a0\u00a0 \u4f1a\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93stress<br \/>\n2.\u00a0\u00a0\u00a0\u00a0 \u7136\u540e\u521b\u5efa\u4e00\u4e2aMEASUREMENT\uff08\u7c7b\u4f3c\u5173\u7cfb\u6570\u636e\u5e93\u7684\u8868\uff09\u540d\u4e3actr<br \/>\n\u8be5\u8868\u6709time,n.some\u4e09\u4e2a\u5b57\u6bb5<br \/>\n3.\u00a0\u00a0\u00a0\u00a0 \u4e0d\u65ad\u7684\u5411stress\u6570\u636e\u5e93\u7684ctr\u8868\u63d2\u5165\u6570\u636e\uff0c\u6bcf\u6b21\u63d2\u5165\u7684\u6570\u636e\u90fd\u5305\u542b\u4e09\u4e2a\u5b57\u6bb5\u3002\u6bcf\u4e00\u6761\u6570\u636e\u79f0\u4e3a\u4e00\u4e2apoints\u3002<br \/>\n\u63d2\u5165\u6570\u636e\u7684\u65b9\u6cd5\u662f\u901a\u8fc7influxDB\u7684HTTP API \u53d1\u9001\u8bf7\u6c42\uff08POST \/write?db=stress\uff09<br \/>\n&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u6d4b\u8bd5\u547d\u4ee4<\/td>\n<td width=\"475\">influx-stress insert -r 60s &#8211;strict &#8211;pps 200000 &#8211;host <a href=\"http:\/\/10.0.3.83:8086\">http:\/\/10.XX.XX.XX:8086<\/a><br \/>\n&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td colspan=\"3\" width=\"575\">\u6d4b\u8bd5\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">Points Per Second\uff08\u53d1\u8d77\u8bf7\u6c42\uff09<\/td>\n<td width=\"192\">Write Throughput(points\/s)<br \/>\n\uff08\u6570\u636e\u5e93\u5b9e\u9645\u5904\u7406\u7ed3\u679c\uff09<\/td>\n<td width=\"192\">CPU\u5e73\u5747\u5229\u7528\u7387<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">200000<\/td>\n<td width=\"192\">199713<\/td>\n<td width=\"192\">33%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">300000<\/td>\n<td width=\"192\">299280<\/td>\n<td width=\"192\">45%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">400000<\/td>\n<td width=\"192\">392873<\/td>\n<td width=\"192\">62%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">500000<\/td>\n<td width=\"192\">491135<\/td>\n<td width=\"192\">80%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">600000<\/td>\n<td width=\"192\">593542<\/td>\n<td width=\"192\">90%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">650000<\/td>\n<td width=\"192\">606036<\/td>\n<td width=\"192\">93%<\/td>\n<\/tr>\n<tr>\n<td width=\"192\">700000<\/td>\n<td width=\"192\">613791<\/td>\n<td width=\"192\">95%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6d4b\u8bd5\u7ed3\u8bba\uff1a\u6700\u5927\u7684\u541e\u5410\u91cf\u4e3a\u6bcf\u79d2\u5199\u516560\u4e07\u6761\u6570\u636e\u3002\u8fd9\u4e4b\u540e\uff0c\u6bcf\u79d2\u53d1\u9001\u7684points\u518d\u591a\uff0c\u541e\u5410\u91cf\u4e5f\u4e0d\u4f1a\u589e\u52a0\uff0c\u540c\u65f6CPU\u5229\u7528\u7387\u5df2\u8fbe90%\u3002<br \/>\n&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"575\">\u67e5\u8be2\u6d4b\u8bd5<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u5de5\u5177\u540d\u79f0<\/td>\n<td width=\"475\">influxdb-comparisons<br \/>\n&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u5de5\u5177github\u5730\u5740<\/td>\n<td width=\"475\">https:\/\/github.com\/influxdata\/influxdb-comparisons<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u6d4b\u8bd5\u539f\u7406<\/td>\n<td width=\"475\">\u8be5\u5de5\u5177\u662f\u901a\u8fc7go\u8bed\u8a00\u7684fasthttp\u5e93\u7f16\u5199\u7684\u3002<br \/>\n1.\u00a0\u00a0\u00a0\u00a0 \u4f1a\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93benchmark_db<br \/>\n2.\u00a0\u00a0\u00a0\u00a0 \u7136\u540e\u521b\u5efa9\u4e2aMEASUREMENT \uff1acpu,disk,diskio,kernel,mem,net,nginx,postgresl<br \/>\n\u6bcf\u4e2ameasurement \u67092160\u884c\u6570\u636e\u3002<br \/>\n3.\u00a0\u00a0\u00a0\u00a0 \u901a\u8fc7http GET\u8bf7\u6c42&#8221;GET \/query?db=benchmark_db\u201c\u67e5\u8be2cpu\u8fd9\u5f20\u8868\u3002<br \/>\n\u67e5\u8be2\u8bed\u53e5\u4e3a\uff1aSELECT max(usage_user) from cpu where (hostname = &#8216;host_0&#8217;) and time &gt;= &#8216;2016-01-01T01:16:32Z&#8217; and time &lt; &#8216;2016-01-01T02:16:32Z&#8217; group by time(1m)<br \/>\n\u53ef\u4ee5\u53d6\u51fa61\u6761\u6570\u636e\u3002<br \/>\n&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"100\">\u6d4b\u8bd5\u547d\u4ee4<\/td>\n<td width=\"475\">.\/bulk_query_gen -query-type &#8220;1-host-1-hr&#8221; | .\/query_benchmarker_influxdb -urls http:\/\/10.XX.XX.XX:8086 -limit 1000<br \/>\n&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td colspan=\"5\" width=\"575\">\u6d4b\u8bd5\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">\u67e5\u8be2\u547d\u4ee4\u6267\u884c\u6b21\u6570<br \/>\n\uff08-limit\uff09<\/td>\n<td width=\"127\">\u547d\u4ee4\u6700\u77ed\u6267\u884c\u65f6\u95f4<\/td>\n<td width=\"118\">\u6bcf\u6761\u547d\u4ee4\u5e73\u5747\u6267\u884c\u65f6\u95f4<\/td>\n<td width=\"104\">\u547d\u4ee4\u6700\u5927\u6267\u884c\u65f6\u95f4<\/td>\n<td width=\"100\">\u603b\u8017\u65f6<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">100<\/td>\n<td width=\"127\">1.20ms<\/td>\n<td width=\"118\">1.69ms<\/td>\n<td width=\"104\">4.36ms<\/td>\n<td width=\"100\">0.2sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">200<\/td>\n<td width=\"127\">1.20ms<\/td>\n<td width=\"118\">1.71ms<\/td>\n<td width=\"104\">7.40ms<\/td>\n<td width=\"100\">0.3sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">300<\/td>\n<td width=\"127\">1.25ms<\/td>\n<td width=\"118\">1.73ms<\/td>\n<td width=\"104\">7.54ms<\/td>\n<td width=\"100\">0.5sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">400<\/td>\n<td width=\"127\">1.21ms<\/td>\n<td width=\"118\">1.71ms<\/td>\n<td width=\"104\">7.54ms<\/td>\n<td width=\"100\">0.7sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">500<\/td>\n<td width=\"127\">1.20ms<\/td>\n<td width=\"118\">1.70ms<\/td>\n<td width=\"104\">7.54ms<\/td>\n<td width=\"100\">0.8sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">600<\/td>\n<td width=\"127\">1.17ms<\/td>\n<td width=\"118\">1.67ms<\/td>\n<td width=\"104\">7.54ms<\/td>\n<td width=\"100\">1.0sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">700<\/td>\n<td width=\"127\">1.14ms<\/td>\n<td width=\"118\">1.66ms<\/td>\n<td width=\"104\">8.33ms<\/td>\n<td width=\"100\">1.2sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">800<\/td>\n<td width=\"127\">1.14ms<\/td>\n<td width=\"118\">1.65ms<\/td>\n<td width=\"104\">8.33ms<\/td>\n<td width=\"100\">1.3sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">900<\/td>\n<td width=\"127\">1.14ms<\/td>\n<td width=\"118\">1.63ms<\/td>\n<td width=\"104\">8.33ms<\/td>\n<td width=\"100\">1.5sec<\/td>\n<\/tr>\n<tr>\n<td width=\"127\">1000<\/td>\n<td width=\"127\">1.14ms<\/td>\n<td width=\"118\">1.64ms<\/td>\n<td width=\"104\">8.33ms<\/td>\n<td width=\"100\">1.6sec<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6d4b\u8bd5\u7ed3\u8bba\uff1a\u56e0\u4e3a\u8be5\u5de5\u5177\u6700\u5927\u53ea\u80fd\u6d4b\u5230\u8bfb\u53d61000\u6761\u6570\u636e\uff0c\u6240\u4ee5\u6ca1\u6709\u7ee7\u7eed\u52a0\u5927\u538b\u529b\u6d4b\u8bd5\u3002\u67e5\u8be2\u64cd\u4f5c\u7684\u6d88\u8017\u65f6\u95f4\u56e0\u4e3a\u53d7\u5230\u88ab\u67e5\u8be2\u8868\u7684\u6570\u636e\u91cf\u548c\u67e5\u8be2\u8bed\u53e5\u7684\u590d\u6742\u6027\u5f71\u54cd\uff0c\u6240\u4ee5\u5728influxDate\u5b98\u65b9\u7ed9\u51fa\u7684\u88ab\u67e5\u8868\u548c\u67e5\u8be2\u8bed\u53e5\u4e0b\uff0c\u7b97\u51fa\u6765\u662f\u5e73\u5747\u6bcf\u79d2\u6267\u884c600\u6b21\u67e5\u8be2\u3002<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>InfluxDB\u6027\u80fd\u6d4b\u8bd5\u62a5\u544a \u88ab\u6d4b\u73af\u5883\uff1a \u817e\u8baf\u4e91 CPU \u5185\u5b58 \u5e26\u5bbd \u7248\u672c\u53f7 4\u6838 16G 1Gbit\/s U [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":321,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,10],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-influxdb","category-10"],"_links":{"self":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":0,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/media\/321"}],"wp:attachment":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}