{"id":114,"date":"2022-05-15T21:26:03","date_gmt":"2022-05-15T13:26:03","guid":{"rendered":"https:\/\/superfreeboy.tech\/?p=114"},"modified":"2022-05-15T22:08:34","modified_gmt":"2022-05-15T14:08:34","slug":"%e6%96%b0%e5%ae%89%e8%a3%85%e7%9a%84linux%e7%b3%bb%e7%bb%9f%e5%bb%ba%e8%ae%aebench%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/superfreeboy.tech\/index.php\/2022\/05\/15\/%e6%96%b0%e5%ae%89%e8%a3%85%e7%9a%84linux%e7%b3%bb%e7%bb%9f%e5%bb%ba%e8%ae%aebench%e5%91%bd%e4%bb%a4\/","title":{"rendered":"\u65b0\u5b89\u88c5\u7684Linux\u7cfb\u7edf\u5efa\u8baeBench\u547d\u4ee4"},"content":{"rendered":"\n<p class=\"has-drop-cap has-medium-font-size\">\u65b0\u5b89\u88c5\u7684Linux\u7cfb\u7edf\uff0c\u5efa\u8bae\u5b89\u88c5\u597d\u540e\uff0c\u8fd0\u884c3\u4e2abench\u6d4b\u8bd5\u547d\u4ee4\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>wget -qO- bench.sh | bash\nwget -qO- git.io\/superbench.sh | bash\nwget --no-check-certificate https:\/\/github.com\/teddysun\/across\/raw\/master\/unixbench.sh\nchmod +x unixbench.sh\n.\/unixbench.sh<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">\u9700\u8981\u6709\u5916\u7f51\u652f\u6301\uff0c\u56e0\u4e3a\u8981\u6d4b\u8bd5\u4e00\u4e0b\u7f51\u7edc\u901f\u5ea6\uff0c\u7528\u7684\u662fspeedtest\u7684cli\uff0c\u6709\u4e9b\u8282\u70b9\u662f\u5883\u5916\u7684\uff0c\u6240\u4ee5\u8bf7\u6ce8\u610f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Superspeed.sh<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Description: Test your server&#8217;s network with Speedtest to China<\/li><li>Intro:&nbsp;<a href=\"https:\/\/www.oldking.net\/305.html\">https:\/\/www.oldking.net\/305.html<\/a><\/li><li>Copyright (C) 2020 Oldking&nbsp;<a href=\"mailto:oooldking@gmail.com\">oooldking@gmail.com<\/a><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Usage:\n\n| No.      | Bash Command                    \n|----------|---------------------------------\n| 1        | wget https:\/\/raw.githubusercontent.com\/oooldking\/script\/master\/superspeed.sh      \n| 2        | chmod +x superspeed.sh\n| 3        | .\/superspeed.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/oooldking\/script#superbenchsh\"><\/a>Superbench.sh<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Description: Auto test download &amp; I\/O speed &amp; network to China script<\/li><li>Intro:&nbsp;<a href=\"https:\/\/www.oldking.net\/350.html\">https:\/\/www.oldking.net\/350.html<\/a><\/li><li>Copyright (C) 2020 Oldking&nbsp;<a href=\"mailto:oooldking@gmail.com\">oooldking@gmail.com<\/a><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Usage:\n\n| No.      | Bash Command                    |\n|----------|---------------------------------|\n| 1        | wget -qO- git.io\/superbench.sh | bash       |\n| 2        | curl -Lso- git.io\/superbench.sh | bash      |<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><mark style=\"background-color:#f4ca16\" class=\"has-inline-color\">Bench.sh<\/mark>\u7684<strong>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/strong><br><strong>\u547d\u4ee41\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">wget -qO- bench.sh | bash<\/pre>\n\n\n\n<p class=\"has-medium-font-size\">\u6216\u8005<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">curl -Lso- bench.sh | bash<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u547d\u4ee42\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">wget -qO- 86.re\/bench.sh | bash<\/pre>\n\n\n\n<p class=\"has-medium-font-size\">\u6216\u8005<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">curl -so- 86.re\/bench.sh | bash<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u5907\u6ce8\uff1a<\/strong><br>bench.sh \u65e2\u662f\u811a\u672c\u540d\uff0c\u540c\u65f6\u53c8\u662f\u57df\u540d\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e0b\u8f7d\u5730\u5740\uff1a<\/strong><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/teddysun\/across\/blob\/master\/bench.sh\" target=\"_blank\">https:\/\/github.com\/teddysun\/across\/blob\/master\/bench.sh<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u540c\u65f6\u6700\u597d\u505a\u4e00\u4e0b<mark style=\"background-color:#f4ca16\" class=\"has-inline-color\">Unixbench<\/mark>\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">UnixBench\u662f\u4e00\u4e2a\u7c7bunix\u7cfb\uff08Unix\uff0cBSD\uff0cLinux\uff09\u7edf\u4e0b\u7684\u6027\u80fd\u6d4b\u8bd5\u5de5\u5177\uff0c\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u88ab\u5e7f\u6cdb\u7528\u4e0e\u6d4b\u8bd5linux\u7cfb\u7edf\u4e3b\u673a\u7684\u6027\u80fd\u3002Unixbench\u7684\u4e3b\u8981\u6d4b\u8bd5\u9879\u76ee\u6709\uff1a\u7cfb\u7edf\u8c03\u7528\u3001\u8bfb\u5199\u3001\u8fdb\u7a0b\u3001\u56fe\u5f62\u5316\u6d4b\u8bd5\u30012D\u30013D\u3001\u7ba1\u9053\u3001\u8fd0\u7b97\u3001C\u5e93\u7b49\u7cfb\u7edf\u57fa\u51c6\u6027\u80fd\u63d0\u4f9b\u6d4b\u8bd5\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u6700\u65b0\u7248\u672cUnixBench5.1.3\uff0c\u5305\u542bsystem\u548cgraphic\u6d4b\u8bd5\uff0c\u5982\u679c\u4f60\u9700\u8981\u6d4b\u8bd5graphic\uff0c\u5219\u9700\u8981\u4fee\u6539Makefile,\u4e0d\u8981\u6ce8\u91ca\u6389\u201dGRAPHIC_TESTS = defined\u201d\uff0c\u540c\u65f6\u9700\u8981\u7cfb\u7edf\u63d0\u4f9bx11perf\u547d\u4ee4gl_glibs\u5e93\u3002<br>\u4e0b\u9762\u7684\u811a\u672c\u4f7f\u7528\u4e86\u6700\u65b0\u7248UnixBench5.1.3\u6765\u6d4b\u8bd5\uff0c\u6ce8\u91ca\u4e86\u5173\u4e8egraphic\u7684\u6d4b\u8bd5\u9879\uff08\u5927\u591a\u6570VPS\u90fd\u662f\u6ca1\u6709\u663e\u5361\u6216\u8005\u662f\u96c6\u663e\uff0c\u6240\u4ee5\u56fe\u50cf\u6027\u80fd\u65e0\u9700\u6d4b\u8bd5\uff09\uff0c\u8fd0\u884c10-30\u5206\u949f\u540e\uff08\u6839\u636eCPU\u5185\u6838\u6570\u91cf\uff0c\u8fd0\u7b97\u65f6\u95f4\u4e0d\u7b49\uff09\u5f97\u51fa\u5206\u6570\uff0c\u8d8a\u9ad8\u8d8a\u597d\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u6d4b\u8bd5\u65b9\u6cd5\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-medium-font-size\">wget --no-check-certificate https:\/\/github.com\/teddysun\/across\/raw\/master\/unixbench.sh\nchmod +x unixbench.sh\n.\/unixbench.sh<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u6d4b\u8bd5\u9879\u76ee\uff1a<\/strong><br>Dhrystone 2 using register variables<br>\u6b64\u9879\u7528\u4e8e\u6d4b\u8bd5 string handling\uff0c\u56e0\u4e3a\u6ca1\u6709\u6d6e\u70b9\u64cd\u4f5c\uff0c\u6240\u4ee5\u6df1\u53d7\u8f6f\u4ef6\u548c\u786c\u4ef6\u8bbe\u8ba1\uff08hardware and software design\uff09\u3001\u7f16\u8bd1\u548c\u94fe\u63a5\uff08compiler and linker options\uff09\u3001\u4ee3\u7801\u4f18\u5316\uff08code optimazaton\uff09\u3001\u5bf9\u5185\u5b58\u7684cache\uff08cache memory\uff09\u3001\u7b49\u5f85\u72b6\u6001\uff08wait states\uff09\u3001\u6574\u6570\u6570\u636e\u7c7b\u578b\uff08integer data types\uff09\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Double-Precision Whetstone<br>\u8fd9\u4e00\u9879\u6d4b\u8bd5\u6d6e\u70b9\u6570\u64cd\u4f5c\u7684\u901f\u5ea6\u548c\u6548\u7387\u3002\u8fd9\u4e00\u6d4b\u8bd5\u5305\u62ec\u51e0\u4e2a\u6a21\u5757\uff0c\u6bcf\u4e2a\u6a21\u5757\u90fd\u5305\u62ec\u4e00\u7ec4\u7528\u4e8e\u79d1\u5b66\u8ba1\u7b97\u7684\u64cd\u4f5c\u3002\u8986\u76d6\u9762\u5f88\u5e7f\u7684\u4e00\u7cfb\u5217 c \u51fd\u6570\uff1asin\uff0ccos\uff0csqrt\uff0cexp\uff0clog \u88ab\u7528\u4e8e\u6574\u6570\u548c\u6d6e\u70b9\u6570\u7684\u6570\u5b66\u8fd0\u7b97\u3001\u6570\u7ec4\u8bbf\u95ee\u3001\u6761\u4ef6\u5206\u652f\uff08conditional branch\uff09\u548c\u7a0b\u5e8f\u8c03\u7528\u3002\u6b64\u6d4b\u8bd5\u540c\u65f6\u6d4b\u8bd5\u4e86\u6574\u6570\u548c\u6d6e\u70b9\u6570\u7b97\u672f\u8fd0\u7b97\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Execl Throughput<br>\u6b64\u6d4b\u8bd5\u8003\u5bdf\u6bcf\u79d2\u949f\u53ef\u4ee5\u6267\u884c\u7684 execl \u7cfb\u7edf\u8c03\u7528\u7684\u6b21\u6570\u3002 execl \u7cfb\u7edf\u8c03\u7528\u662f exec \u51fd\u6570\u65cf\u7684\u4e00\u5458\u3002\u5b83\u548c\u5176\u4ed6\u4e00\u4e9b\u4e0e\u4e4b\u76f8\u4f3c\u7684\u547d\u4ee4\u4e00\u6837\u662f execve\uff08\uff09 \u51fd\u6570\u7684\u524d\u7aef\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">File copy<br>\u6d4b\u8bd5\u4ece\u4e00\u4e2a\u6587\u4ef6\u5411\u53e6\u5916\u4e00\u4e2a\u6587\u4ef6\u4f20\u8f93\u6570\u636e\u7684\u901f\u7387\u3002\u6bcf\u6b21\u6d4b\u8bd5\u4f7f\u7528\u4e0d\u540c\u5927\u5c0f\u7684\u7f13\u51b2\u533a\u3002\u8fd9\u4e00\u9488\u5bf9\u6587\u4ef6 read\u3001write\u3001copy \u64cd\u4f5c\u7684\u6d4b\u8bd5\u7edf\u8ba1\u89c4\u5b9a\u65f6\u95f4\uff08\u9ed8\u8ba4\u662f 10s\uff09\u5185\u7684\u6587\u4ef6 read\u3001write\u3001copy \u64cd\u4f5c\u6b21\u6570\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Pipe Throughput<br>\u7ba1\u9053\uff08pipe\uff09\u662f\u8fdb\u7a0b\u95f4\u4ea4\u6d41\u7684\u6700\u7b80\u5355\u65b9\u5f0f\uff0c\u8fd9\u91cc\u7684 Pipe throughtput \u6307\u7684\u662f\u4e00\u79d2\u949f\u5185\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u4ee5\u5411\u4e00\u4e2a\u7ba1\u9053\u5199 512 \u5b57\u8282\u6570\u636e\u7136\u540e\u518d\u8bfb\u56de\u7684\u6b21\u6570\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cpipe throughtput \u5728\u5b9e\u9645\u7f16\u7a0b\u4e2d\u6ca1\u6709\u5bf9\u5e94\u7684\u771f\u5b9e\u5b58\u5728\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Pipe-based Context Switching<br>\u8fd9\u4e2a\u6d4b\u8bd5\u4e24\u4e2a\u8fdb\u7a0b\uff08\u6bcf\u79d2\u949f\uff09\u901a\u8fc7\u4e00\u4e2a\u7ba1\u9053\u4ea4\u6362\u4e00\u4e2a\u4e0d\u65ad\u589e\u957f\u7684\u6574\u6570\u7684\u6b21\u6570\u3002\u8fd9\u4e00\u70b9\u5f88\u5411\u73b0\u5b9e\u7f16\u7a0b\u4e2d\u7684\u4e00\u4e9b\u5e94\u7528\uff0c\u8fd9\u4e2a\u6d4b\u8bd5\u7a0b\u5e8f\u9996\u5148\u521b\u5efa\u4e00\u4e2a\u5b50\u8fdb\u7a0b\uff0c\u518d\u548c\u8fd9\u4e2a\u5b50\u8fdb\u7a0b\u8fdb\u884c\u53cc\u5411\u7684\u7ba1\u9053\u4f20\u8f93\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Process Creation<br>\u6d4b\u8bd5\u6bcf\u79d2\u949f\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u4ee5\u521b\u5efa\u5b50\u8fdb\u7a0b\u7136\u540e\u6536\u56de\u5b50\u8fdb\u7a0b\u7684\u6b21\u6570\uff08\u5b50\u8fdb\u7a0b\u4e00\u5b9a\u7acb\u5373\u9000\u51fa\uff09\u3002process creation \u7684\u5173\u6ce8\u70b9\u662f\u65b0\u8fdb\u7a0b\u8fdb\u7a0b\u63a7\u5236\u5757\uff08process control block\uff09\u7684\u521b\u5efa\u548c\u5185\u5b58\u5206\u914d\uff0c\u5373\u4e00\u9488\u89c1\u8840\u5730\u5173\u6ce8\u5185\u5b58\u5e26\u5bbd\u3002\u4e00\u822c\u8bf4\u6765\uff0c\u8fd9\u4e2a\u6d4b\u8bd5\u88ab\u7528\u4e8e\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u7a0b\u521b\u5efa\u8fd9\u4e00\u7cfb\u7edf\u8c03\u7528\u7684\u4e0d\u540c\u5b9e\u73b0\u7684\u6bd4\u8f83\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">System Call Overhead<br>\u6d4b\u8bd5\u8fdb\u5165\u548c\u79bb\u5f00\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7684\u4ee3\u4ef7\uff0c\u5373\u4e00\u6b21\u7cfb\u7edf\u8c03\u7528\u7684\u4ee3\u4ef7\u3002\u5b83\u5229\u7528\u4e00\u4e2a\u53cd\u590d\u5730\u8c03\u7528 getpid \u51fd\u6570\u7684\u5c0f\u7a0b\u5e8f\u8fbe\u5230\u6b64\u76ee\u7684\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Shell Scripts<br>\u6d4b\u8bd5\u4e00\u79d2\u949f\u5185\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u4ee5\u5e76\u53d1\u5730\u5f00\u59cb\u4e00\u4e2a shell \u811a\u672c\u7684 n \u4e2a\u62f7\u8d1d\u7684\u6b21\u6570\uff0cn \u4e00\u822c\u53d6\u503c 1\uff0c2\uff0c4\uff0c8\u3002\uff08\u6211\u5728\u6d4b\u8bd5\u65f6\u53d6 1\uff0c 8\uff09\u3002\u8fd9\u4e2a\u811a\u672c\u5bf9\u4e00\u4e2a\u6570\u636e\u6587\u4ef6\u8fdb\u884c\u4e00\u7cfb\u5217\u7684\u53d8\u5f62\u64cd\u4f5c\uff08transformation\uff09\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u8f6c\u8f7d\u81ea\uff1a<a href=\"https:\/\/teddysun.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u79cb\u6c34\u9038\u51b0<\/a>&nbsp;\u00bb&nbsp;<a href=\"https:\/\/teddysun.com\/245.html\" target=\"_blank\" rel=\"noreferrer noopener\">Linux\u6027\u80fd\u6d4b\u8bd5UnixBench\u4e00\u952e\u811a\u672c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u5b89\u88c5\u7684Linux\u7cfb\u7edf\uff0c\u5efa\u8bae\u5b89\u88c5\u597d\u540e\uff0c\u8fd0\u884c3\u4e2abench\u6d4b\u8bd5\u547d\u4ee4\u3002 \u9700\u8981\u6709\u5916\u7f51\u652f\u6301\uff0c\u56e0\u4e3a\u8981\u6d4b\u8bd5\u4e00\u4e0b\u7f51\u7edc\u901f\u5ea6\uff0c\u7528 &hellip; <a href=\"https:\/\/superfreeboy.tech\/index.php\/2022\/05\/15\/%e6%96%b0%e5%ae%89%e8%a3%85%e7%9a%84linux%e7%b3%bb%e7%bb%9f%e5%bb%ba%e8%ae%aebench%e5%91%bd%e4%bb%a4\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u65b0\u5b89\u88c5\u7684Linux\u7cfb\u7edf\u5efa\u8baeBench\u547d\u4ee4<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":6,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/superfreeboy.tech\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}