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

Investigation - Refactor code to boost performance in some workloads

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines
    • 13
    • StorEng - Defined Pipeline

      I found in the WiredTiger code that the usage of prefix/postfix increment/decrement operator is not consistent. Though there are a lot of discussions and documents/blogs that explain why the prefix increment/decrement operator is efficient in C+, in terms of performance, "++i" is sometimes faster than "i++" and is never slower than "i++". For types like int, it doesn't matter: "++i" and "i++" are the same speed because I thought the compiler would take care of these. I experimented with WiredTiger code to make it consistent and ran too many high-value workload sys-perf tests and found that there are some improvements in YCSB workloads (although some numbers are surprising for me).

      I ran all the WiredTiger tests, including performance tests, stress tests, MongoDb tests just to make sure it was not affecting the correctness. Below are the details of all the tests.

      Here is the sys-perf results
      Sys-Perf-Run1.
      Sys-Perf-Run2.
      Sys-Perf-Run3
      Sys-Perf-Run4

      Here is the patch build for the full run of WiredTiger tests - https://spruce.mongodb.com/version/65f44995be54e60007f7a582/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
      Here is the patch build for the full run of MongoDB tests - https://spruce.mongodb.com/version/65f63ba65255660007507685/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
      Here is the WiredTiger performance test runs -
      Run1
      Run2
      Run3
      Run4

        1. Screenshot 2024-03-18 at 3.26.25 pm.png
          Screenshot 2024-03-18 at 3.26.25 pm.png
          232 kB
        2. Screenshot 2024-03-18 at 3.24.58 pm.png
          Screenshot 2024-03-18 at 3.24.58 pm.png
          301 kB
        3. Screenshot 2024-03-17 at 5.52.57 pm.png
          Screenshot 2024-03-17 at 5.52.57 pm.png
          835 kB
        4. Screenshot 2024-03-17 at 5.52.48 pm.png
          Screenshot 2024-03-17 at 5.52.48 pm.png
          835 kB
        5. Screenshot 2024-03-17 at 5.52.40 pm.png
          Screenshot 2024-03-17 at 5.52.40 pm.png
          810 kB
        6. Screenshot 2024-03-17 at 5.52.26 pm.png
          Screenshot 2024-03-17 at 5.52.26 pm.png
          788 kB
        7. FLE Perf.png
          FLE Perf.png
          356 kB

            Assignee:
            ravi.giri@mongodb.com Ravi Giri
            Reporter:
            ravi.giri@mongodb.com Ravi Giri
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: