{"id":1442,"date":"2024-02-03T23:17:18","date_gmt":"2024-02-03T23:17:18","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=1442"},"modified":"2024-02-05T09:21:03","modified_gmt":"2024-02-05T09:21:03","slug":"asmfish","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/asmfish\/","title":{"rendered":"asmfish"},"content":{"rendered":"\n<p>asmfish is a chess benchmark written in assembly. Looks like a multi-threaded program.<\/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-27.png\" alt=\"\" class=\"wp-image-1536\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-27.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-27-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-27-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile shows a moderate branch misprediction with backend stalls slightly higher but otherwise retirement rate, frontend stalls are similar.<\/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-28.png\" alt=\"\" class=\"wp-image-1537\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-28.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-28-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-28-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show  little floating point and not large L2 access.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              1517.211\non_cpu               0.966          # 15.46 \/ 16 cores\nutime                23445.332\nstime                9.755\nnvcsw                9771           # 3.61%\nnivcsw               260577         # 96.39%\ninblock              0              # 0.00\/sec\nonblock              13808          # 9.10\/sec\ncpu-clock            23457218382276 # 23457.218 seconds\ntask-clock           23457430457602 # 23457.430 seconds\npage faults          2947383        # 125.648\/sec\ncontext switches     277731         # 11.840\/sec\ncpu migrations       500            # 0.021\/sec\nmajor page faults    2              # 0.000\/sec\nminor page faults    2947381        # 125.648\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             11158947860856 # 97.540 branches per 1000 inst\nbranch misses        797121864946   # 7.14% branch miss\nconditional          9591696591582  # 83.841 conditional branches per 1000 inst\nindirect             156117278624   # 1.365 indirect branches per 1000 inst\ncpu-cycles           28452192694276 # 3.76 GHz\ninstructions         35324580453604 # 1.24 IPC\nslots                56921922062802 #\nretiring             11727272498088 # 20.6% (29.0%)\n-- ucode             57437721       #     0.0%\n-- fastpath          11727215060367 #    20.6%\nfrontend             12143947085186 # 21.3% (30.0%)\n-- latency           8533709194308  #    15.0%\n-- bandwidth         3610237890878  #     6.3%\nbackend              13587847031014 # 23.9% (33.6%)\n-- cpu               2286483490267  #     4.0%\n-- memory            11301363540747 #    19.9%\nspeculation          2968536513516  #  5.2% ( 7.3%)\n-- branch mispredict 2960092527472  #     5.2%\n-- pipeline restart  8443986044     #     0.0%\nsmt-contention       16494268066111 # 29.0% ( 0.0%)\ncpu-cycles           27259117483983 # 3.75 GHz\ninstructions         33857638783348 # 1.24 IPC\ninstructions         11290650453951 # 22.456 l2 access per 1000 inst\nl2 hit from l1       225708480194   # 13.35% l2 miss\nl2 miss from l1      19383607205    #\nl2 hit from l2 pf    13370004613    #\nl3 hit from l2 pf    9348355650     #\nl3 miss from l2 pf   5119969690     #\ninstructions         11285364506585 # 11.949 float per 1000 inst\nfloat 512            36             # 0.000 AVX-512 per 1000 inst\nfloat 256            656            # 0.000 AVX-256 per 1000 inst\nfloat 128            134852943514   # 11.949 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst\ninstructions         2663101        #\nopcache              991121         # 372.168 opcache per 1000 inst\nopcache miss         535343         # 54.0% opcache miss rate\nl1 dTLB miss         5371           # 2.017 L1 dTLB per 1000 inst\nl2 dTLB miss         1131           # 0.425 L2 dTLB per 1000 inst\ninstructions         2695530        #\nicache               1308533        # 485.446 icache per 1000 inst\nicache miss          109091         #  8.3% icache miss rate\nl1 iTLB miss         11             # 0.004 L1 iTLB per 1000 inst\nl2 iTLB miss         0              # 0.000 L2 iTLB per 1000 inst\ntlb flush            19             # 0.007 TLB flush per 1000 inst\n<\/code><\/pre>\n\n\n\n<p>Intel metrics have high branch misprediction stalls<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              930.067\non_cpu               0.973          # 15.57 \/ 16 cores\nutime                14480.756\nstime                2.824\nnvcsw                5694           # 4.96%\nnivcsw               109065         # 95.04%\ninblock              600            # 0.65\/sec\nonblock              1632           # 1.75\/sec\ncpu-clock            14484109292573 # 14484.109 seconds\ntask-clock           14484179405678 # 14484.179 seconds\npage faults          1535742        # 106.029\/sec\ncontext switches     119234         # 8.232\/sec\ncpu migrations       363            # 0.025\/sec\nmajor page faults    20             # 0.001\/sec\nminor page faults    1535722        # 106.028\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             5431797354548  # 97.615 branches per 1000 inst\nbranch misses        419390430460   # 7.72% branch miss\nconditional          5431797369236  # 97.615 conditional branches per 1000 inst\nindirect             1387301717460  # 24.931 indirect branches per 1000 inst\nslots                45263131107686 #\nretiring             18196158114810 # 40.2% (40.2%)\n-- ucode             1298337179576  #     2.9%\n-- fastpath          16897820935234 #    37.3%\nfrontend             13104919029834 # 29.0% (29.0%)\n-- latency           5908075894258  #    13.1%\n-- bandwidth         7196843135576  #    15.9%\nbackend              5277515617044  # 11.7% (11.7%) low\n-- cpu               2851022639365  #     6.3%\n-- memory            2426492977679  #     5.4%\nspeculation          8913974754817  # 19.7% (19.7%) high\n-- branch mispredict 8854096911089  #    19.6%\n-- pipeline restart  59877843728    #     0.1%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           15327163008989 # 1.63 GHz\ninstructions         18311970348982 # 1.19 IPC\nl2 access            304702922646   # 18.131 l2 access per 1000 inst\nl2 miss              87356480707    # 28.67% l2 miss\ncpu-cycles           14238711708962 # 22.3% memory latency\nload stalls          3165555352508  #  4.5% l1 bound\nl1 miss              2528396934647  #  9.1% l2 bound\nl2 miss              1232314608415  #  2.3% l3 bound\nl3 miss              905266872587   #  6.4% dram bound\nstore_stalls         13992828017    #  0.1% store bound\n<\/code><\/pre>\n\n\n\n<p>Process overview shows asmFish_2018-0 as the primary process<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>402 processes\n\t 51 asmFishL_2018-0      119149.43    34.29\n\t 68 clinfo                  18.19     4.32\n\t 38 vulkaninfo               1.13     1.14\n\t  4 vulkani:disk$0           0.12     0.12\n\t  6 glxinfo:gdrv0            0.09     0.08\n\t  6 glxinfo:gl0              0.09     0.08\n\t  6 php                      0.08     0.10\n\t  2 llvmpipe-0               0.06     0.06\n\t  2 llvmpipe-1               0.06     0.06\n\t  2 llvmpipe-10              0.06     0.06\n\t  2 llvmpipe-11              0.06     0.06\n\t  2 llvmpipe-12              0.06     0.06\n\t  2 llvmpipe-13              0.06     0.06\n\t  2 llvmpipe-14              0.06     0.06\n\t  2 llvmpipe-15              0.06     0.06\n\t  2 llvmpipe-2               0.06     0.06\n\t  2 llvmpipe-3               0.06     0.06\n\t  2 llvmpipe-4               0.06     0.06\n\t  2 llvmpipe-5               0.06     0.06\n\t  2 llvmpipe-6               0.06     0.06\n\t  2 llvmpipe-7               0.06     0.06\n\t  2 llvmpipe-8               0.06     0.06\n\t  2 llvmpipe-9               0.06     0.06\n\t  6 clang                    0.06     0.05\n\t  2 glxinfo                  0.05     0.04\n\t  2 glxinfo:cs0              0.05     0.04\n\t  2 glxinfo:disk$0           0.05     0.04\n\t  2 glxinfo:sh0              0.05     0.04\n\t  2 glxinfo:shlo0            0.05     0.04\n\t  3 rocminfo                 0.03     0.00\n\t  1 lspci                    0.00     0.02\n\t  1 ps                       0.00     0.01\n\t 81 sh                       0.00     0.00\n\t 12 gcc                      0.00     0.00\n\t 11 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 asmfish                  0.00     0.00\n\t  6 llvm-link                0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  4 gmain                    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 cc                       0.00     0.00\n\t  1 date                     0.00     0.00\n\t  1 dconf worker             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>Computation blocks look as follows<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      574325) asmfish          cpu=11 start=5.60  finish=153.30\n        574326) asmfish          cpu=4 start=5.61  finish=5.61 \n        574327) asmFishL_2018-0  cpu=7 start=5.61  finish=153.30\n          574328) asmFishL_2018-0  cpu=10 start=5.65  finish=153.20\n          574329) asmFishL_2018-0  cpu=4 start=5.66  finish=153.20\n          574330) asmFishL_2018-0  cpu=13 start=5.66  finish=153.20\n          574331) asmFishL_2018-0  cpu=14 start=5.66  finish=153.20\n          574332) asmFishL_2018-0  cpu=0 start=5.66  finish=153.20\n          574333) asmFishL_2018-0  cpu=9 start=5.66  finish=153.20\n          574334) asmFishL_2018-0  cpu=11 start=5.66  finish=153.20\n          574335) asmFishL_2018-0  cpu=15 start=5.66  finish=153.20\n          574336) asmFishL_2018-0  cpu=6 start=5.66  finish=153.20\n          574337) asmFishL_2018-0  cpu=12 start=5.66  finish=153.20\n          574338) asmFishL_2018-0  cpu=6 start=5.66  finish=153.20\n          574339) asmFishL_2018-0  cpu=8 start=5.66  finish=153.20\n          574340) asmFishL_2018-0  cpu=1 start=5.66  finish=153.20\n          574341) asmFishL_2018-0  cpu=3 start=5.66  finish=153.20\n          574342) asmFishL_2018-0  cpu=2 start=5.66  finish=153.20\n          574343) asmFishL_2018-0  cpu=5 start=5.66  finish=153.20\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>asmfish is a chess benchmark written in assembly. Looks like a multi-threaded program. Topdown profile shows a moderate branch misprediction with backend stalls slightly higher but otherwise retirement rate, frontend stalls are similar. AMD metrics show little floating point and <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/asmfish\/\"><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-1442","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1442","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=1442"}],"version-history":[{"count":3,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1442\/revisions"}],"predecessor-version":[{"id":1538,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1442\/revisions\/1538"}],"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=1442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}