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

Use monotonic clock sources for Timer

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated: