{"id":1330,"date":"2024-02-03T08:36:24","date_gmt":"2024-02-03T08:36:24","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=1330"},"modified":"2024-02-03T13:33:37","modified_gmt":"2024-02-03T13:33:37","slug":"sysbench","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/sysbench\/","title":{"rendered":"sysbench"},"content":{"rendered":"\n<p>A set of memory and CPU tests. This has first a memory test and then a CPU test. The memory test comes first and the CPU test takes most of the time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-16.png\" alt=\"\" class=\"wp-image-1351\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-16.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-16-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-16-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile shows the CPU test is backend bound.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-16.png\" alt=\"\" class=\"wp-image-1353\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-16.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-16-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-16-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show this as floating point code with backend stalls being more CPU than memory. There is a low L2 rate as most accesses fit in L1.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              318.150\non_cpu               0.893          # 14.29 \/ 16 cores\nutime                4546.117\nstime                1.176\nnvcsw                2211           # 4.70%\nnivcsw               44878          # 95.30%\ninblock              0              # 0.00\/sec\nonblock              12984          # 40.81\/sec\ncpu-clock            4547529047867  # 4547.529 seconds\ntask-clock           4547548645723  # 4547.549 seconds\npage faults          150869         # 33.176\/sec\ncontext switches     48496          # 10.664\/sec\ncpu migrations       330            # 0.073\/sec\nmajor page faults    2              # 0.000\/sec\nminor page faults    150867         # 33.175\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             4509035218056  # 275.955 branches per 1000 inst\nbranch misses        41052746888    # 0.91% branch miss\nconditional          4434057385448  # 271.366 conditional branches per 1000 inst\nindirect             3650964459     # 0.223 indirect branches per 1000 inst\ncpu-cycles           20286644922558 # 3.98 GHz\ninstructions         16333686165655 # 0.81 IPC\nslots                40583276052510 #\nretiring             5952640163865  # 14.7% (25.0%)\n-- ucode             574233522      #     0.0%\n-- fastpath          5952065930343  #    14.7%\nfrontend             2295572979168  #  5.7% ( 9.6%)\n-- latency           1541791413666  #     3.8%\n-- bandwidth         753781565502   #     1.9%\nbackend              14623772638291 # 36.0% (61.4%)\n-- cpu               13029400704166 #    32.1%\n-- memory            1594371934125  #     3.9%\nspeculation          933970984068   #  2.3% ( 3.9%)\n-- branch mispredict 933670914512   #     2.3%\n-- pipeline restart  300069556      #     0.0%\nsmt-contention       16777253299166 # 41.3% ( 0.0%)\ncpu-cycles           20277214461736 # 3.98 GHz\ninstructions         16319112563208 # 0.80 IPC\ninstructions         5442464918288  # 0.878 l2 access per 1000 inst\nl2 hit from l1       3479910387     # 49.31% l2 miss\nl2 miss from l1      2191772908     #\nl2 hit from l2 pf    1134041742     #\nl3 hit from l2 pf    159382060      #\nl3 miss from l2 pf   5055763        #\ninstructions         5432886320488  # 271.128 float per 1000 inst\nfloat 512            49             # 0.000 AVX-512 per 1000 inst\nfloat 256            596            # 0.000 AVX-256 per 1000 inst\nfloat 128            1473007842843  # 271.128 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst\ninstructions         2671438        #\nopcache              1001870        # 375.030 opcache per 1000 inst\nopcache miss         539210         # 53.8% opcache miss rate\nl1 dTLB miss         4934           # 1.847 L1 dTLB per 1000 inst\nl2 dTLB miss         1021           # 0.382 L2 dTLB per 1000 inst\ninstructions         2700534        #\nicache               1322141        # 489.585 icache per 1000 inst\nicache miss          112458         #  8.5% icache miss rate\nl1 iTLB miss         12             # 0.004 L1 iTLB per 1000 inst\nl2 iTLB miss         0              # 0.000 L2 iTLB per 1000 inst\ntlb flush            18             # 0.007 TLB flush per 1000 inst\n<\/code><\/pre>\n\n\n\n<p>Intel metrics<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              323.157\non_cpu               0.893          # 14.28 \/ 16 cores\nutime                4614.028\nstime                0.661\nnvcsw                2098           # 5.09%\nnivcsw               39085          # 94.91%\ninblock              2392           # 7.40\/sec\nonblock              1744           # 5.40\/sec\ncpu-clock            4614872820140  # 4614.873 seconds\ntask-clock           4614882380814  # 4614.882 seconds\npage faults          140145         # 30.368\/sec\ncontext switches     42620          # 9.235\/sec\ncpu migrations       389            # 0.084\/sec\nmajor page faults    10             # 0.002\/sec\nminor page faults    140135         # 30.366\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             3592126070177  # 274.868 branches per 1000 inst\nbranch misses        31898610274    # 0.89% branch miss\nconditional          3592126085473  # 274.868 conditional branches per 1000 inst\nindirect             813197327537   # 62.225 indirect branches per 1000 inst\nslots                25742466242486 #\nretiring             6494217835209  # 25.2% (25.2%)\n-- ucode             1982226024440  #     7.7%\n-- fastpath          4511991810769  #    17.5%\nfrontend             7403793894969  # 28.8% (28.8%)\n-- latency           4756534183752  #    18.5%\n-- bandwidth         2647259711217  #    10.3%\nbackend              10302130934074 # 40.0% (40.0%)\n-- cpu               8840040321069  #    34.3%\n-- memory            1462090613005  #     5.7%\nspeculation          1564631639172  #  6.1% ( 6.1%)\n-- branch mispredict 1564486375695  #     6.1%\n-- pipeline restart  145263477      #     0.0%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           9023096818342  # 1.75 GHz\ninstructions         5280492351738  # 0.59 IPC low\nl2 access            3639456597     # 0.731 l2 access per 1000 inst\nl2 miss              3379895174     # 92.87% l2 miss\n<\/code><\/pre>\n\n\n\n<p>Process overview<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>458 processes\n\t108 sysbench             77270.71     2.89\n\t 68 clinfo                  18.20     4.42\n\t 38 vulkaninfo               1.11     1.15\n\t  4 vulkani:disk$0           0.12     0.13\n\t  6 glxinfo:gdrv0            0.08     0.05\n\t  6 glxinfo:gl0              0.08     0.05\n\t  6 php                      0.07     0.07\n\t  2 llvmpipe-0               0.06     0.07\n\t  2 llvmpipe-1               0.06     0.07\n\t  2 llvmpipe-10              0.06     0.07\n\t  2 llvmpipe-11              0.06     0.07\n\t  2 llvmpipe-12              0.06     0.07\n\t  2 llvmpipe-13              0.06     0.07\n\t  2 llvmpipe-14              0.06     0.07\n\t  2 llvmpipe-15              0.06     0.07\n\t  2 llvmpipe-2               0.06     0.07\n\t  2 llvmpipe-3               0.06     0.07\n\t  2 llvmpipe-4               0.06     0.07\n\t  2 llvmpipe-5               0.06     0.07\n\t  2 llvmpipe-6               0.06     0.07\n\t  2 llvmpipe-7               0.06     0.07\n\t  2 llvmpipe-8               0.06     0.07\n\t  2 llvmpipe-9               0.06     0.07\n\t  2 glxinfo                  0.06     0.04\n\t  6 clang                    0.05     0.07\n\t  2 glxinfo:cs0              0.05     0.03\n\t  2 glxinfo:disk$0           0.05     0.03\n\t  2 glxinfo:shlo0            0.05     0.03\n\t  2 glxinfo:sh0              0.04     0.03\n\t  1 lspci                    0.01     0.02\n\t  3 rocminfo                 0.00     0.03\n\t  1 ps                       0.00     0.01\n\t 84 sh                       0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t  9 gsettings                0.00     0.00\n\t  8 stat                     0.00     0.00\n\t  8 systemd-detect-          0.00     0.00\n\t  6 llvm-link                0.00     0.00\n\t  5 gmain                    0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  2 cc                       0.00     0.00\n\t  2 dconf worker             0.00     0.00\n\t  2 lscpu                    0.00     0.00\n\t  2 uname                    0.00     0.00\n\t  2 which                    0.00     0.00\n\t  2 xset                     0.00     0.00\n\t  1 date                     0.00     0.00\n\t  1 dirname                  0.00     0.00\n\t  1 dmesg                    0.00     0.00\n\t  1 dmidecode                0.00     0.00\n\t  1 grep                     0.00     0.00\n\t  1 ifconfig                 0.00     0.00\n\t  1 ip                       0.00     0.00\n\t  1 lsmod                    0.00     0.00\n\t  1 mktemp                   0.00     0.00\n\t  1 qdbus                    0.00     0.00\n\t  1 readlink                 0.00     0.00\n\t  1 realpath                 0.00     0.00\n\t  1 sed                      0.00     0.00\n\t  1 sort                     0.00     0.00\n\t  1 stty                     0.00     0.00\n\t  1 systemctl                0.00     0.00\n\t  1 template.sh              0.00     0.00\n\t  1 wc                       0.00     0.00\n\t  1 xrandr                   0.00     0.00\n0 processes running\n47 maximum processes\n<\/code><\/pre>\n\n\n\n<p>Example computation blocks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      226573) sysbench         cpu=13 start=5.50  finish=10.22\n        226574) sysbench         cpu=4 start=5.50  finish=10.22\n          226575) sysbench         cpu=6 start=5.50  finish=10.22\n          226576) sysbench         cpu=7 start=5.50  finish=10.22\n          226577) sysbench         cpu=1 start=5.50  finish=10.22\n          226578) sysbench         cpu=2 start=5.50  finish=10.21\n          226579) sysbench         cpu=15 start=5.50  finish=10.22\n          226580) sysbench         cpu=13 start=5.50  finish=10.22\n          226581) sysbench         cpu=11 start=5.50  finish=10.22\n          226582) sysbench         cpu=5 start=5.50  finish=10.22\n          226583) sysbench         cpu=4 start=5.50  finish=10.22\n          226584) sysbench         cpu=10 start=5.50  finish=10.21\n          226585) sysbench         cpu=8 start=5.50  finish=10.21\n          226586) sysbench         cpu=3 start=5.50  finish=10.22\n          226587) sysbench         cpu=12 start=5.50  finish=10.22\n          226588) sysbench         cpu=0 start=5.50  finish=10.21\n          226589) sysbench         cpu=14 start=5.50  finish=10.22\n          226590) sysbench         cpu=9 start=5.50  finish=10.22\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A set of memory and CPU tests. This has first a memory test and then a CPU test. The memory test comes first and the CPU test takes most of the time. Topdown profile shows the CPU test is backend <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/sysbench\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":58,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1330","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":3,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1330\/revisions"}],"predecessor-version":[{"id":1354,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1330\/revisions\/1354"}],"up":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/58"}],"wp:attachment":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/media?parent=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}