{"id":848,"date":"2024-01-24T01:10:16","date_gmt":"2024-01-24T01:10:16","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=848"},"modified":"2024-01-24T12:17:26","modified_gmt":"2024-01-24T12:17:26","slug":"build-apache","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/build-apache\/","title":{"rendered":"build-apache"},"content":{"rendered":"\n<p>A test to see how long it takes to build the Apache web server. This is a quick running test taking barely 20 seconds. Curiosly, there seems to be a longer preparation phase before the actual run itself. The number of processes jumps to one per core but quickly subsides.<\/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\/01\/systemtime-58.png\" alt=\"\" class=\"wp-image-861\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-58.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-58-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-58-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile has not many data points but similar to longer compile tasks, shows high frontend stalls, low backend stalls and some branch misprediction.<\/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\/01\/amdtopdown-96.png\" alt=\"\" class=\"wp-image-863\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-96.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-96-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-96-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show low average core usage and a higher branch rate and low floating point.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              98.709\non_cpu               0.218          # 3.49 \/ 16 cores\nutime                269.463\nstime                74.576\nnvcsw                128086         # 77.48%\nnivcsw               37222          # 22.52%\ninblock              0              # 0.00\/sec\nonblock              1629544        # 16508.60\/sec\ncpu-clock            341915340657   # 341.915 seconds\ntask-clock           341967996158   # 341.968 seconds\npage faults          18121934       # 52993.070\/sec\ncontext switches     123710         # 361.759\/sec\ncpu migrations       15603          # 45.627\/sec\nmajor page faults    585            # 1.711\/sec\nminor page faults    18121349       # 52991.359\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             374441385412   # 207.520 branches per 1000 inst\nbranch misses        15615590319    # 4.17% branch miss\nconditional          280111516868   # 155.241 conditional branches per 1000 inst\nindirect             7813883654     # 4.331 indirect branches per 1000 inst\ncpu-cycles           1157635766897  # 0.75 GHz\ninstructions         1654738047826  # 1.43 IPC\nslots                2645984593044  #\nretiring             594985036813   # 22.5% (24.8%)\n-- ucode             1155211062     #     0.0%\n-- fastpath          593829825751   #    22.4%\nfrontend             1183642960436  # 44.7% (49.3%)\n-- latency           898569610236   #    34.0%\n-- bandwidth         285073350200   #    10.8%\nbackend              467675121362   # 17.7% (19.5%)\n-- cpu               80561842506    #     3.0%\n-- memory            387113278856   #    14.6%\nspeculation          153338780677   #  5.8% ( 6.4%)\n-- branch mispredict 152094004938   #     5.7%\n-- pipeline restart  1244775739     #     0.0%\nsmt-contention       246329182752   #  9.3% ( 0.0%)\ncpu-cycles           1154621150211  # 0.74 GHz\ninstructions         1651974059628  # 1.43 IPC\ninstructions         599605277727   # 39.737 l2 access per 1000 inst\nl2 hit from l1       20902642553    # 19.30% l2 miss\nl2 miss from l1      3121561041     #\nl2 hit from l2 pf    1446150089     #\nl3 hit from l2 pf    950195209      #\nl3 miss from l2 pf   527398315      #\ninstructions         598601713156   # 22.046 float per 1000 inst\nfloat 512            9555           # 0.000 AVX-512 per 1000 inst\nfloat 256            768984         # 0.001 AVX-256 per 1000 inst\nfloat 128            13195768961    # 22.044 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar 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              100.592\non_cpu               0.217          # 3.46 \/ 16 cores\nutime                299.667\nstime                48.816\nnvcsw                127406         # 79.33%\nnivcsw               33193          # 20.67%\ninblock              35664          # 354.54\/sec\nonblock              1618320        # 16087.89\/sec\ncpu-clock            345245303121   # 345.245 seconds\ntask-clock           345398781481   # 345.399 seconds\npage faults          18048003       # 52252.654\/sec\ncontext switches     119266         # 345.299\/sec\ncpu migrations       18706          # 54.158\/sec\nmajor page faults    318            # 0.921\/sec\nminor page faults    18047685       # 52251.733\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             360798284672   # 203.071 branches per 1000 inst\nbranch misses        9581421818     # 2.66% branch miss\nconditional          360799703072   # 203.072 conditional branches per 1000 inst\nindirect             48315109570    # 27.194 indirect branches per 1000 inst\nslots                3717598098686  #\nretiring             1201999512872  # 32.3% (32.3%)\n-- ucode             95577300356    #     2.6%\n-- fastpath          1106422212516  #    29.8%\nfrontend             1334214911374  # 35.9% (35.9%)\n-- latency           719044168108   #    19.3%\n-- bandwidth         615170743266   #    16.5%\nbackend              489481346123   # 13.2% (13.2%)\n-- cpu               253259025606   #     6.8%\n-- memory            236222320517   #     6.4%\nspeculation          698694067172   # 18.8% (18.8%)\n-- branch mispredict 679003139269   #    18.3%\n-- pipeline restart  19690927903    #     0.5%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           907587487272   # 0.58 GHz\ninstructions         1510758448351  # 1.66 IPC\nl2 access            45203055028    # 35.968 l2 access per 1000 inst\nl2 miss              11710771748    # 25.91% l2 miss\n<\/code><\/pre>\n\n\n\n<p>Process overview show 2220 invocations of the C compiler front end and over 8000 invocations of bash. The preparation phase seems to be libtool. The processes still running reflects losing some events. Looking at the process list, many of the bash stages come early during the preparation<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>44478 processes\n\t2220 cc1                    196.83    28.99\n\t 67 clinfo                  16.90     5.89\n\t10399 libtool                  3.35     1.11\n\t1997 as                       2.51     0.16\n\t8006 bash                     1.46     1.75\n\t508 ld                       1.25     0.15\n\t  3 bzip2                    0.91     0.03\n\t 38 vulkaninfo               0.57     1.71\n\t  6 glxinfo:gdrv0            0.14     0.10\n\t 56 mawk                     0.08     0.00\n\t  6 php                      0.07     0.14\n\t  4 vulkani:disk$0           0.06     0.18\n\t  2 glxinfo                  0.06     0.04\n\t  2 glxinfo:cs0              0.06     0.04\n\t  2 glxinfo:disk$0           0.06     0.04\n\t  2 glxinfo:sh0              0.06     0.04\n\t  2 glxinfo:shlo0            0.06     0.04\n\t523 make                     0.05     0.04\n\t  6 clang                    0.03     0.09\n\t  2 llvmpipe-0               0.03     0.09\n\t  2 llvmpipe-1               0.03     0.09\n\t  2 llvmpipe-10              0.03     0.09\n\t  2 llvmpipe-11              0.03     0.09\n\t  2 llvmpipe-12              0.03     0.09\n\t  2 llvmpipe-13              0.03     0.09\n\t  2 llvmpipe-14              0.03     0.09\n\t  2 llvmpipe-15              0.03     0.09\n\t  2 llvmpipe-2               0.03     0.09\n\t  2 llvmpipe-3               0.03     0.09\n\t  2 llvmpipe-4               0.03     0.09\n\t  2 llvmpipe-5               0.03     0.09\n\t  2 llvmpipe-6               0.03     0.09\n\t  2 llvmpipe-7               0.03     0.09\n\t  2 llvmpipe-8               0.03     0.09\n\t  2 llvmpipe-9               0.03     0.09\n\t  3 rocminfo                 0.03     0.00\n\t2113 cat                      0.01     0.01\n\t  6 print                    0.01     0.00\n\t  3 tar                      0.00     0.19\n\t3773 rm                       0.00     0.09\n\t285 ranlib                   0.00     0.06\n\t287 ar                       0.00     0.05\n\t  1 lspci                    0.00     0.02\n\t5655 sed                      0.00     0.00\n\t2559 gcc                      0.00     0.00\n\t1149 mv                       0.00     0.00\n\t961 touch                    0.00     0.00\n\t590 sort                     0.00     0.00\n\t586 tr                       0.00     0.00\n\t560 mkdir                    0.00     0.00\n\t503 collect2                 0.00     0.00\n\t307 ln                       0.00     0.00\n\t245 grep                     0.00     0.00\n\t 95 sh                       0.00     0.00\n\t 87 expr                     0.00     0.00\n\t 87 mkdir.sh                 0.00     0.00\n\t 58 dirname                  0.00     0.00\n\t 48 conftest                 0.00     0.00\n\t 43 chmod                    0.00     0.00\n\t 43 uname                    0.00     0.00\n\t 30 apr-1-config             0.00     0.00\n\t 18 basename                 0.00     0.00\n\t 18 ls                       0.00     0.00\n\t 16 configure                0.00     0.00\n\t 15 awk                      0.00     0.00\n\t 11 gsettings                0.00     0.00\n\t 11 nm                       0.00     0.00\n\t 11 pkg-config               0.00     0.00\n\t 10 hostname                 0.00     0.00\n\t 10 rmdir                    0.00     0.00\n\t  9 diff                     0.00     0.00\n\t  8 cc                       0.00     0.00\n\t  8 get-version.sh           0.00     0.00\n\t  8 stat                     0.00     0.00\n\t  8 systemd-detect-          0.00     0.00\n\t  7 mktemp                   0.00     0.00\n\t  7 uniq                     0.00     0.00\n\t  6 apu-1-config             0.00     0.00\n\t  6 arch                     0.00     0.00\n\t  6 gen_test_char            0.00     0.00\n\t  6 llvm-link                0.00     0.00\n\t  6 pcre-config              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 PrintPath                0.00     0.00\n\t  3 build-apache             0.00     0.00\n\t  2 cmp                      0.00     0.00\n\t  2 install                  0.00     0.00\n\t  2 lscpu                    0.00     0.00\n\t  2 which                    0.00     0.00\n\t  2 xset                     0.00     0.00\n\t  1 cp                       0.00     0.00\n\t  1 date                     0.00     0.00\n\t  1 dconf worker             0.00     0.00\n\t  1 dmesg                    0.00     0.00\n\t  1 dmidecode                0.00     0.00\n\t  1 echo                     0.00     0.00\n\t  1 file                     0.00     0.00\n\t  1 getconf                  0.00     0.00\n\t  1 ifconfig                 0.00     0.00\n\t  1 ip                       0.00     0.00\n\t  1 ldd                      0.00     0.00\n\t  1 lsmod                    0.00     0.00\n\t  1 mt                       0.00     0.00\n\t  1 objdump                  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 strip                    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\n61 processes running\n146 maximum processes\n<\/code><\/pre>\n\n\n\n<p>Overall a quick compilation where build-gcc and build-llvm provide a better look at a reasonable-sized compilation job.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A test to see how long it takes to build the Apache web server. This is a quick running test taking barely 20 seconds. Curiosly, there seems to be a longer preparation phase before the actual run itself. The number <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/build-apache\/\"><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-848","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/848","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=848"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/848\/revisions"}],"predecessor-version":[{"id":864,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/848\/revisions\/864"}],"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=848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}