{"id":1516,"date":"2024-05-08T13:34:58","date_gmt":"2024-05-08T05:34:58","guid":{"rendered":"http:\/\/oneai.eu.org\/?p=1516"},"modified":"2024-05-08T13:34:58","modified_gmt":"2024-05-08T05:34:58","slug":"sysbenchmark-%e7%a1%ac%e4%bb%b6%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=1516","title":{"rendered":"sysbenchmark \u786c\u4ef6\u6027\u80fd\u6d4b\u8bd5"},"content":{"rendered":"<p>sysbenchmark\u5e38\u7528\u6d4b\u8bd5\u7b14\u8bb0<\/p>\n<p>\u4e00\u822c\u5728\u6000\u7591\u786c\u4ef6\u95ee\u9898\u6216\u8005\u505abenchmark\u65f6\u53ef\u4ee5\u4f7f\u7528\u8be5\u5de5\u5177\uff0c\u6b64\u7b14\u8bb0\u7528\u4e8ebenchmark0.5\u7248\u672c<br \/>\nIO\u6d4b\u8bd5<br \/>\n\u51c6\u5907\u6d4b\u8bd5\u6587\u4ef6<br \/>\nsysbench --test=fileio --file-num=16 --file-total-size=2G prepare<br \/>\n\u6267\u884cIO\u6d4b\u8bd5<br \/>\nsysbench --test=fileio --file-total-size=2G --file-test-mode=rndrd --max-time=180 --max-requests=100000000 --num-threads=16 --init-rng=on --file-num=16 --file-extra-flags=direct --file-fsync-freq=0 --file-block-size=16384 run<br \/>\n\u5173\u6ce8\u70b9\uff1a<br \/>\n1\u3001Total transferred 459.61Mb  (2.5522Mb\/sec)\uff0c\u6b63\u5e38\u503c\u5e9450M\u4ee5\u4e0a<br \/>\n2\u3001163.34 Requests\/sec executed \u968f\u673a\u8bfb\u7684IOPS\u3002\u6b63\u5e38\u503c4000\u4ee5\u4e0a<\/p>\n<p>\u6e05\u7406\u6d4b\u8bd5\u6587\u4ef6<br \/>\nsysbench --test=fileio --file-num=16 --file-total-size=2G cleanup<\/p>\n<p>\u6d4b\u8bd5MYSQL OLTP<br \/>\n\u9996\u5148\u521b\u5efa\u6d4b\u8bd5\u6570\u636e\u5e93\uff0c\u6267\u884c\u6570\u636e\u51c6\u5907<br \/>\nsysbench --test=oltp --mysql-host=192.168.10.119 --mysql-port=3306 --mysql-user=root --mysql-password=123456 --mysql-db=sysbenchtest --oltp-tables-count=10 --oltp-table-size=6000000 --num-threads=50 --max-requests=100000000 --report-interval=1 --test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua prepare<br \/>\n\u6267\u884c\u538b\u6d4b<br \/>\nsysbench --test=oltp --mysql-host=192.168.10.119 --oltp-test-mode=simeple --mysql-port=3306 --mysql-user=root --mysql-password=123456 --mysql-db=sysbenchtest --oltp-tables-count=10 --oltp-table-size=6000000 --num-threads=50 --max-requests=100000000 --report-interval=1 --max-time=20 --test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run<br \/>\n\u7eafinsert\u6d4b\u8bd5<br \/>\nsysbench --test=oltp --mysql-host=192.168.10.119 --mysql-port=3306 --mysql-user=root --mysql-password=123456 --mysql-db=sysbenchtest --oltp-tables-count=10 --oltp-table-size=600000 --num-threads=50 --max-requests=100000000 --report-interval=1 --max-time=20 --test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run<\/p>\n<p>sysbench --test=oltp --mysql-table-engine=innodb --mysql-user=root --mysql-password=123456  --db-driver=mysql --oltp-nontrx-mode=update_key --mysql-db=sysbenchtest --oltp-table-size=600000 --oltp-table-name=sbtest10 --test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run<\/p>\n<p>\u9488\u5bf9CPU\u8fdb\u884c\u6d4b\u8bd5<br \/>\n\u6307\u5b9a\u6700\u5927\u7684\u7d20\u6570<br \/>\nsysbench --test=cpu --cpu-max-prime=20000 run<\/p>\n<p>cpu\u6d4b\u8bd5\u4e3b\u8981\u662f\u5bfb\u627e\u7d20\u6570\u7684\u65b9\u5f0f<\/p>\n<p>\u9488\u5bf9\u7ebf\u7a0b\u5904\u7406\u80fd\u529b\u6d4b\u8bd5<br \/>\nsysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run<\/p>\n<p>--thread-yields=N      \u6307\u5b9a\u6bcf\u4e2a\u8bf7\u6c42\u7684\u538b\u529b\uff0c\u9ed8\u8ba4\u4e3a1000<br \/>\n--thread-locks=N       \u6307\u5b9a\u6bcf\u4e2a\u7ebf\u7a0b\u7684\u9501\u6570\u91cf\uff0c\u9ed8\u8ba4\u4e3a8<\/p>\n<p>\u4e92\u65a5\u9501\u6d4b\u8bd5<br \/>\nsysbench --test=mutex --num-threads=16 --mutex-num=1024 --mutex-locks=10000 --mutex-loops=5000 run<br \/>\n--mutex-num=N    \u6570\u7ec4\u4e92\u65a5\u7684\u603b\u5927\u5c0f\u3002\u9ed8\u8ba4\u662f4096<br \/>\n--mutex-locks=N    \u6bcf\u4e2a\u7ebf\u7a0b\u4e92\u65a5\u9501\u7684\u6570\u91cf\u3002\u9ed8\u8ba4\u662f50000<br \/>\n--mutex-loops=N    \u5185\u90e8\u4e92\u65a5\u9501\u7684\u7a7a\u5faa\u73af\u6570\u91cf\u3002\u9ed8\u8ba4\u662f10000<\/p>\n<p>\u5185\u5b58\u6d4b\u8bd5<br \/>\nsysbench --test=memory --num-threads=512 --memory-block-size=262144 --memory-total-size=32G run<\/p>\n<p>\u78c1\u76d8IO\u6027\u80fd\u6d4b\u8bd5\uff0c\u968f\u673a\u8bfb\u5199\u548c\u5220\u9664<\/p>\n<p>sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare<br \/>\nsysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run<br \/>\nsysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup<br \/>\n}<br \/>\nAWS \u78c1\u76d8\u5199\u6027\u80fd \uff1a5368709120 bytes written in 42.51 seconds (120.43 MB\/sec).<br \/>\n\u6d4b\u8bd5\u7ebf\u7a0b\uff1a<br \/>\nsysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run<br \/>\n\u6d4b\u8bd5\u5185\u5b58\uff1a<br \/>\nsysbench --test=memory --memory-block-size=8k --memory-total-size=4G run<br \/>\n192.168.15.80 19000<\/p>\n<p>pmap -d 28098|sort -rn -k 2  |head -1<br \/>\njstat -gccause 28098 200 1000 <\/p>\n<p>\u6d4b\u8bd5mysql:<br \/>\nsysbench --test=oltp --oltp-table-size=80000000 --oltp-read-only=off --init-rng=on --num-threads=16 --max-requests=0 --oltp-dist-type=uniform --max-time=3600 --mysql-user=dba_manager  --mysql-password='111111' --db-driver=mysql --mysql-socket=\/data\/mysqlsoft3307\/mysql.sock run &gt; result.log<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sysbenchmark\u5e38\u7528\u6d4b\u8bd5\u7b14\u8bb0 \u4e00\u822c\u5728\u6000\u7591\u786c\u4ef6\u95ee\u9898\u6216\u8005\u505abenchmark\u65f6\u53ef\u4ee5\u4f7f\u7528\u8be5\u5de5\u5177\uff0c\u6b64\u7b14\u8bb0\u7528\u4e8ebenchmark0.5\u7248\u672c IO\u6d4b\u8bd5 \u51c6\u5907\u6d4b\u8bd5\u6587\u4ef6 sysbench &#8211;test=fileio &#8211;file-num=16 &#8211;file-total-size=2G prepare \u6267\u884cIO\u6d4b\u8bd5 sysbench &#8211;test=fileio &#8211;file-total-size=2G &#8211;file-test-mode=rndrd &#8211;max-time=180 &#8211;max-requests=100000000 &#8211;num-threads=16 &#8211;init-rng=on &#8211;file-num=16 &#8211;file-extra-flags=direct &#8211;file-fsync-freq=0 &#8211;file-block-size=16384 run \u5173\u6ce8\u70b9\uff1a 1\u3001Total transferred 459.61Mb (2.5522Mb\/sec)\uff0c\u6b63\u5e38\u503c\u5e9450M\u4ee5\u4e0a 2\u3001163.34 Requests\/sec executed \u968f\u673a\u8bfb\u7684IOPS\u3002\u6b63\u5e38\u503c4000\u4ee5\u4e0a \u6e05\u7406\u6d4b\u8bd5\u6587\u4ef6 sysbench &#8211;test=fileio &#8211;file-num=16 &#8211;file-total-size=2G cleanup \u6d4b\u8bd5MYSQL OLTP \u9996\u5148\u521b\u5efa\u6d4b\u8bd5\u6570\u636e\u5e93\uff0c\u6267\u884c\u6570\u636e\u51c6\u5907 sysbench &#8211;test=oltp &#8211;mysql-host=192.168.10.119 &#8211;mysql-port=3306 &#8211;mysql-user=root &#8211;mysql-password=123456 &#8211;mysql-db=sysbenchtest &#8211;oltp-tables-count=10 &#8211;oltp-table-size=6000000 &#8211;num-threads=50 &#8211;max-requests=100000000 &#8211;report-interval=1 &#8211;test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua prepare \u6267\u884c\u538b\u6d4b sysbench &#8211;test=oltp &#8211;mysql-host=192.168.10.119 &#8211;oltp-test-mode=simeple &#8211;mysql-port=3306 &#8211;mysql-user=root &#8211;mysql-password=123456 &#8211;mysql-db=sysbenchtest &#8211;oltp-tables-count=10 &#8211;oltp-table-size=6000000 &#8211;num-threads=50 &#8211;max-requests=100000000 &#8211;report-interval=1 &#8211;max-time=20 &#8211;test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run \u7eafinsert\u6d4b\u8bd5 sysbench &#8211;test=oltp &#8211;mysql-host=192.168.10.119 &#8211;mysql-port=3306 &#8211;mysql-user=root &#8211;mysql-password=123456 &#8211;mysql-db=sysbenchtest &#8211;oltp-tables-count=10 &#8211;oltp-table-size=600000 &#8211;num-threads=50 &#8211;max-requests=100000000 &#8211;report-interval=1 &#8211;max-time=20 &#8211;test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run sysbench &#8211;test=oltp &#8211;mysql-table-engine=innodb &#8211;mysql-user=root &#8211;mysql-password=123456 &#8211;db-driver=mysql &#8211;oltp-nontrx-mode=update_key &#8211;mysql-db=sysbenchtest &#8211;oltp-table-size=600000 &#8211;oltp-table-name=sbtest10 &#8211;test=\/tmp\/sysbench-0.5\/sysbench\/tests\/db\/oltp.lua run \u9488\u5bf9CPU\u8fdb\u884c\u6d4b\u8bd5 \u6307\u5b9a\u6700\u5927\u7684\u7d20\u6570 sysbench &#8211;test=cpu &#8211;cpu-max-prime=20000 run cpu\u6d4b\u8bd5\u4e3b\u8981\u662f\u5bfb\u627e\u7d20\u6570\u7684\u65b9\u5f0f \u9488\u5bf9\u7ebf\u7a0b\u5904\u7406\u80fd\u529b\u6d4b\u8bd5 sysbench &#8211;test=threads &#8211;num-threads=64 &#8211;thread-yields=100 &#8211;thread-locks&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[87,101,80],"tags":[],"class_list":["post-1516","post","type-post","status-publish","format-standard","hentry","category-linux","category-101","category-80"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1516"}],"version-history":[{"count":1,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1516\/revisions"}],"predecessor-version":[{"id":1517,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1516\/revisions\/1517"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}