{"id":421,"date":"2024-01-12T00:49:44","date_gmt":"2024-01-12T00:49:44","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=421"},"modified":"2024-01-12T01:32:44","modified_gmt":"2024-01-12T01:32:44","slug":"quantlib","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/quantlib\/","title":{"rendered":"quantlib"},"content":{"rendered":"\n<p>Open source library for quantitative finance written in C++.  Two workloads, the first runs on all 16 cores and the latter is only two cores (listed as single-threaded).<\/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.png\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>This code has a high retirement rate and a low number of frontend 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-38.png\" alt=\"\" class=\"wp-image-426\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-38.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-38-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-38-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show on average we run on half the cores with a moderate amount of floating point, not many L2 misses and a high retirement rate.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              239.451\non_cpu               0.541          # 8.66 \/ 16 cores\nutime                2065.423\nstime                7.805\nnvcsw                4633           # 14.38%\nnivcsw               27581          # 85.62%\ninblock              0              # 0.00\/sec\nonblock              13160          # 54.96\/sec\ncpu-clock            2073306190419  # 2073.306 seconds\ntask-clock           2073321140694  # 2073.321 seconds\npage faults          2947742        # 1421.749\/sec\ncontext switches     33177          # 16.002\/sec\ncpu migrations       1346           # 0.649\/sec\nmajor page faults    82             # 0.040\/sec\nminor page faults    2947660        # 1421.709\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             2559158486088  # 137.454 branches per 1000 inst\nbranch misses        4546709879     # 0.18% branch miss\nconditional          1792036393402  # 96.251 conditional branches per 1000 inst\nindirect             296331568425   # 15.916 indirect branches per 1000 inst\ncpu-cycles           8147071650405  # 2.12 GHz\ninstructions         18623586468548 # 2.29 IPC\nslots                16294264396806 #\nretiring             6411101162579  # 39.3% (63.0%)\n-- ucode             51614158594    #     0.3%\n-- fastpath          6359487003985  #    39.0%\nfrontend             973719191859   #  6.0% ( 9.6%)\n-- latency           661631081958   #     4.1%\n-- bandwidth         312088109901   #     1.9%\nbackend              2670978253953  # 16.4% (26.3%)\n-- cpu               1852113077242  #    11.4%\n-- memory            818865176711   #     5.0%\nspeculation          112642574434   #  0.7% ( 1.1%)\n-- branch mispredict 89165824746    #     0.5%\n-- pipeline restart  23476749688    #     0.1%\nsmt-contention       6125810500089  # 37.6% ( 0.0%)\ncpu-cycles           8153806283473  # 2.12 GHz\ninstructions         18614267485562 # 2.28 IPC\ninstructions         6204973623074  # 13.313 l2 access per 1000 inst\nl2 hit from l1       65552599571    # 6.74% l2 miss\nl2 miss from l1      1533617239     #\nl2 hit from l2 pf    13019558189    #\nl3 hit from l2 pf    3987750228     #\nl3 miss from l2 pf   45252945       #\ninstructions         6207650287054  # 131.654 float per 1000 inst\nfloat 512            107            # 0.000 AVX-512 per 1000 inst\nfloat 256            77880          # 0.000 AVX-256 per 1000 inst\nfloat 128            817261944049   # 131.654 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         32             # 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              976.488\non_cpu               0.778          # 12.44 \/ 16 cores\nutime                12129.067\nstime                19.617\nnvcsw                12945          # 9.55%\nnivcsw               122641         # 90.45%\ninblock              52656          # 53.92\/sec\nonblock              2240           # 2.29\/sec\ncpu-clock            12148886067864 # 12148.886 seconds\ntask-clock           12148922790298 # 12148.923 seconds\npage faults          11001944       # 905.590\/sec\ncontext switches     140037         # 11.527\/sec\ncpu migrations       3387           # 0.279\/sec\nmajor page faults    594            # 0.049\/sec\nminor page faults    11001350       # 905.541\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             12200124995178 # 137.798 branches per 1000 inst\nbranch misses        25542654236    # 0.21% branch miss\nconditional          12200125023466 # 137.798 conditional branches per 1000 inst\nindirect             3350072945374  # 37.838 indirect branches per 1000 inst\nslots                60608212198784 #\nretiring             48586807424801 # 80.2% (80.2%)\n-- ucode             3956469197097  #     6.5%\n-- fastpath          44630338227704 #    73.6%\nfrontend             9060412040521  # 14.9% (14.9%)\n-- latency           3984241307781  #     6.6%\n-- bandwidth         5076170732740  #     8.4%\nbackend              2034236705457  #  3.4% ( 3.4%)\n-- cpu               1227430698305  #     2.0%\n-- memory            806806007152   #     1.3%\nspeculation          1657739725109  #  2.7% ( 2.7%)\n-- branch mispredict 1471736909095  #     2.4%\n-- pipeline restart  186002816014   #     0.3%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           16929758726185 # 1.70 GHz\ninstructions         44769453310654 # 2.64 IPC\nl2 access            241331604127   # 8.271 l2 access per 1000 inst\nl2 miss              17781280151    # 7.37% l2 miss\n<\/code><\/pre>\n\n\n\n<p>Process structure is straightforward<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>452 processes\n\t102 quantlib-benchm       2058.50     6.04\n\t 68 clinfo                  16.59     5.98\n\t 38 vulkaninfo               0.57     1.68\n\t  6 glxinfo:gdrv0            0.14     0.07\n\t  6 php                      0.07     0.09\n\t  6 clang                    0.07     0.05\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:sh0              0.07     0.03\n\t  2 glxinfo:shlo0            0.07     0.03\n\t  4 vulkani:disk$0           0.06     0.17\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\t  1 lspci                    0.00     0.02\n\t  1 ps                       0.00     0.01\n\t 84 sh                       0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 11 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  6 quantlib                 0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  4 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 parallel code sections<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      12611) quantlib         cpu=9 start=5.87  finish=52.15\n        12612) quantlib-benchm  cpu=12 start=5.87  finish=52.15\n          12613) quantlib-benchm  cpu=4 start=5.88  finish=52.14\n            12615) quantlib-benchm  cpu=0 start=5.88  finish=52.14\n          12614) quantlib-benchm  cpu=0 start=5.88  finish=52.14\n            12617) quantlib-benchm  cpu=0 start=5.88  finish=52.14\n          12616) quantlib-benchm  cpu=10 start=5.88  finish=52.15\n            12619) quantlib-benchm  cpu=9 start=5.88  finish=52.14\n          12618) quantlib-benchm  cpu=2 start=5.88  finish=52.14\n            12621) quantlib-benchm  cpu=2 start=5.88  finish=52.14\n          12620) quantlib-benchm  cpu=5 start=5.88  finish=52.15\n            12623) quantlib-benchm  cpu=5 start=5.88  finish=52.14\n          12622) quantlib-benchm  cpu=14 start=5.88  finish=52.15\n            12625) quantlib-benchm  cpu=15 start=5.88  finish=52.14\n          12624) quantlib-benchm  cpu=4 start=5.88  finish=52.15\n            12627) quantlib-benchm  cpu=11 start=5.88  finish=52.14\n          12626) quantlib-benchm  cpu=13 start=5.88  finish=52.15\n            12629) quantlib-benchm  cpu=3 start=5.88  finish=52.14\n          12628) quantlib-benchm  cpu=6 start=5.88  finish=52.14\n            12631) quantlib-benchm  cpu=6 start=5.88  finish=52.14\n          12630) quantlib-benchm  cpu=4 start=5.88  finish=52.14\n            12632) quantlib-benchm  cpu=13 start=5.88  finish=52.14\n          12633) quantlib-benchm  cpu=7 start=5.88  finish=52.15\n            12635) quantlib-benchm  cpu=7 start=5.88  finish=52.14\n          12634) quantlib-benchm  cpu=8 start=5.88  finish=52.14\n            12637) quantlib-benchm  cpu=4 start=5.88  finish=52.14\n          12636) quantlib-benchm  cpu=10 start=5.88  finish=52.14\n            12639) quantlib-benchm  cpu=10 start=5.88  finish=52.14\n          12638) quantlib-benchm  cpu=8 start=5.88  finish=52.14\n            12641) quantlib-benchm  cpu=8 start=5.88  finish=52.14\n          12640) quantlib-benchm  cpu=4 start=5.88  finish=52.15\n            12643) quantlib-benchm  cpu=14 start=5.89  finish=52.14\n          12642) quantlib-benchm  cpu=10 start=5.88  finish=52.15\n            12644) quantlib-benchm  cpu=1 start=5.89  finish=52.14<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Open source library for quantitative finance written in C++. Two workloads, the first runs on all 16 cores and the latter is only two cores (listed as single-threaded). This code has a high retirement rate and a low number of <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/quantlib\/\"><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-421","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/421","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=421"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/421\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/421\/revisions\/427"}],"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=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}