nickva commented on PR #5625: URL: https://github.com/apache/couchdb/pull/5625#issuecomment-3216348604
One missing part of the testing was to see how the PR fares with multiple dbs when it hits the full cache limit, so I ran the benchmark again (with the latest version) with 1 database (Q=64, 1M docs) and then 100 dbs also with Q=64, 10k docs per db. Since the working set is larger and we hit the full cache a few times, it's less effective, but still shows an improvement both latency and throughput. #### MAIN ##### 1 DB ``` HTTP http_req_duration..............: avg=1.1s min=3.8ms med=1.12s max=3.97s p(90)=2.32s p(95)=2.52s { expected_response:true }...: avg=1.1s min=3.8ms med=1.12s max=3.97s p(90)=2.31s p(95)=2.52s { name:bulk_docs }...........: avg=194.82ms min=122.29ms med=194.57ms max=506.31ms p(90)=210.71ms p(95)=216.96ms { name:get_doc }.............: avg=39.48ms min=3.8ms med=38.29ms max=3.25s p(90)=50.8ms p(95)=54.52ms { name:post_doc }............: avg=1.37s min=39.94ms med=1.28s max=3.88s p(90)=2.15s p(95)=2.37s { name:put_doc }.............: avg=1.91s min=117.86ms med=1.99s max=3.97s p(90)=2.57s p(95)=2.73s http_req_failed................: 0.13% 5492 out of 4172744 http_reqs......................: 4172744 4918.641943/s EXECUTION iteration_duration.............: avg=4.32s min=1.42s med=4.35s max=8.74s p(90)=4.97s p(95)=5.17s iterations.....................: 1390580 1639.152824/s vus............................: 3175 min=0 max=10000 vus_max........................: 10000 min=10000 max=10000 NETWORK data_received..................: 2.7 GB 3.1 MB/s data_sent......................: 738 MB 870 kB/s running (14m08.4s), 00000/10000 VUs, 1390580 complete and 0 interrupted iterations ``` ##### 100 DBs ``` HTTP http_req_duration..............: avg=739.75ms min=3.41ms med=722.39ms max=4.29s p(90)=1.53s p(95)=1.74s { expected_response:true }...: avg=739.01ms min=5.91ms med=722.02ms max=4.28s p(90)=1.53s p(95)=1.74s { name:bulk_docs }...........: avg=176.97ms min=104.51ms med=180.09ms max=222.71ms p(90)=198ms p(95)=204.05ms { name:get_doc }.............: avg=72.49ms min=6.42ms med=72.87ms max=2.5s p(90)=90.76ms p(95)=97.98ms { name:post_doc }............: avg=1.01s min=5.91ms med=895.98ms max=4.28s p(90)=1.6s p(95)=1.8s { name:put_doc }.............: avg=1.13s min=57.11ms med=1.02s max=4.29s p(90)=1.71s p(95)=1.91s http_req_failed................: 0.11% 6299 out of 5597273 http_reqs......................: 5597273 6640.279304/s EXECUTION iteration_duration.............: avg=3.22s min=1.7s med=3.15s max=7.57s p(90)=4.04s p(95)=4.33s iterations.....................: 1865324 2212.911958/s vus............................: 0 min=0 max=10000 vus_max........................: 10000 min=10000 max=10000 NETWORK data_received..................: 3.5 GB 4.2 MB/s data_sent......................: 980 MB 1.2 MB/s running (14m02.9s), 00000/10000 VUs, 1865324 complete and 0 interrupted iterations ``` #### BTREE CACHE ##### 1 DB ``` HTTP http_req_duration..............: avg=586.26ms min=3.41ms med=683.49ms max=3.62s p(90)=1.14s p(95)=1.27s { expected_response:true }...: avg=585.63ms min=3.41ms med=682.96ms max=3.04s p(90)=1.14s p(95)=1.27s { name:bulk_docs }...........: avg=118.95ms min=88.45ms med=115.99ms max=430.22ms p(90)=123.29ms p(95)=125.34ms { name:get_doc }.............: avg=12.71ms min=3.41ms med=10.05ms max=2.11s p(90)=19.59ms p(95)=22.72ms { name:post_doc }............: avg=832.66ms min=7.93ms med=808.87ms max=3.04s p(90)=1.19s p(95)=1.32s { name:put_doc }.............: avg=913.62ms min=45.74ms med=896.9ms max=3.62s p(90)=1.25s p(95)=1.36s http_req_failed................: 0.09% 6333 out of 6530402 http_reqs......................: 6530402 8459.167081/s EXECUTION iteration_duration.............: avg=2.76s min=1.14s med=2.73s max=6.74s p(90)=3.24s p(95)=3.42s iterations.....................: 2176466 2819.288849/s vus............................: 262 min=0 max=10000 vus_max........................: 10000 min=10000 max=10000 NETWORK data_received..................: 4.1 GB 5.3 MB/s data_sent......................: 1.1 GB 1.4 MB/s running (12m52.0s), 00000/10000 VUs, 2176466 complete and 0 interrupted iterations ``` ``` { "full": { "value": 0, "type": "counter", "desc": "number of times bt_engine cache was full" }, "hits": { "value": 37521910, "type": "counter", "desc": "number of bt_engine cache hits" }, "misses": { "value": 1364431, "type": "counter", "desc": "number of bt_engine cache misses" } } ``` ##### 100 DBs ``` HTTP http_req_duration..............: avg=578.9ms min=2.82ms med=552.61ms max=3.93s p(90)=1.25s p(95)=1.44s { expected_response:true }...: avg=578.27ms min=3.34ms med=552.29ms max=3.82s p(90)=1.25s p(95)=1.44s { name:bulk_docs }...........: avg=118.11ms min=88.52ms med=117.76ms max=144.29ms p(90)=126.05ms p(95)=129.4ms { name:get_doc }.............: avg=39.67ms min=3.34ms med=38.55ms max=2.34s p(90)=53.12ms p(95)=58.21ms { name:post_doc }............: avg=798.7ms min=6.24ms med=668.4ms max=3.65s p(90)=1.31s p(95)=1.49s { name:put_doc }.............: avg=898.61ms min=6.29ms med=779.32ms max=3.93s p(90)=1.41s p(95)=1.59s http_req_failed................: 0.10% 6988 out of 6583385 http_reqs......................: 6583385 8474.816169/s EXECUTION iteration_duration.............: avg=2.73s min=1.47s med=2.67s max=7.45s p(90)=3.45s p(95)=3.71s iterations.....................: 2194028 2824.380462/s vus............................: 0 min=0 max=10000 vus_max........................: 10000 min=10000 max=10000 NETWORK data_received..................: 4.1 GB 5.3 MB/s data_sent......................: 1.1 GB 1.5 MB/s ``` ``` { "full": { "value": 726465, "type": "counter", "desc": "number of times bt_engine cache was full" }, "hits": { "value": 27097580, "type": "counter", "desc": "number of bt_engine cache hits" }, "misses": { "value": 14718983, "type": "counter", "desc": "number of bt_engine cache misses" } } ``` <img width="930" height="816" alt="multi_db_btree" src="https://github.com/user-attachments/assets/ff55f72c-edf9-4d39-abd0-d81292cd8121" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org