{"id":272,"date":"2024-01-05T13:41:54","date_gmt":"2024-01-05T13:41:54","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=272"},"modified":"2024-01-05T14:23:46","modified_gmt":"2024-01-05T14:23:46","slug":"build-ffmpeg","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/build-ffmpeg\/","title":{"rendered":"build-ffmpeg"},"content":{"rendered":"\n<p>Basic compilation task on how long it takes to build ffmpeg.  Higher than average amount of branch misprediction and compilations seem to have some of the highest frontend times and many separate processes.<\/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-19.png\" alt=\"\" class=\"wp-image-277\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-19.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-19-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-19-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              171.202\non_cpu               0.776          # 12.41 \/ 16 cores\nutime                1947.351\nstime                177.076\nnvcsw                114968         # 32.43%\nnivcsw               239595         # 67.57%\ninblock              117920         # 688.78\/sec\nonblock              14100816       # 82363.59\/sec\ncpu-clock            2123980912392  # 2123.981 seconds\ntask-clock           2124121813103  # 2124.122 seconds\npage faults          42358510       # 19941.658\/sec\ncontext switches     327492         # 154.178\/sec\ncpu migrations       21796          # 10.261\/sec\nmajor page faults    2396           # 1.128\/sec\nminor page faults    42356114       # 19940.530\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             2218874607784  # 211.000 branches per 1000 inst\nbranch misses        60796986990    # 2.74% branch miss\nconditional          1702720659155  # 161.917 conditional branches per 1000 inst\nindirect             52690269300    # 5.010 indirect branches per 1000 inst\ncpu-cycles           8477488825007  # 3.11 GHz\ninstructions         10371093730733 # 1.22 IPC\nslots                17364839747580 #\nretiring             3403828778757  # 19.6% (24.3%)\n-- ucode             3982965399     #     0.0%\n-- fastpath          3399845813358  #    19.6%\nfrontend             5839913740178  # 33.6% (41.6%)\n-- latency           4277633170788  #    24.6%\n-- bandwidth         1562280569390  #     9.0%\nbackend              4131015233051  # 23.8% (29.5%)\n-- cpu               540707338867   #     3.1%\n-- memory            3590307894184  #    20.7%\nspeculation          648179004659   #  3.7% ( 4.6%)\n-- branch mispredict 641559867721   #     3.7%\n-- pipeline restart  6619136938     #     0.0%\nsmt-contention       3341842645550  # 19.2% ( 0.0%)\ncpu-cycles           8450512615627  # 3.11 GHz\ninstructions         10367098166757 # 1.23 IPC\ninstructions         3502228303687  # 39.059 l2 access per 1000 inst\nl2 hit from l1       116829178127   # 16.93% l2 miss\nl2 miss from l1      13877145906    #\nl2 hit from l2 pf    10677565181    #\nl3 hit from l2 pf    5095309639     #\nl3 miss from l2 pf   4192514345     #\ninstructions         3499360326307  # 24.617 float per 1000 inst\nfloat 512            9551           # 0.000 AVX-512 per 1000 inst\nfloat 256            199056         # 0.000 AVX-256 per 1000 inst\nfloat 128            86143020332    # 24.617 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst<\/code><\/pre>\n\n\n\n<p>Intel metrics<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              674.715\non_cpu               0.827          # 13.23 \/ 16 cores\nutime                8459.988\nstime                465.057\nnvcsw                328774         # 29.44%\nnivcsw               787917         # 70.56%\ninblock              115008         # 170.45\/sec\nonblock              46517320       # 68943.64\/sec\ncpu-clock            8924013570046  # 8924.014 seconds\ntask-clock           8924333278137  # 8924.333 seconds\npage faults          139136217      # 15590.657\/sec\ncontext switches     1038677        # 116.387\/sec\ncpu migrations       90336          # 10.122\/sec\nmajor page faults    2335           # 0.262\/sec\nminor page faults    139133882      # 15590.395\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             7296503689664  # 209.124 branches per 1000 inst\nbranch misses        176386328060   # 2.42% branch miss\nconditional          7296506700480  # 209.124 conditional branches per 1000 inst\nindirect             1498814182689  # 42.957 indirect branches per 1000 inst\nslots                12988285798586 #\nretiring             5235931312872  # 40.3% (40.3%)\n-- ucode             351433784840   #     2.7%\n-- fastpath          4884497528032  #    37.6%\nfrontend             4421921591724  # 34.0% (34.0%)\n-- latency           2094764988792  #    16.1%\n-- bandwidth         2327156602932  #    17.9%\nbackend              1152804012150  #  8.9% ( 8.9%)\n-- cpu               542205814746   #     4.2%\n-- memory            610598197404   #     4.7%\nspeculation          2204644564571  # 17.0% (17.0%)\n-- branch mispredict 2148498675712  #    16.5%\n-- pipeline restart  56145888859    #     0.4%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           5063611872783  # 1.53 GHz\ninstructions         7035472426496  # 1.39 IPC\nl2 access            220349292960   # 39.600 l2 access per 1000 inst\nl2 miss              51775619931    # 23.50% l2 miss<\/code><\/pre>\n\n\n\n<p>Overall process table shows most time spent in the compiler front end.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>30993 processes\n\t6425 cc1                   1600.03    75.82\n\t413 nasm                   185.92     2.50\n\t6315 as                      61.10     5.02\n\t 91 ld                       4.53     1.92\n\t  6 make                     3.31     1.14\n\t 38 vulkaninfo               0.57     0.96\n\t1875 configure                0.46     0.29\n\t 23 ar                       0.42     2.80\n\t  1 xz                       0.39     0.01\n\t 22 ranlib                   0.23     2.57\n\t  6 php                      0.08     0.17\n\t  4 vulkani:disk$0           0.06     0.11\n\t  7 clang                    0.06     0.03\n\t  2 llvmpipe-0               0.03     0.06\n\t  2 llvmpipe-1               0.03     0.06\n\t  2 llvmpipe-10              0.03     0.06\n\t  2 llvmpipe-11              0.03     0.06\n\t  2 llvmpipe-12              0.03     0.06\n\t  2 llvmpipe-13              0.03     0.06\n\t  2 llvmpipe-14              0.03     0.06\n\t  2 llvmpipe-15              0.03     0.06\n\t  2 llvmpipe-2               0.03     0.06\n\t  2 llvmpipe-3               0.03     0.06\n\t  2 llvmpipe-4               0.03     0.06\n\t  2 llvmpipe-5               0.03     0.06\n\t  2 llvmpipe-6               0.03     0.06\n\t  2 llvmpipe-7               0.03     0.06\n\t  2 llvmpipe-8               0.03     0.06\n\t  2 llvmpipe-9               0.03     0.06\n\t  1 pod2man                  0.02     0.00\n\t  1 tar                      0.01     0.22\n\t  1 lspci                    0.01     0.03\n\t138 rm                       0.00     0.55\n\t412 strip                    0.00     0.12\n\t7243 sh                       0.00     0.09\n\t6580 gcc                      0.00     0.00\n\t345 cat                      0.00     0.00\n\t241 pkgconfig_gener          0.00     0.00\n\t179 sed                      0.00     0.00\n\t 93 tr                       0.00     0.00\n\t 91 collect2                 0.00     0.00\n\t 63 awk                      0.00     0.00\n\t 48 grep                     0.00     0.00\n\t 40 mkdir                    0.00     0.00\n\t 30 pkg-config               0.00     0.00\n\t 21 cut                      0.00     0.00\n\t 16 sort                     0.00     0.00\n\t 15 dirname                  0.00     0.00\n\t 14 cmp                      0.00     0.00\n\t 14 cp                       0.00     0.00\n\t 12 expr                     0.00     0.00\n\t  9 gsettings                0.00     0.00\n\t  9 stty                     0.00     0.00\n\t  8 stat                     0.00     0.00\n\t  8 systemd-detect-          0.00     0.00\n\t  7 head                     0.00     0.00\n\t  6 llvm-link                0.00     0.00\n\t  5 glxinfo                  0.00     0.00\n\t  5 gmain                    0.00     0.00\n\t  5 mktemp                   0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  5 version.sh               0.00     0.00\n\t  4 bash                     0.00     0.00\n\t  4 uname                    0.00     0.00\n\t  3 build-ffmpeg             0.00     0.00\n\t  3 touch                    0.00     0.00\n\t  2 cc                       0.00     0.00\n\t  2 chmod                    0.00     0.00\n\t  2 clinfo                   0.00     0.00\n\t  2 dconf worker             0.00     0.00\n\t  2 git                      0.00     0.00\n\t  2 lscpu                    0.00     0.00\n\t  2 setterm                  0.00     0.00\n\t  2 test                     0.00     0.00\n\t  2 which                    0.00     0.00\n\t  1 cc1plus                  0.00     0.00\n\t  1 date                     0.00     0.00\n\t  1 dmesg                    0.00     0.00\n\t  1 dmidecode                0.00     0.00\n\t  1 g++                      0.00     0.00\n\t  1 ifconfig                 0.00     0.00\n\t  1 ip                       0.00     0.00\n\t  1 ln                       0.00     0.00\n\t  1 lsmod                    0.00     0.00\n\t  1 nm                       0.00     0.00\n\t  1 od                       0.00     0.00\n\t  1 perl                     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 rsync                    0.00     0.00\n\t  1 systemctl                0.00     0.00\n\t  1 tail                     0.00     0.00\n\t  1 template.sh              0.00     0.00\n\t  1 test.sh                  0.00     0.00\n\t  1 wc                       0.00     0.00\n2 processes running\n62 maximum processes<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basic compilation task on how long it takes to build ffmpeg. Higher than average amount of branch misprediction and compilations seem to have some of the highest frontend times and many separate processes. AMD metrics Intel metrics Overall process table <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/build-ffmpeg\/\"><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-272","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/272","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=272"}],"version-history":[{"count":3,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/272\/revisions"}],"predecessor-version":[{"id":281,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/272\/revisions\/281"}],"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=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}