Results 1 to 12 of 12
  1. #1
    Join Date
    May 2006
    Posts
    134

    My server cant tell the time!!

    I have just got a few new servers with Softlayer, and have the weirdest issue with 1 of them... The system time is terrible, it is gaining time at a rate of a couple minutes an hour.

    Softlayer have put in some cron jobs but that was screwing up the cron jobs that we use for our application, their response to this was to then go and change our applications cron jobs which I was not in the slightest but impressed about!

    I would really like to know what could be causing this issue and how to fix it if anyone can tell me? Is it hardware? Our application relies on the server keeping reliable time, I dont think this is a lot to ask! I have never experienced this kind of problem before would appreciate any ideas to fix!

  2. #2
    Join Date
    Nov 2005
    Location
    Minneapolis, MN
    Posts
    1,648
    Setup ntpd to sync your time to a known good time source, like those from the US NTP pool.
    Eric Spaeth
    Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
    "The really cool thing about facts is they remain true regardless of who states them."

  3. #3
    Join Date
    May 2006
    Posts
    134
    They setup the following cron job:

    */5 * * * * /usr/sbin/ntpdate -u time.service.softlayer.com >/dev/null 2>&1

    Would ntpd be a better solution?

  4. #4
    Join Date
    Aug 2000
    Location
    Sheffield, South Yorks
    Posts
    3,627
    No good treating the symptoms, they should be treating the cause. Is your server a dual core AMD by any chance? We've seen issues with some motherboards and AMD Dual Core CPUs, where the time increases rapidly - It's due to IRQ balancing between CPU cores. AFAIK the newer Linux Kernels and Distros have a setting to keep IRQ handling on the same CPU.
    Karl Austin :: KDAWS.com
    The Agency Hosting Specialist :: 0800 5429 764
    Partner with us and free-up more time for income generating tasks

  5. #5
    Join Date
    May 2006
    Posts
    134
    It's dual core yes but not AMD, we have a dual core opteron server that doesn't have any problems this 1 is an Intel. Is it likely to be the same issue?

  6. #6
    Join Date
    Oct 2005
    Location
    Six Degrees From You
    Posts
    1,079
    Hi Phillio,

    I had this with one of my servers. This link helped me.

    Paul

  7. #7
    Join Date
    Nov 2005
    Location
    Minneapolis, MN
    Posts
    1,648
    Quote Originally Posted by Philio
    Would ntpd be a better solution?
    ntpd will gracefully adjust the clock frequency and attempt to get the clock for the server to keep pace with a stable time source. Certainly my choice would be to setup ntpd (by configuring all 2 - 3 relevant lines in ntp.conf) rather than doing the 5 minute cron job hack.

    As others have mentioned there could still be an underlying issue, but I'd at least try to see if ntpd could even things out in the short term.
    Eric Spaeth
    Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
    "The really cool thing about facts is they remain true regardless of who states them."

  8. #8
    Join Date
    Oct 2005
    Location
    Six Degrees From You
    Posts
    1,079
    spaethco,

    Are you saying that the OP should make several calls a day to a timeserver when the link I posted gives not only the reason but also the solution?

    Paul

  9. #9
    Join Date
    Aug 2000
    Location
    Sheffield, South Yorks
    Posts
    3,627
    ntpd is not designed to cope with such a large underlying drift. I'd say it will be the same issue with IRQ handling being switched from one core to the other, causes drift of 2 to 4 seconds every 10s or so.
    Karl Austin :: KDAWS.com
    The Agency Hosting Specialist :: 0800 5429 764
    Partner with us and free-up more time for income generating tasks

  10. #10
    Join Date
    Nov 2005
    Location
    Minneapolis, MN
    Posts
    1,648
    Quote Originally Posted by KDAWebServices
    ntpd is not designed to cope with such a large underlying drift.
    Agreed, but ntpd has a higher tolerance than you'd think. I've been able to get it to correct for variance in a VMWare environment where the virtualized clock was gaining ~10 seconds every minute.
    Quote Originally Posted by PaulStuffins
    Are you saying that the OP should make several calls a day to a timeserver when the link I posted gives not only the reason but also the solution?
    The link you posted was for AMD64 processors running on a 64bit OS. The OP stated that they are running Intel processors, and no OS was specified. Ultimately fixing the underlying issue is the perfect approach to the solution; I am proposing that ntpd can make the situation "suck less" in the interim.
    Eric Spaeth
    Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
    "The really cool thing about facts is they remain true regardless of who states them."

  11. #11
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901
    * Moved to Technical and Security Issues

    Sirius
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

  12. #12
    Join Date
    Dec 2005
    Posts
    368
    I would suggest that ALL production servers should be running ntpd as spaethco suggested, whether or not you notice a time problem. Unless your server has a built-in cesium atomic clock, it will "drift" over time. ntpd is a very simple service to implement and will ensure that your time stays correct.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •