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

Multi threaded reader writer example shows temporary slowdown or lockup

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.10, 3.3.12
    • Affects Version/s: WT2.8.0
    • Component/s: None
    • Labels:
      None

      Please see the attached test program, it can be run under test/csuite. The test creates two threads: one is populating/updating records in a table with a few indices, the other is reading from table and indices. The test is adapted from one that uses cursor joins. This test does not, but simulates some of the same access patterns.

      Failure mode: after a second or two of progress by both threads, they both appear to slow dramatically, almost locking up. After some time (I've observed from a half minute to a few minutes), the lock up ends and both threads seem to be inserting and reading at a normal fast pace. That appears to continue until the test ends, I've tried 10,000,000 inserts over a few minutes. The severe slowdown appears to start approximately the same time on each test run, between 3000 and 4000 inserts.

      I've tried transactions vs no transactions and that does not make any difference. Increased cache size to 1g, 2g, no difference. Confirmed on OSX 10.11.5 and Debian 8.1. Adding/tweaking usleep calls within the loop hasn't helped.

      I do not see the problem in WT 2.7.0.

        1. main.c
          10 kB

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: