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. compare.png
          242 kB
          Bruce Lucas
        2. Large_page_size_in_4.2.png
          58 kB
          Haribabu Kommi
        3. oplog suffix compression.png
          12 kB
          Haribabu Kommi
        4. page_max_32K_still_perf_difference.png
          245 kB
          Haribabu Kommi
        5. repro.sh
          2 kB
          Bruce Lucas
        6. With_4.2_fix_for_prefix_problem.png
          88 kB
          Haribabu Kommi
        7. 屏幕快照 2019-12-17 下午11.02.32.png
          243 kB
          zyd_com
        8. 屏幕快照 2019-12-17 下午4.55.18.png
          37 kB
          zyd_com
        9. 屏幕快照 2019-12-19 上午10.29.17.png
          238 kB
          zyd_com

            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: