It appears that configuration parsing is resulting in a significant overhead when calling cursor->bound this has resulted in regressions being seen in workloads such as linkbench.
A basic WT reproducer was created to mimic the MongoDB workload that was seeing the regression. It had the following result:
(20:50)(bounded_cursor_perf)$ ./bounded_cursor_perf Running test command: ./bounded_cursor_perf prefix_search: load: 1780 update: 1816 bounded_cursor: load: 2507 update: 2340
As we can see the performance regression was in the ballpark of 30%. This is surprisingly high. Using the linux perf tool to profile the workload it was clear that the cursor->bound call was signficantly more expensive than the cursor->reconfigure called used by the prefix_search implementation.
A quick fix was implemented in the cursor->bound API to reduce the overhead of configuration parsing and the following result was taken from the reproducer:
(11:36)(bounded_cursor_perf)$ ./bounded_cursor_perf Running test command: ./bounded_cursor_perf prefix_search: load: 1884 update: 1839 bounded_cursor: load: 1994 update: 1818
The same improvement was seen in the repro.js mongodb reproducer that was created in SERVER-56509.
This work in this ticket is to take the adhoc fix in cursor->bound and formalize it.
- related to
-
WT-11918 Investigate why use of bounded cursor has regression than performance improvement
- Closed