{"id":816,"date":"2024-01-22T11:01:03","date_gmt":"2024-01-22T11:01:03","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=816"},"modified":"2024-01-23T00:06:07","modified_gmt":"2024-01-23T00:06:07","slug":"speedb","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/speedb\/","title":{"rendered":"speedb"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A key value storage engine. This runs with seven different workloads in combinations of reading and writing.. Also looks like a mixture of how many processes are running and overall usage of the CPU cores.<\/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-53.png\" alt=\"\" class=\"wp-image-833\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-53.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-53-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/systemtime-53-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Topdown profile shows a surprising amount of frontend stalls and not as many backend stalls as I expected.<\/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-91.png\" alt=\"\" class=\"wp-image-835\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-91.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-91-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-91-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">AMD metrics show now much floating point and a reasonable number of branches.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              2070.821\non_cpu               0.423          # 6.77 \/ 16 cores\nutime                9881.316\nstime                4127.971\nnvcsw                138393616      # 88.21%\nnivcsw               18505237       # 11.79%\ninblock              224            # 0.11\/sec\nonblock              127042640      # 61348.93\/sec\ncpu-clock            13909200672659 # 13909.201 seconds\ntask-clock           13958994870372 # 13958.995 seconds\npage faults          35140921       # 2517.439\/sec\ncontext switches     156908891      # 11240.701\/sec\ncpu migrations       9528475        # 682.605\/sec\nmajor page faults    22             # 0.002\/sec\nminor page faults    35140899       # 2517.438\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             10714480389338 # 191.064 branches per 1000 inst\nbranch misses        320919868482   # 3.00% branch miss\nconditional          5808156968035  # 103.573 conditional branches per 1000 inst\nindirect             1135687733221  # 20.252 indirect branches per 1000 inst\ncpu-cycles           51740491010480 # 2.51 GHz\ninstructions         55743124682792 # 1.08 IPC\nslots                102725447237646 #\nretiring             20115152933513 # 19.6% (24.2%)\n-- ucode             116943868313   #     0.1%\n-- fastpath          19998209065200 #    19.5%\nfrontend             37532525154712 # 36.5% (45.1%)\n-- latency           28895131316592 #    28.1%\n-- bandwidth         8637393838120  #     8.4%\nbackend              24911429404191 # 24.3% (29.9%)\n-- cpu               3128438115707  #     3.0%\n-- memory            21782991288484 #    21.2%\nspeculation          717345821128   #  0.7% ( 0.9%)\n-- branch mispredict 708891072216   #     0.7%\n-- pipeline restart  8454748912     #     0.0%\nsmt-contention       19437881832850 # 18.9% ( 0.0%)\ncpu-cycles           51919455128020 # 2.40 GHz\ninstructions         55867230617986 # 1.08 IPC\ninstructions         18538442010060 # 40.327 l2 access per 1000 inst\nl2 hit from l1       685936510947   # 11.53% l2 miss\nl2 miss from l1      47139312954    #\nl2 hit from l2 pf    22599446135    #\nl3 hit from l2 pf    25035223752    #\nl3 miss from l2 pf   14036334289    #\ninstructions         18523728810796 # 25.198 float per 1000 inst\nfloat 512            129            # 0.000 AVX-512 per 1000 inst\nfloat 256            628            # 0.000 AVX-256 per 1000 inst\nfloat 128            466765911840   # 25.198 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 class=\"wp-block-paragraph\">Intel metrics with lower elapsed time overall and more cores.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              1867.083\non_cpu               0.787          # 12.59 \/ 16 cores\nutime                19333.595\nstime                4180.095\nnvcsw                20487307       # 38.34%\nnivcsw               32952605       # 61.66%\ninblock              25896          # 13.87\/sec\nonblock              150144056      # 80416.39\/sec\ncpu-clock            23502613686774 # 23502.614 seconds\ntask-clock           23508495529544 # 23508.496 seconds\npage faults          40269628       # 1712.982\/sec\ncontext switches     53448978       # 2273.603\/sec\ncpu migrations       1064630        # 45.287\/sec\nmajor page faults    171            # 0.007\/sec\nminor page faults    40269457       # 1712.975\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             14771616888164 # 181.793 branches per 1000 inst\nbranch misses        61993896497    # 0.42% branch miss\nconditional          14771616978244 # 181.793 conditional branches per 1000 inst\nindirect             5085829414981  # 62.591 indirect branches per 1000 inst\nslots                125964273862484 #\nretiring             51099357052715 # 40.6% (40.6%)\n-- ucode             6050258115125  #     4.8%\n-- fastpath          45049098937590 #    35.8%\nfrontend             41642723677884 # 33.1% (33.1%)\n-- latency           17491249620450 #    13.9%\n-- bandwidth         24151474057434 #    19.2%\nbackend              28925817997092 # 23.0% (23.0%)\n-- cpu               18472992005227 #    14.7%\n-- memory            10452825991865 #     8.3%\nspeculation          4353259119865  #  3.5% ( 3.5%)\n-- branch mispredict 3808100269661  #     3.0%\n-- pipeline restart  545158850204   #     0.4%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           79398869975356 # 2.33 GHz\ninstructions         96444141910483 # 1.21 IPC\nl2 access            2579729494934  # 51.631 l2 access per 1000 inst\nl2 miss              450249142737   # 17.45% l2 miss\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Process overview, looks like we lost track of some.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2184 processes\n\t1522 db_bench             327262.01 141787.39\n\t168 speedb:low           78551.12 26881.76\n\t 21 speedb:high           9818.89  3360.24\n\t 68 clinfo                  17.85     5.99\n\t 38 vulkaninfo               0.74     1.51\n\t  6 glxinfo:gdrv0            0.12     0.07\n\t  6 php                      0.10     0.28\n\t  4 vulkani:disk$0           0.08     0.15\n\t  2 glxinfo                  0.06     0.03\n\t  2 glxinfo:cs0              0.06     0.03\n\t  2 glxinfo:disk$0           0.06     0.03\n\t  2 glxinfo:sh0              0.06     0.03\n\t  2 glxinfo:shlo0            0.06     0.03\n\t  6 clang                    0.04     0.08\n\t  2 llvmpipe-0               0.04     0.08\n\t  2 llvmpipe-1               0.04     0.08\n\t  2 llvmpipe-10              0.04     0.08\n\t  2 llvmpipe-11              0.04     0.08\n\t  2 llvmpipe-12              0.04     0.08\n\t  2 llvmpipe-13              0.04     0.08\n\t  2 llvmpipe-14              0.04     0.08\n\t  2 llvmpipe-15              0.04     0.08\n\t  2 llvmpipe-2               0.04     0.08\n\t  2 llvmpipe-3               0.04     0.08\n\t  2 llvmpipe-4               0.04     0.08\n\t  2 llvmpipe-5               0.04     0.08\n\t  2 llvmpipe-6               0.04     0.08\n\t  2 llvmpipe-7               0.04     0.08\n\t  2 llvmpipe-8               0.04     0.08\n\t  2 llvmpipe-9               0.04     0.08\n\t 42 rm                       0.00     0.21\n\t  3 rocminfo                 0.00     0.03\n\t  1 lspci                    0.00     0.02\n\t  1 ps                       0.00     0.01\n\t 94 sh                       0.00     0.00\n\t 21 speedb                   0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 10 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 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 dconf worker             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 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\n56 processes running\n103 maximum processes\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Not all of it, but shows many nested invocations of db_bench<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      3671795) speedb           cpu=0 start=5.57  finish=65.87\n        3671796) rm               cpu=1 start=5.58  finish=5.58 \n        3671797) db_bench         cpu=12 start=5.58  finish=65.85\n          3671798) db_bench         cpu=5 start=5.58  finish=5.59 \n          3671799) speedb:low       cpu=5 start=5.58  finish=65.84\n          3671800) speedb:low       cpu=7 start=5.58  finish=65.84\n          3671801) speedb:low       cpu=11 start=5.59  finish=65.84\n          3671802) speedb:low       cpu=2 start=5.59  finish=65.84\n          3671803) speedb:low       cpu=0 start=5.59  finish=65.84\n          3671804) speedb:low       cpu=6 start=5.59  finish=65.84\n          3671805) speedb:low       cpu=13 start=5.59  finish=65.84\n          3671806) speedb:low       cpu=1 start=5.59  finish=65.84\n          3671807) speedb:high      cpu=2 start=5.59  finish=65.85\n          3671808) db_bench         cpu=11 start=5.59  finish=65.84\n          3671809) db_bench         cpu=10 start=5.59  finish=5.69 \n          3671810) db_bench         cpu=4 start=5.68  finish=5.69 \n          3671811) db_bench         cpu=9 start=5.68  finish=5.68 \n          3671812) db_bench         cpu=11 start=5.68  finish=5.68 \n          3671813) db_bench         cpu=15 start=5.68  finish=5.68 \n          3671814) db_bench         cpu=5 start=5.68  finish=5.68 \n          3671815) db_bench         cpu=10 start=5.68  finish=5.68 \n          3671816) db_bench         cpu=4 start=5.68  finish=5.68 \n          3671817) db_bench         cpu=11 start=5.68  finish=5.68 \n          3671818) db_bench         cpu=3 start=5.68  finish=5.68 \n          3671819) db_bench         cpu=0 start=5.68  finish=5.68 \n          3671820) db_bench         cpu=14 start=5.68  finish=5.68 \n          3671821) db_bench         cpu=10 start=5.68  finish=5.68 \n          3671822) ?? cpu=0 start=5.68  finish=0.00 \n          3671823) db_bench         cpu=14 start=5.68  finish=5.68 \n          3671824) db_bench         cpu=10 start=5.68  finish=5.68 \n          3671825) ?? cpu=0 start=5.68  finish=0.00 \n          3671826) db_bench         cpu=14 start=5.69  finish=5.69 \n          3671827) db_bench         cpu=12 start=5.71  finish=5.81 \n          3671828) db_bench         cpu=4 start=5.80  finish=6.57 \n          3671829) db_bench         cpu=2 start=5.80  finish=5.80 \n          3671830) db_bench         cpu=14 start=5.80  finish=5.80 \n          3671831) db_bench         cpu=11 start=5.80  finish=5.80 \n          3671832) db_bench         cpu=5 start=5.80  finish=5.80 \n          3671833) db_bench         cpu=12 start=5.80  finish=5.80 \n          3671834) db_bench         cpu=1 start=5.80  finish=5.80 \n          3671835) db_bench         cpu=11 start=5.80  finish=5.80 \n          3671836) ?? cpu=0 start=5.80  finish=0.00 \n          3671837) db_bench         cpu=14 start=5.80  finish=5.80 \n          3671838) db_bench         cpu=11 start=5.80  finish=5.80 \n          3671839) db_bench         cpu=0 start=5.80  finish=5.80 \n          3671840) db_bench         cpu=7 start=5.80  finish=5.80 \n          3671841) db_bench         cpu=0 start=5.80  finish=5.80 \n          3671842) db_bench         cpu=0 start=5.80  finish=5.80 \n          3671843) db_bench         cpu=12 start=5.81  finish=5.81 \n          3671844) db_bench         cpu=6 start=5.81  finish=65.82\n          3671845) db_bench         cpu=6 start=5.81  finish=65.82\n            3671861) db_bench         cpu=13 start=6.57  finish=7.30 \n            3671862) db_bench         cpu=14 start=7.30  finish=8.06 \n            3671870) db_bench         cpu=5 start=13.35 finish=14.07\n            3671891) db_bench         cpu=5 start=29.63 finish=30.38\n            3671904) db_bench         cpu=5 start=39.66 finish=40.50\n            3671917) db_bench         cpu=15 start=49.87 finish=50.67\n          3671846) db_bench         cpu=10 start=5.81  finish=65.82\n            3671865) db_bench         cpu=5 start=9.58  finish=10.30\n            3671869) db_bench         cpu=8 start=12.60 finish=13.35\n            3671873) db_bench         cpu=11 start=15.65 finish=16.45\n            3671898) db_bench         cpu=5 start=35.10 finish=35.81\n            3671901) db_bench         cpu=12 start=37.40 finish=38.23\n            3671919) db_bench         cpu=5 start=51.38 finish=52.08\n            3671935) db_bench         cpu=8 start=63.77 finish=64.50\n          3671847) db_bench         cpu=9 start=5.81  finish=65.82\n            3671866) db_bench         cpu=9 start=10.30 finish=11.04\n            3671908) db_bench         cpu=5 start=42.80 finish=43.64\n            3671909) db_bench         cpu=5 start=43.64 finish=44.45\n          3671848) db_bench         cpu=8 start=5.81  finish=65.82\n            3671880) db_bench         cpu=10 start=20.93 finish=21.79\n            3671895) db_bench         cpu=4 start=32.75 finish=33.48\n            3671896) db_bench         cpu=12 start=33.48 finish=34.31\n            3671926) db_bench         cpu=10 start=56.84 finish=57.57\n            3671933) db_bench         cpu=1 start=62.20 finish=63.03\n          3671849) db_bench         cpu=5 start=5.81  finish=65.82\n            3671874) db_bench         cpu=4 start=16.45 finish=17.14\n            3671889) db_bench         cpu=8 start=28.09 finish=28.87\n            3671903) db_bench         cpu=5 start=38.94 finish=39.66\n            3671916) db_bench         cpu=6 start=49.02 finish=49.87\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A key value storage engine. This runs with seven different workloads in combinations of reading and writing.. Also looks like a mixture of how many processes are running and overall usage of the CPU cores. Topdown profile shows a surprising <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/speedb\/\"><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-816","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/816","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=816"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/816\/revisions"}],"predecessor-version":[{"id":836,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/816\/revisions\/836"}],"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=816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}