{"id":1809,"date":"2024-02-24T13:23:18","date_gmt":"2024-02-24T13:23:18","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=1809"},"modified":"2024-02-27T00:37:18","modified_gmt":"2024-02-27T00:37:18","slug":"cython-bench","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/cython-bench\/","title":{"rendered":"cython-bench"},"content":{"rendered":"\n<p>A quick running example of the cython interpeter using the n-queens workload. The test is single-threaded and runs in ~20 seconds.<\/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-62.png\" alt=\"\" class=\"wp-image-1813\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-62.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-62-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-62-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile suggests a high retirement rate and some backend stalls<\/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-64.png\" alt=\"\" class=\"wp-image-1815\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-64.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-64-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-64-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show little floating point and high backend stalls<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              67.939\non_cpu               0.049          # 0.78 \/ 16 cores\nutime                52.314\nstime                0.756\nnvcsw                2051           # 83.07%\nnivcsw               418            # 16.93%\ninblock              32             # 0.47\/sec\nonblock              12792          # 188.29\/sec\ncpu-clock            53091178724    # 53.091 seconds\ntask-clock           53093891724    # 53.094 seconds\npage faults          150769         # 2839.668\/sec\ncontext switches     2635           # 49.629\/sec\ncpu migrations       285            # 5.368\/sec\nmajor page faults    2              # 0.038\/sec\nminor page faults    150767         # 2839.630\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             170004081415   # 211.601 branches per 1000 inst\nbranch misses        1305434728     # 0.77% branch miss\nconditional          124187206181   # 154.573 conditional branches per 1000 inst\nindirect             13921946370    # 17.328 indirect branches per 1000 inst\ncpu-cycles           1046008726399  # 0.23 GHz\ninstructions         3443358962832  # 3.29 IPC high\nslots                2098017000798  #\nretiring             1155054414132  # 55.1% (55.1%) high\n-- ucode             673958914      #     0.0%\n-- fastpath          1154380455218  #    55.0%\nfrontend             413292672034   # 19.7% (19.7%)\n-- latency           245604816006   #    11.7%\n-- bandwidth         167687856028   #     8.0%\nbackend              314355791717   # 15.0% (15.0%) low\n-- cpu               59950768323    #     2.9%\n-- memory            254405023394   #    12.1%\nspeculation          215245053961   # 10.3% (10.3%) high\n-- branch mispredict 174245301803   #     8.3%\n-- pipeline restart  40999752158    #     2.0%\nsmt-contention       68804656       #  0.0% ( 0.0%)\ncpu-cycles           247390165646   # 0.22 GHz\ninstructions         799729473282   # 3.23 IPC high\ninstructions         267707014735   # 1.746 l2 access per 1000 inst\nl2 hit from l1       450707306      # 4.58% l2 miss\nl2 miss from l1      11826992       #\nl2 hit from l2 pf    7245387        #\nl3 hit from l2 pf    3928618        #\nl3 miss from l2 pf   5639194        #\ninstructions         267252045787   # 11.900 float per 1000 inst\nfloat 512            63             # 0.000 AVX-512 per 1000 inst\nfloat 256            628            # 0.000 AVX-256 per 1000 inst\nfloat 128            3180169924     # 11.900 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         6              # 0.000 scalar per 1000 inst\ninstructions         2692907        #\nopcache              999972         # 371.336 opcache per 1000 inst\nopcache miss         537113         # 53.7% opcache miss rate\nl1 dTLB miss         6208           # 2.305 L1 dTLB per 1000 inst\nl2 dTLB miss         1288           # 0.478 L2 dTLB per 1000 inst\ninstructions         2707712        #\nicache               1285731        # 474.840 icache per 1000 inst\nicache miss          109556         #  8.5% 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 metricfs<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              73.454\non_cpu               0.051          # 0.81 \/ 16 cores\nutime                59.236\nstime                0.413\nnvcsw                1417           # 80.28%\nnivcsw               348            # 19.72%\ninblock              648            # 8.82\/sec\nonblock              1360           # 18.51\/sec\ncpu-clock            59661572578    # 59.662 seconds\ntask-clock           59663943454    # 59.664 seconds\npage faults          132647         # 2223.236\/sec\ncontext switches     1964           # 32.918\/sec\ncpu migrations       247            # 4.140\/sec\nmajor page faults    4              # 0.067\/sec\nminor page faults    132643         # 2223.169\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             169463250010   # 210.583 branches per 1000 inst\nbranch misses        1238803250     # 0.73% branch miss\nconditional          169463260730   # 210.583 conditional branches per 1000 inst\nindirect             13917096254    # 17.294 indirect branches per 1000 inst\nslots                1358973405050  #\nretiring             764876383363   # 56.3% (56.3%) high\n-- ucode             58405381892    #     4.3%\n-- fastpath          706471001471   #    52.0%\nfrontend             270062862871   # 19.9% (19.9%)\n-- latency           106202662237   #     7.8%\n-- bandwidth         163860200634   #    12.1%\nbackend              102804963702   #  7.6% ( 7.6%) low\n-- cpu               93061163093    #     6.8%\n-- memory            9743800609     #     0.7%\nspeculation          219513323526   # 16.2% (16.2%) high\n-- branch mispredict 170335667921   #    12.5%\n-- pipeline restart  49177655605    #     3.6%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           225248160861   # 0.19 GHz\ninstructions         805041620058   # 3.57 IPC high\nl2 access            397729579      # 0.495 l2 access per 1000 inst\nl2 miss              83846088       # 21.08% l2 miss\ncpu-cycles           223534667994   #  4.5% memory latency\nload stalls          9976909069     #  4.0% l1 bound\nl1 miss              1008580401     #  0.3% l2 bound\nl2 miss              380699632      #  0.0% l3 bound\nl3 miss              276044977      #  0.1% dram bound\nstore_stalls         70230668       #  0.0% store bound\n<\/code><\/pre>\n\n\n\n<p>Process summary shows this driven as a python process<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>355 processes\n\t  4 python3                 51.85     0.00\n\t 68 clinfo                  20.84     5.66\n\t 38 vulkaninfo               1.14     1.71\n\t  6 glxinfo:gdrv0            0.16     0.06\n\t  6 glxinfo:gl0              0.16     0.06\n\t  4 vulkani:disk$0           0.12     0.19\n\t  2 glxinfo                  0.08     0.02\n\t  2 glxinfo:cs0              0.08     0.02\n\t  2 glxinfo:disk$0           0.08     0.02\n\t  2 glxinfo:sh0              0.08     0.02\n\t  2 glxinfo:shlo0            0.08     0.02\n\t  2 llvmpipe-0               0.06     0.10\n\t  2 llvmpipe-1               0.06     0.10\n\t  2 llvmpipe-10              0.06     0.10\n\t  2 llvmpipe-11              0.06     0.10\n\t  2 llvmpipe-12              0.06     0.10\n\t  2 llvmpipe-13              0.06     0.10\n\t  2 llvmpipe-14              0.06     0.10\n\t  2 llvmpipe-15              0.06     0.10\n\t  2 llvmpipe-2               0.06     0.10\n\t  2 llvmpipe-3               0.06     0.10\n\t  2 llvmpipe-4               0.06     0.10\n\t  2 llvmpipe-5               0.06     0.10\n\t  2 llvmpipe-6               0.06     0.10\n\t  2 llvmpipe-7               0.06     0.10\n\t  2 llvmpipe-8               0.06     0.10\n\t  2 llvmpipe-9               0.06     0.10\n\t  6 php                      0.06     0.07\n\t  6 clang                    0.03     0.09\n\t  3 rocminfo                 0.03     0.03\n\t  1 lspci                    0.01     0.02\n\t  1 ps                       0.00     0.01\n\t 83 sh                       0.00     0.00\n\t 12 gcc                      0.00     0.00\n\t 10 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 phoronix-test-s          0.00     0.00\n\t  4 gmain                    0.00     0.00\n\t  3 cython-bench             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 cc                       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 python                   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 block<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      756108) cython-bench     cpu=7 start=5.54  finish=22.51\n        756109) python3          cpu=1 start=5.54  finish=22.50\n      756113) cython-bench     cpu=1 start=26.51 finish=43.62\n        756114) python3          cpu=2 start=26.51 finish=43.62\n      756115) cython-bench     cpu=9 start=47.62 finish=65.43\n        756116) python3          cpu=10 start=47.62 finish=65.42\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A quick running example of the cython interpeter using the n-queens workload. The test is single-threaded and runs in ~20 seconds. Topdown profile suggests a high retirement rate and some backend stalls AMD metrics show little floating point and high <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/cython-bench\/\"><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-1809","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1809","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=1809"}],"version-history":[{"count":3,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1809\/revisions"}],"predecessor-version":[{"id":1826,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1809\/revisions\/1826"}],"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=1809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}