Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9936

Reduce the overhead of configuration parsing in the bounded cursor API.

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • WT11.1.0, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage Engines - 2022-10-03, Storage Engines - 2022-10-17

      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.

            Assignee:
            luke.pearson@mongodb.com Luke Pearson
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: