Use monotonic clock sources for Timer

XMLWordPrintableJSON

    • Service Arch
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Mongo currently uses gettimeofday() for all posix interval metrics. As this function is not monotonic, we may see anomalies under certain conditions; e.g. VMM live migration, some SMP process migrations, system sleep/suspend/hibernate, NTP or system date changes, TSC-related kernel or VMM bugs, etc.

      The FineClock class (src/mongo/db/stats/fine_clock.h) implements a monotonic clock source, however the code is currently Linux specific and unused. The goal here would be to make this class fully functional on all platforms and ensure performance is >= gettimeofday(). It may also be worth migrating the win32 code from boost::xtime to QueryPerformanceCounter() or similar as boost::xtime has been deprecated.

        1. YCSB-Load.png
          143 kB
          Eitan Klein

              Assignee:
              [DO NOT USE] Backlog - Service Architecture
              Reporter:
              Ben Becker (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: