{"id":2049,"date":"2024-03-07T12:55:03","date_gmt":"2024-03-07T12:55:03","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=2049"},"modified":"2024-03-07T12:55:04","modified_gmt":"2024-03-07T12:55:04","slug":"nettle","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/nettle\/","title":{"rendered":"nettle"},"content":{"rendered":"\n<p>Testing a cryptographic library. The test is single-threaded and runs quickly.<\/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\/03\/systemtime-26.png\" alt=\"\" class=\"wp-image-2050\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/systemtime-26.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/systemtime-26-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/systemtime-26-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile has sparse output but some sections with higher 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\/03\/amdtopdown-26.png\" alt=\"\" class=\"wp-image-2051\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/amdtopdown-26.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/amdtopdown-26-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/03\/amdtopdown-26-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics suggest more cpu-stalls than memory stalls.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              94.220\non_cpu               0.017          # 0.27 \/ 16 cores\nutime                24.435\nstime                0.831\nnvcsw                1618           # 84.71%\nnivcsw               292            # 15.29%\ninblock              0              # 0.00\/sec\nonblock              14016          # 148.76\/sec\ncpu-clock            25298928290    # 25.299 seconds\ntask-clock           25302154587    # 25.302 seconds\npage faults          149643         # 5914.239\/sec\ncontext switches     2182           # 86.238\/sec\ncpu migrations       223            # 8.813\/sec\nmajor page faults    2              # 0.079\/sec\nminor page faults    149641         # 5914.160\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             12740465932    # 43.051 branches per 1000 inst\nbranch misses        86402205       # 0.68% branch miss\nconditional          9430797976     # 31.867 conditional branches per 1000 inst\nindirect             794097045      # 2.683 indirect branches per 1000 inst\ncpu-cycles           99053264199    # 0.07 GHz\ninstructions         293958110541   # 2.97 IPC\nslots                201017705694   #\nretiring             107853876305   # 53.7% (53.7%)\n-- ucode             2437762483     #     1.2%\n-- fastpath          105416113822   #    52.4%\nfrontend             12455300921    #  6.2% ( 6.2%)\n-- latency           4433151924     #     2.2%\n-- bandwidth         8022148997     #     4.0%\nbackend              80056377689    # 39.8% (39.8%)\n-- cpu               66843608534    #    33.3%\n-- memory            13212769155    #     6.6%\nspeculation          642511928      #  0.3% ( 0.3%) low\n-- branch mispredict 635813643      #     0.3%\n-- pipeline restart  6698285        #     0.0%\nsmt-contention       9414965        #  0.0% ( 0.0%)\ncpu-cycles           99031464468    # 0.07 GHz\ninstructions         294049097735   # 2.97 IPC\ninstructions         98761582757    # 1.350 l2 access per 1000 inst\nl2 hit from l1       114558171      # 17.55% l2 miss\nl2 miss from l1      13343998       #\nl2 hit from l2 pf    8732172        #\nl3 hit from l2 pf    4360538        #\nl3 miss from l2 pf   5701902        #\ninstructions         98703762781    # 465.071 float per 1000 inst\nfloat 512            59             # 0.000 AVX-512 per 1000 inst\nfloat 256            434            # 0.000 AVX-256 per 1000 inst\nfloat 128            45904276555    # 465.071 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst\ninstructions         295851927697   #\nopcache              24579101623    # 83.079 opcache per 1000 inst\nopcache miss         607511905      #  2.5% opcache miss rate\nl1 dTLB miss         26086132       # 0.088 L1 dTLB per 1000 inst\nl2 dTLB miss         4936000        # 0.017 L2 dTLB per 1000 inst\ninstructions         295862657534   #\nicache               1326635578     # 4.484 icache per 1000 inst\nicache miss          169783857      # 12.8% icache miss rate\nl1 iTLB miss         9336024        # 0.032 L1 iTLB per 1000 inst\nl2 iTLB miss         0              # 0.000 L2 iTLB per 1000 inst\ntlb flush            17842          # 0.000 TLB flush per 1000 inst\n<\/code><\/pre>\n\n\n\n<p>Intel metrics confirm floating point code with little l2 access.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              93.642\non_cpu               0.017          # 0.27 \/ 16 cores\nutime                24.866\nstime                0.434\nnvcsw                1478           # 87.61%\nnivcsw               209            # 12.39%\ninblock              16             # 0.17\/sec\nonblock              2736           # 29.22\/sec\ncpu-clock            25324784526    # 25.325 seconds\ntask-clock           25328463591    # 25.328 seconds\npage faults          136213         # 5377.863\/sec\ncontext switches     1965           # 77.581\/sec\ncpu migrations       272            # 10.739\/sec\nmajor page faults    0              # 0.000\/sec\nminor page faults    136213         # 5377.863\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             13320342900    # 42.997 branches per 1000 inst\nbranch misses        29709033       # 0.22% branch miss\nconditional          13320354356    # 42.997 conditional branches per 1000 inst\nindirect             957564149      # 3.091 indirect branches per 1000 inst\nslots                568223492150   #\nretiring             310611767324   # 54.7% (54.7%) high\n-- ucode             8196156117     #     1.4%\n-- fastpath          302415611207   #    53.2%\nfrontend             23950086249    #  4.2% ( 4.2%) low\n-- latency           5362441166     #     0.9%\n-- bandwidth         18587645083    #     3.3%\nbackend              230251712207   # 40.5% (40.5%)\n-- cpu               212720773829   #    37.4%\n-- memory            17530938378    #     3.1%\nspeculation          4451426739     #  0.8% ( 0.8%) low\n-- branch mispredict 4284503346     #     0.8%\n-- pipeline restart  166923393      #     0.0%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           94690767500    # 0.06 GHz\ninstructions         309962466792   # 3.27 IPC high\nl2 access            255595421      # 0.825 l2 access per 1000 inst\nl2 miss              80138123       # 31.35% l2 miss\ncpu-cycles           94563596930    #  4.1% memory latency\nload stalls          3773421162     #  3.3% l1 bound\nl1 miss              637484752      #  0.4% l2 bound\nl2 miss              292673964      #  0.1% l3 bound\nl3 miss              193375032      #  0.2% dram bound\nstore_stalls         76788507       #  0.1% store bound\n<\/code><\/pre>\n\n\n\n<p>Process overview shows benchmark overhead nearly as high as the nettle-benchmark process.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>360 processes\n\t 12 nettle-benchmar         23.32     0.00\n\t 68 clinfo                  19.76     6.66\n\t 38 vulkaninfo               1.86     1.14\n\t  4 vulkani:disk$0           0.19     0.12\n\t  2 llvmpipe-0               0.10     0.06\n\t  2 llvmpipe-1               0.10     0.06\n\t  2 llvmpipe-10              0.10     0.06\n\t  2 llvmpipe-11              0.10     0.06\n\t  2 llvmpipe-12              0.10     0.06\n\t  2 llvmpipe-13              0.10     0.06\n\t  2 llvmpipe-14              0.10     0.06\n\t  2 llvmpipe-15              0.10     0.06\n\t  2 llvmpipe-2               0.10     0.06\n\t  2 llvmpipe-3               0.10     0.06\n\t  2 llvmpipe-4               0.10     0.06\n\t  2 llvmpipe-5               0.10     0.06\n\t  2 llvmpipe-6               0.10     0.06\n\t  2 llvmpipe-7               0.10     0.06\n\t  2 llvmpipe-8               0.10     0.06\n\t  2 llvmpipe-9               0.10     0.06\n\t  6 php                      0.07     0.12\n\t  6 clang                    0.05     0.07\n\t  3 rocminfo                 0.00     0.03\n\t  1 lspci                    0.00     0.03\n\t 89 sh                       0.00     0.00\n\t 14 gsettings                0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 12 nettle                   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 glxinfo                  0.00     0.00\n\t  2 cc                       0.00     0.00\n\t  2 lscpu                    0.00     0.00\n\t  2 setterm                  0.00     0.00\n\t  2 uname                    0.00     0.00\n\t  2 which                    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 gmain                    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 ps                       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\n0 processes running\n47 maximum processes\n<\/code><\/pre>\n\n\n\n<p>Computation blocks<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      1025300) nettle           cpu=8 start=5.52  finish=9.66 \n        1025301) nettle-benchmar  cpu=15 start=5.53  finish=9.65 \n      1025302) nettle           cpu=4 start=13.66 finish=17.81\n        1025303) nettle-benchmar  cpu=13 start=13.66 finish=17.81\n      1025304) nettle           cpu=11 start=21.82 finish=25.97\n        1025305) nettle-benchmar  cpu=12 start=21.82 finish=25.97\n      1025306) sh               cpu=11 start=25.97 finish=25.97\n        1025307) sh               cpu=12 start=25.97 finish=25.97\n      1025309) nettle           cpu=3 start=36.17 finish=37.55\n        1025310) nettle-benchmar  cpu=4 start=36.17 finish=37.55\n      1025311) nettle           cpu=3 start=41.56 finish=42.92\n        1025312) nettle-benchmar  cpu=4 start=41.56 finish=42.92\n      1025313) nettle           cpu=3 start=46.93 finish=48.29\n        1025314) nettle-benchmar  cpu=12 start=46.93 finish=48.29\n      1025315) sh               cpu=3 start=48.29 finish=48.29\n        1025316) sh               cpu=12 start=48.29 finish=48.29\n      1025317) nettle           cpu=3 start=58.48 finish=60.51\n        1025318) nettle-benchmar  cpu=12 start=58.49 finish=60.51\n      1025319) nettle           cpu=11 start=64.51 finish=66.51\n        1025320) nettle-benchmar  cpu=12 start=64.52 finish=66.51\n      1025321) nettle           cpu=11 start=70.52 finish=72.52\n        1025322) nettle-benchmar  cpu=12 start=70.52 finish=72.52\n      1025323) sh               cpu=11 start=72.52 finish=72.52\n        1025324) sh               cpu=12 start=72.52 finish=72.52\n      1025325) nettle           cpu=3 start=82.71 finish=83.00\n        1025326) nettle-benchmar  cpu=5 start=82.71 finish=83.00\n      1025327) nettle           cpu=3 start=87.00 finish=87.29\n        1025328) nettle-benchmar  cpu=4 start=87.00 finish=87.29\n      1025329) nettle           cpu=3 start=91.29 finish=91.58\n        1025330) nettle-benchmar  cpu=12 start=91.30 finish=91.58\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Testing a cryptographic library. The test is single-threaded and runs quickly. Topdown profile has sparse output but some sections with higher backend stalls. AMD metrics suggest more cpu-stalls than memory stalls. Intel metrics confirm floating point code with little l2 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/nettle\/\"><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-2049","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/2049","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=2049"}],"version-history":[{"count":1,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/2049\/revisions"}],"predecessor-version":[{"id":2052,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/2049\/revisions\/2052"}],"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=2049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}