{"id":445,"date":"2024-01-13T00:41:41","date_gmt":"2024-01-13T00:41:41","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=445"},"modified":"2024-01-13T03:21:28","modified_gmt":"2024-01-13T03:21:28","slug":"encode-opus","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/encode-opus\/","title":{"rendered":"encode-opus"},"content":{"rendered":"\n<p>Encode-opus is one of several quick-running encode benchmarks.  These are quick-running high-IPC programs with just a few threads. In this case, a constant set of two runnable 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\/systemtime-5.png\" alt=\"\" class=\"wp-image-471\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-5.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-5-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-5-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>System overview shows a high retirement rate with a small number of 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\/01\/amdtopdown-43.png\" alt=\"\" class=\"wp-image-473\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-43.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-43-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-43-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show a lot of floating point code, not many branches and cpu-bound more than memory bound but overall very high IPC and high retirement rate.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              139.297\non_cpu               0.053          # 0.84 \/ 16 cores\nutime                115.226\nstime                1.839\nnvcsw                2815           # 81.74%\nnivcsw               629            # 18.26%\ninblock              0              # 0.00\/sec\nonblock              1732768        # 12439.35\/sec\ncpu-clock            117091880626   # 117.092 seconds\ntask-clock           117095710268   # 117.096 seconds\npage faults          161156         # 1376.276\/sec\ncontext switches     3933           # 33.588\/sec\ncpu migrations       300            # 2.562\/sec\nmajor page faults    2              # 0.017\/sec\nminor page faults    161154         # 1376.259\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             153579074036   # 94.603 branches per 1000 inst\nbranch misses        2912235529     # 1.90% branch miss\nconditional          134250372526   # 82.697 conditional branches per 1000 inst\nindirect             1193893855     # 0.735 indirect branches per 1000 inst\ncpu-cycles           537156399526   # 0.24 GHz\ninstructions         1619661764279  # 3.02 IPC\nslots                1076831653824  #\nretiring             523624378763   # 48.6% (48.6%)\n-- ucode             27642325       #     0.0%\n-- fastpath          523596736438   #    48.6%\nfrontend             100476135520   #  9.3% ( 9.3%)\n-- latency           65112118866    #     6.0%\n-- bandwidth         35364016654    #     3.3%\nbackend              364834219382   # 33.9% (33.9%)\n-- cpu               279301543322   #    25.9%\n-- memory            85532676060    #     7.9%\nspeculation          87781529545    #  8.2% ( 8.2%)\n-- branch mispredict 86601453537    #     8.0%\n-- pipeline restart  1180076008     #     0.1%\nsmt-contention       115109929      #  0.0% ( 0.0%)\ncpu-cycles           537866827145   # 0.24 GHz\ninstructions         1622228251326  # 3.02 IPC\ninstructions         541136738630   # 17.839 l2 access per 1000 inst\nl2 hit from l1       6466702852     # 2.16% l2 miss\nl2 miss from l1      106528981      #\nl2 hit from l2 pf    3085379042     #\nl3 hit from l2 pf    91625958       #\nl3 miss from l2 pf   9890270        #\ninstructions         540965737285   # 358.276 float per 1000 inst\nfloat 512            112            # 0.000 AVX-512 per 1000 inst\nfloat 256            602            # 0.000 AVX-256 per 1000 inst\nfloat 128            193814859934   # 358.276 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 show a similar low amount of on cpu, essentially single-threaded.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              158.215\non_cpu               0.053          # 0.86 \/ 16 cores\nutime                133.985\nstime                1.313\nnvcsw                2331           # 77.65%\nnivcsw               671            # 22.35%\ninblock              81936          # 517.88\/sec\nonblock              1721520        # 10880.86\/sec\ncpu-clock            135300390813   # 135.300 seconds\ntask-clock           135304167762   # 135.304 seconds\npage faults          145874         # 1078.119\/sec\ncontext switches     3580           # 26.459\/sec\ncpu migrations       366            # 2.705\/sec\nmajor page faults    18             # 0.133\/sec\nminor page faults    145856         # 1077.986\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             152826156114   # 94.293 branches per 1000 inst\nbranch misses        2865383218     # 1.87% branch miss\nconditional          152826169330   # 94.293 conditional branches per 1000 inst\nindirect             1214079796     # 0.749 indirect branches per 1000 inst\nslots                3067321672538  #\nretiring             1541367561479  # 50.3% (50.3%)\n-- ucode             48525608582    #     1.6%\n-- fastpath          1492841952897  #    48.7%\nfrontend             293193133379   #  9.6% ( 9.6%)\n-- latency           110784373995   #     3.6%\n-- bandwidth         182408759384   #     5.9%\nbackend              805991778923   # 26.3% (26.3%)\n-- cpu               581617263000   #    19.0%\n-- memory            224374515923   #     7.3%\nspeculation          431547827766   # 14.1% (14.1%)\n-- branch mispredict 424707967622   #    13.8%\n-- pipeline restart  6839860144     #     0.2%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           511371921430   # 0.20 GHz\ninstructions         1620717767784  # 3.17 IPC\nl2 access            9846953252     # 6.076 l2 access per 1000 inst\nl2 miss              321920749      # 3.27% l2 miss\n<\/code><\/pre>\n\n\n\n<p>Process summary is straightforward<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>387 processes\n\t 25 opusenc                114.12     0.86\n\t 68 clinfo                  16.20     6.31\n\t 38 vulkaninfo               0.94     1.15\n\t  6 glxinfo:gdrv0            0.12     0.06\n\t  4 vulkani:disk$0           0.10     0.13\n\t  6 php                      0.08     0.06\n\t  2 glxinfo                  0.07     0.03\n\t  2 glxinfo:cs0              0.07     0.03\n\t  2 glxinfo:disk$0           0.07     0.03\n\t  2 glxinfo:shlo0            0.07     0.03\n\t  2 glxinfo:sh0              0.06     0.02\n\t  6 clang                    0.05     0.07\n\t  2 llvmpipe-0               0.05     0.07\n\t  2 llvmpipe-1               0.05     0.07\n\t  2 llvmpipe-10              0.05     0.07\n\t  2 llvmpipe-11              0.05     0.07\n\t  2 llvmpipe-12              0.05     0.07\n\t  2 llvmpipe-13              0.05     0.07\n\t  2 llvmpipe-14              0.05     0.07\n\t  2 llvmpipe-2               0.05     0.07\n\t  2 llvmpipe-4               0.05     0.07\n\t  2 llvmpipe-5               0.05     0.07\n\t  2 llvmpipe-6               0.05     0.07\n\t  2 llvmpipe-7               0.05     0.07\n\t  2 llvmpipe-8               0.05     0.07\n\t  2 llvmpipe-9               0.05     0.07\n\t  2 llvmpipe-15              0.05     0.06\n\t  2 llvmpipe-3               0.05     0.06\n\t  3 rocminfo                 0.03     0.00\n\t  1 lspci                    0.01     0.02\n\t  1 ps                       0.00     0.01\n\t 87 sh                       0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 12 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 bash                     0.00     0.00\n\t  5 encode-opus              0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  5 rm                       0.00     0.00\n\t  3 gmain                    0.00     0.00\n\t  2 cc                       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 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>The core computation blocks show a parent process followed by five children in order.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      45221) encode-opus      cpu=14 start=5.62  finish=28.68\n        45222) opusenc          cpu=3 start=5.62  finish=10.44\n        45223) opusenc          cpu=15 start=10.44 finish=15.01\n        45226) opusenc          cpu=0 start=15.01 finish=19.57\n        45227) opusenc          cpu=15 start=19.57 finish=24.13\n        45228) opusenc          cpu=0 start=24.13 finish=28.68\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Encode-opus is one of several quick-running encode benchmarks. These are quick-running high-IPC programs with just a few threads. In this case, a constant set of two runnable processes. System overview shows a high retirement rate with a small number of <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/encode-opus\/\"><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-445","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/445","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=445"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/445\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/445\/revisions\/474"}],"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=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}