Clock skew help ?

the skew is growing all the time. Once it hits 100 seconds, my jobs fail. I have to  reset the clocks every 10 mins manually. an some expert throw some light on this any help is highly appreciated. This is a Virtual Machine Linux Redhat ES 4.

Thanks In Advance.
rajsolarisAsked:
Who is Participating?
 
gheistCommented:
4u7 is latest, no need for software updates.

What is virtualization software you are using?i,e ESX or Server or Infrastructure? Server is worst by means of timekeeping.

Anyway - click patches for your product - http://www.vmware.com/download/
First patch is latest, no improvements in timekeeping, but you may gain something from Paravirtualzation.

Other parameters do not help with timesync. clock=pit changes timer source, but at least vmware is set to serve daytime at fixed increments every clock cycle.

0
 
0renCommented:
what do you mean you jobs ?
are you using ntp to set the time ?
0
 
rajsolarisAuthor Commented:
There are some jobs running on those servers which needs to match the time with the DB server and the timeserver they should be in sync with each other.

yes. We have 2 solaris global zones which acts as a timeserver for this VM.
I noticed one more thing, I have a cron job set on this box as init 6 every night at 2:00 AM the /var/log/messages shows the correct entry .....
May  7 02:00:45 ap01 init: Switching to runlevel: 6
but the command

11:20:27 root@ap01 # who -b
         system boot  May  7 03:24

shows some different time why is it so ?

Thanks.


0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
0renCommented:
run
date
hwclock
and see if the hardware clock is the same as the os clock
also check this link

http://communities.vmware.com/thread/93541
0
 
gheistCommented:
add boot parameter nohz=off
and make sure that you have vmware client reading date from host, and host using NTP to synchronize.
0
 
rajsolarisAuthor Commented:
These are the contents from my grub.conf where I have added nosmp noapic nolapic these boot parameters. Pl advise accordingly.
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-78.0.13.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-78.0.13.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-78.0.13.EL.img
title Red Hat Enterprise Linux ES (2.6.9-78.0.13.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-78.0.13.ELsmp ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-78.0.13.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-42.0.8.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.8.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-42.0.8.EL.img
title Red Hat Enterprise Linux ES (2.6.9-42.0.8.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.8.ELsmp ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-42.0.8.ELsmp.img

Thanks a lot for the response.
0
 
gheistCommented:
Add nohz=off to boot parameters.

What is your virtual machine host? What is exact RHEL release including Update version?
0
 
rajsolarisAuthor Commented:
Red Hat Enterprise Linux ES release 4 (Nahant Update 7)

shall I remove the other parameters from the grub.conf ?
0
 
gheistCommented:
... and with nohz enabled this VMWare misfeature makes realtime clock extremely slow ...
(But it helps to save electricity in all other environments)
0
 
gheistCommented:
And also - do not use NTPD, uninstall it. VMWare tools does timesyncing part.
0
 
rajsolarisAuthor Commented:
yes. We are using ESX host OS 3.5.

 8 May 09:57:30 ntpdate[9080]: step time server 10.65.192.127 offset 28.027599 sec
 8 May 09:58:45 ntpdate[9102]: step time server 10.65.192.127 offset 43.196146 sec
 8 May 09:59:17 ntpdate[9121]: step time server 10.65.192.124 offset 15.146884 sec
 8 May 10:00:19 ntpdate[9135]: step time server 10.65.192.124 offset 11.712952 sec
 8 May 10:01:05 ntpdate[9379]: step time server 10.65.192.124 offset 3.154559 sec
 8 May 10:02:02 ntpdate[9433]: step time server 10.65.192.127 offset 0.909640 sec
 8 May 10:03:02 ntpdate[9436]: adjust time server 10.65.192.127 offset 0.049909 sec
 8 May 10:04:01 ntpdate[9439]: adjust time server 10.65.192.124 offset -0.007343 sec
 8 May 10:05:01 ntpdate[9445]: adjust time server 10.65.192.124 offset -0.014649 sec
 8 May 10:06:01 ntpdate[9465]: adjust time server 10.65.192.127 offset 0.008264 sec
 8 May 10:07:01 ntpdate[9468]: adjust time server 10.65.192.124 offset 0.071408 sec
 8 May 10:08:09 ntpdate[9473]: step time server 10.65.192.127 offset 7.034123 sec

This is what the output is after running ntpdate every 1 mint.
And tried adding following boot parameters:

title Red Hat Enterprise Linux ES (2.6.9-78.0.13.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-78.0.13.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-78.0.13.EL.img
title Red Hat Enterprise Linux ES (2.6.9-78.0.13.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-78.0.13.ELsmp ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-78.0.13.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-42.0.8.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.8.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-42.0.8.EL.img
title Red Hat Enterprise Linux ES (2.6.9-42.0.8.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.0.8.ELsmp ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic
        initrd /boot/initrd-2.6.9-42.0.8.ELsmp.img


Thanks.
0
 
gheistCommented:
My suggestion is to remove all the kernel parameters you have added to fix the clock and add only nohz=off

Your ntpdate result confirms that clock is way too slow, vmware counts time in interrupts, linux not anymore.

Your ESX has security issue http://support.vmware.com/selfsupport/download/ but no timing fixes until latest patch4.
0
 
svsCommented:
gheist, VMware specifically recommends to run ntpd and not rely on vmware tools.  

Read their best practice paper on time synchronization for Linux guests:

http://kb.vmware.com/kb/1006427
0
 
gheistCommented:
It looks like covering hole in the wall with piece of carpet.
Their timing infrastructure is incomplete. Running fixed speed clock in VM makes it somewhat accurate at least to the degree it does not drift extremely far away. On less loaded systems clock drift will go outside ntpd's limits and it will exit.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.