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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • WT11.1.0, 6.2.0-rc0
    • None
    • None
    • 5
    • Storage Engines - 2022-10-03, Storage Engines - 2022-10-17

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: