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

Improve the performance of getting snapshots with many sessions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      4
    • Last comment by Customer:
      true

      Description

      When there are many open sessions, WiredTiger can spend a lot of time establishing transaction snapshots. Try to reduce that overhead.

      1. begin_txn_perf.c
        2 kB
        Michael Cahill

        Issue Links

          Activity

          Hide
          michael.cahill Michael Cahill added a comment -

          Attaching a test program that can be used to measure the overhead of getting a snapshot.

          Show
          michael.cahill Michael Cahill added a comment - Attaching a test program that can be used to measure the overhead of getting a snapshot.
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: WT-1977 Improve the performance of getting snapshots with many sessions.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/21a31db840ca85e98fde9b995e3d7cc9b6e5f63f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: WT-1977 Improve the performance of getting snapshots with many sessions. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/21a31db840ca85e98fde9b995e3d7cc9b6e5f63f
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

          Message: Merge pull request #2024 from wiredtiger/snapsort-search

          WT-1977 Improve the performance of getting snapshots with many sessions
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/e43b22a6747d29fb88cbea69ca90429b36581909

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'} Message: Merge pull request #2024 from wiredtiger/snapsort-search WT-1977 Improve the performance of getting snapshots with many sessions Branch: develop https://github.com/wiredtiger/wiredtiger/commit/e43b22a6747d29fb88cbea69ca90429b36581909
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'}

          Message: WT-1977: To defer the equality comparison until outside the binary search
          loop, you have to reduce the search regardless of the comparison's return,
          otherwise you'll move past the match.

          Since we're comparing integers and the comparison is cheap, I'm adding an
          equality comparison inside the loop. This makes it harder to generalize
          this macro (so we may want to go back to deferring the equality comparison
          until outside the loop, which only requires a single test of less-than or
          greater-than, but as noted, you have to reduce the search regardless of the
          test result, which means a different kind of wrapping loop).

          One other fix, test for n == 0 before setting limit to (n - 1) and testing
          it against 0.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/4fe2964d644eccc1a4fd9b320f9a29c5abb2b25d

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'} Message: WT-1977 : To defer the equality comparison until outside the binary search loop, you have to reduce the search regardless of the comparison's return, otherwise you'll move past the match. Since we're comparing integers and the comparison is cheap, I'm adding an equality comparison inside the loop. This makes it harder to generalize this macro (so we may want to go back to deferring the equality comparison until outside the loop, which only requires a single test of less-than or greater-than, but as noted, you have to reduce the search regardless of the test result, which means a different kind of wrapping loop). One other fix, test for n == 0 before setting limit to (n - 1) and testing it against 0. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/4fe2964d644eccc1a4fd9b320f9a29c5abb2b25d

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 44 weeks, 3 days ago
                Date of 1st Reply: