Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44991

Performance regression in indexes with keys with common prefixes

    • Fully Compatible
    • ALL
    • Storage Engines 2019-12-16, Storage Engines 2019-12-30, Storage Engines 2020-01-13
    • 1

      Test creates 5 collections with 10 indexes each. Indexes are designed to have keys with substantial common prefixes; this seemed to be important to generate the issue. Collections are populated, then are sparsely updated in parallel, aiming for roughly 1 update per page, in order to generate dirty pages at a high rate with little application work.

      Left is 4.0.13, right is 4.2.1. A-B and C-D are the update portions of the test. The performance regression is seen in the timespan for the update portion, and in the average latency.

      The rate of pages written to disk and pages evicted is substantially lower in 4.2.1. In this test dirty fill ratio is pegged at 20%, so the rate at which pages can be written to disk is the bottleneck.

      The test is run on a 24-CPU machine, so the CPU utilization during both tests is roughly what would be expected with ~5 constantly active application threads, plus 3-4 constantly active eviction threads. But in spite of the same CPU activity for eviction, we are evicting pages at a much lower rate, so we must be using more CPU per page evicted in 4.2.1. Perf shows that this additional CPU activity is accounted for by __wt_row_leaf_key_work.

        1. 屏幕快照 2019-12-19 上午10.29.17.png
          屏幕快照 2019-12-19 上午10.29.17.png
          238 kB
        2. 屏幕快照 2019-12-17 下午4.55.18.png
          屏幕快照 2019-12-17 下午4.55.18.png
          37 kB
        3. 屏幕快照 2019-12-17 下午11.02.32.png
          屏幕快照 2019-12-17 下午11.02.32.png
          243 kB
        4. With_4.2_fix_for_prefix_problem.png
          With_4.2_fix_for_prefix_problem.png
          88 kB
        5. repro.sh
          2 kB
        6. page_max_32K_still_perf_difference.png
          page_max_32K_still_perf_difference.png
          245 kB
        7. oplog suffix compression.png
          oplog suffix compression.png
          12 kB
        8. Large_page_size_in_4.2.png
          Large_page_size_in_4.2.png
          58 kB
        9. compare.png
          compare.png
          242 kB

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            36 Start watching this issue

              Created:
              Updated:
              Resolved: