\u56db\u3001\u8fdb\u884cOLTP\u6d4b\u8bd5<\/strong><\/span><\/div>\n\u5728\u4e0a\u9762\u521d\u59cb\u5316\u6570\u636e\u53c2\u6570\u7684\u57fa\u7840\u4e0a\uff0c\u518d\u589e\u52a0\u4e00\u4e9b\u53c2\u6570\uff0c\u5373\u53ef\u5f00\u59cb\u8fdb\u884c\u6d4b\u8bd5\u4e86\uff1a<\/p>\n
.\/sysbench --mysql-host=127.0.0.1 --mysql-port=3306 \\\r\n--mysql-user=tpcc --mysql-password=tpcc \\\r\n--test=tests\/db\/oltp.lua --oltp_tables_count=10 \\ \r\n--oltp-table-size=10000000 --num-threads=8 \\ \r\n--oltp-read-only=off --report-interval=10 \\ \r\n--rand-type=uniform --max-time=3600 \\ \r\n--mysql-table-engine=myisam --max-requests=0 \\ \r\n--percentile=99 run >> .\/log\/sysbench_oltpX_8_20140921.log\r\n<\/pre>\n\u5173\u4e8e\u8fd9\u51e0\u4e2a\u53c2\u6570\u7684\u89e3\u91ca\uff1a<\/p>\n
--num-threads=8 \u8868\u793a\u53d1\u8d77 8\u4e2a\u5e76\u53d1\u8fde\u63a5\r\n--oltp-read-only=off \u8868\u793a\u4e0d\u8981\u8fdb\u884c\u53ea\u8bfb\u6d4b\u8bd5\uff0c\u4e5f\u5c31\u662f\u4f1a\u91c7\u7528\u8bfb\u5199\u6df7\u5408\u6a21\u5f0f\u6d4b\u8bd5\r\n--report-interval=10 \u8868\u793a\u6bcf10\u79d2\u8f93\u51fa\u4e00\u6b21\u6d4b\u8bd5\u8fdb\u5ea6\u62a5\u544a\r\n--rand-type=uniform \u8868\u793a\u968f\u673a\u7c7b\u578b\u4e3a\u56fa\u5b9a\u6a21\u5f0f\uff0c\u5176\u4ed6\u51e0\u4e2a\u53ef\u9009\u968f\u673a\u6a21\u5f0f\uff1auniform(\u56fa\u5b9a),gaussian(\u9ad8\u65af),special(\u7279\u5b9a\u7684),pareto(\u5e15\u7d2f\u6258)\r\n--max-time=120 \u8868\u793a\u6700\u5927\u6267\u884c\u65f6\u957f\u4e3a 120\u79d2\r\n--max-requests=0 \u8868\u793a\u603b\u8bf7\u6c42\u6570\u4e3a 0\uff0c\u56e0\u4e3a\u4e0a\u9762\u5df2\u7ecf\u5b9a\u4e49\u4e86\u603b\u6267\u884c\u65f6\u957f\uff0c\u6240\u4ee5\u603b\u8bf7\u6c42\u6570\u53ef\u4ee5\u8bbe\u5b9a\u4e3a 0\uff1b\u4e5f\u53ef\u4ee5\u53ea\u8bbe\u5b9a\u603b\u8bf7\u6c42\u6570\uff0c\u4e0d\u8bbe\u5b9a\u6700\u5927\u6267\u884c\u65f6\u957f\r\n--percentile=99 \u8868\u793a\u8bbe\u5b9a\u91c7\u6837\u6bd4\u4f8b\uff0c\u9ed8\u8ba4\u662f 95%\uff0c\u5373\u4e22\u5f031%\u7684\u957f\u8bf7\u6c42\uff0c\u5728\u5269\u4f59\u768499%\u91cc\u53d6\u6700\u5927\u503c\r\n--mysql-table-engine=myisam \u8868\u793a\u6d4b\u8bd5\u7684\u8868\u5b58\u50a8\u5f15\u64ce\u7c7b\u578b\u4e3amyisam\r\n<\/pre>\n\u5373\uff1a\u6a21\u62df \u5bf910\u4e2a\u8868\u5e76\u53d1OLTP\u6d4b\u8bd5\uff0c\u6bcf\u4e2a\u88681000\u4e07\u884c\u8bb0\u5f55\uff0c\u6301\u7eed\u538b\u6d4b\u65f6\u95f4\u4e3a 1\u5c0f\u65f6\u3002<\/p>\n
\u771f\u5b9e\u6d4b\u8bd5\u573a\u666f\u4e2d\uff0c\u5efa\u8bae\u6301\u7eed\u538b\u6d4b\u65f6\u957f\u4e0d\u5c0f\u4e8e 30\u5206\u949f<\/strong> \uff0c\u5426\u5219\u6d4b\u8bd5\u6570\u636e\u53ef\u80fd\u4e0d\u5177\u53c2\u8003\u610f\u4e49\u3002<\/p>\n\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5b98\u65b9\u7f51\u7ad9\u4e0a\u7684\u53c2\u6570\u6709\u4e00\u5904\u6709\u8bef\uff0c\u5373 --mysql-table-engine\uff0c\u5b98\u65b9\u7f51\u7ad9\u4e0a\u5199\u7684\u662f --mysql-table-type\uff0c\u8fd9\u4e2a\u5e94\u8be5\u662f\u6ca1\u6709\u53ca\u65f6\u66f4\u65b0\u5bfc\u81f4\u7684\u3002<\/p>\n
\u53e6\u5916\uff0c--mysql-table-engine\u53c2\u6570\u8fd8\u53ef\u4ee5\u6307\u5b9a\u4e3a innodb \u7b49 MySQL \u652f\u6301\u7684\u8868\u5b58\u50a8\u5f15\u64ce\u7c7b\u578b\u3002<\/p>\n
\u4e94\u3001\u6d4b\u8bd5\u7ed3\u679c\u89e3\u8bfb<\/strong><\/span><\/div>\n\u6d4b\u8bd5\u7ed3\u679c\u89e3\u8bfb\u5982\u4e0b\uff1a<\/p>\n
sysbench 0.5: multi-threaded system evaluation benchmark\r\n\r\nRunning the test with following options:\r\nNumber of threads: 8\r\nReport intermediate results every 10 second(s)\r\nRandom number generator seed is 0 and will be ignored\r\n\r\nThreads started! --\u6bcf10\u79d2\u949f\u62a5\u544a\u4e00\u6b21\u6d4b\u8bd5\u7ed3\u679c\uff0ctps\u3001\u6bcf\u79d2\u8bfb\u3001\u6bcf\u79d2\u5199\u300199%\u4ee5\u4e0a\u7684\u54cd\u5e94\u65f6\u957f\u7edf\u8ba1\r\n[10s] threads: 8, tps: 1111.51, reads\/s: 15568.42, writes\/s: 4446.13, response time: 9.95ms (99%)\r\n[20s] threads: 8, tps: 1121.90, reads\/s: 15709.62, writes\/s: 4487.80, response time: 9.78ms (99%)\r\n[30s] threads: 8, tps: 1120.00, reads\/s: 15679.10, writes\/s: 4480.20, response time: 9.84ms (99%)\r\n[40s] threads: 8, tps: 1114.20, reads\/s: 15599.39, writes\/s: 4456.30, response time: 9.90ms (99%)\r\n[50s] threads: 8, tps: 1114.00, reads\/s: 15593.60, writes\/s: 4456.70, response time: 9.84ms (99%)\r\n[60s] threads: 8, tps: 1119.30, reads\/s: 15671.60, writes\/s: 4476.50, response time: 9.99ms (99%)\r\nOLTP test statistics:\r\n queries performed:\r\n read:\t\t\t 938224 --\u8bfb\u603b\u6570\r\n write:\t\t\t 268064 --\u5199\u603b\u6570\r\n other:\t\t\t 134032 --\u5176\u4ed6\u64cd\u4f5c\u603b\u6570(SELECT\u3001INSERT\u3001UPDATE\u3001DELETE\r\n \u4e4b\u5916\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982COMMIT\u7b49)\r\n total:\t\t\t 1340320 --\u5168\u90e8\u603b\u6570\r\n transactions:\t\t\t 67016 (1116.83 per sec.) --\u603b\u4e8b\u52a1\u6570(\u6bcf\u79d2\u4e8b\u52a1\u6570)\r\n deadlocks:\t\t\t 0\t (0.00 per sec.) --\u53d1\u751f\u6b7b\u9501\u603b\u6570\r\n read\/write requests:\t\t 1206288 (20103.01 per sec.)--\u8bfb\u5199\u603b\u6570(\u6bcf\u79d2\u8bfb\u5199\u6b21\u6570)\r\n other operations:\t\t 134032 (2233.67 per sec.) --\u5176\u4ed6\u64cd\u4f5c\u603b\u6570(\u6bcf\u79d2\u5176\u4ed6\u64cd\u4f5c\u6b21\u6570)\r\n\r\nGeneral statistics:\t --\u4e00\u4e9b\u7edf\u8ba1\u7ed3\u679c\r\n total time:\t\t\t 60.0053s --\u603b\u8017\u65f6\r\n total number of events:\t 67016\t --\u5171\u53d1\u751f\u591a\u5c11\u4e8b\u52a1\u6570\r\n total time taken by event execution: 479.8171s --\u6240\u6709\u4e8b\u52a1\u8017\u65f6\u76f8\u52a0(\u4e0d\u8003\u8651\u5e76\u884c\u56e0\u7d20)\r\n response time:\t --\u54cd\u5e94\u65f6\u957f\u7edf\u8ba1\r\n min:\t\t\t 4.27ms\t --\u6700\u5c0f\u8017\u65f6\r\n avg:\t\t\t 7.16ms\t --\u5e73\u5747\u8017\u65f6\r\n max:\t\t\t 13.80ms\t --\u6700\u957f\u8017\u65f6\r\n approx. 99 percentile:\t 9.88ms\t --\u8d85\u8fc799%\u5e73\u5747\u8017\u65f6\r\n\r\nThreads fairness:\r\n events (avg\/stddev):\t\t 8377.0000\/44.33\r\n execution time (avg\/stddev): 59.9771\/0.00\r\n<\/pre>\n<\/div>\n\n\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/imysql.com\/2014\/10\/17\/sysbench-full-user-manual.shtml<\/a><\/p>\n\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/performance-test-sysbench.html<\/a>\u7f16\u8f91\uff1a\u6587\u9f99\u5175\uff0c\u5ba1\u6838\u5458\uff1a\u82cf\u897f\u4e91<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"\u5bfc\u8bfb sysbench\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u591a\u7ebf\u7a0b\u6027\u80fd\u6d4b\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u6267\u884cCPU\/\u5185\u5b58\/\u7ebf\u7a0b\/IO\/\u6570\u636e\u5e93\u7b49\u65b9\u9762\u7684\u6027\u80fd\u6d4b\u8bd5 […]<\/p>\n","protected":false},"author":63,"featured_media":31755,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-31644","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/31644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=31644"}],"version-history":[{"count":65,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/31644\/revisions"}],"predecessor-version":[{"id":259828,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/31644\/revisions\/259828"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/31755"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=31644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=31644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=31644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}