<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities: Message List - Guest OS' clock runs too fast</title>
    <link>http://communities.vmware.com/community/vmtn/server/server1?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Wed, 26 Nov 2008 09:07:56 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-11-26T09:07:56Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/1108806?tstart=0#1108806</link>
      <description>We had the same problem (guest clock running too fast), and solved it using &lt;a class="jive-link-message" href="http://communities.vmware.com/message/890136#890136"&gt;Steve-J's solution from above&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Our setup is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Host: Dell R200 server, CentOS 5.2, Kernel 2.6.18-92.1.18.el5PAE (SMP)&lt;/li&gt;
&lt;li&gt;Guest: 2 processors (this is a definition in the vmx file), CentOS 4.6, Kernel 2.6.9-78.0.8.ELsmp&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
We just followed Steve-J's steps; on the host:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
2133000
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And then use that number when adding these lines to the end of &lt;b&gt;/etc/vmware/config&lt;/b&gt; :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;host.cpukHz = 2133000
host.noTSC = &amp;quot;TRUE&amp;quot;
ptsc.noTSC = &amp;quot;TRUE&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Then restart the vmware server:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;service vmware restart
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 26 Nov 2008 09:07:56 GMT</pubDate>
      <author>dubek</author>
      <guid>http://communities.vmware.com/message/1108806?tstart=0#1108806</guid>
      <dc:date>2008-11-26T09:07:56Z</dc:date>
      <clearspace:dateToText>12 months, 1 day ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/892575?tstart=0#892575</link>
      <description>Enable the VMware TimeTracker logging:&lt;br /&gt;
&lt;br /&gt;
Add&lt;br /&gt;
  timeTracker.periodicStats="True"&lt;br /&gt;
  timeTracker.statsIntercal="10" (for 10 sec. tracking intervall"&lt;br /&gt;
&lt;br /&gt;
to the guests .vmx file (guest needs to be restarted) and post the entries from vmware.log (start with "TimeTrackerStats").&lt;br /&gt;
&lt;p /&gt;
General background:&lt;br /&gt;
&lt;br /&gt;
The issue with virtualization and (mostly) Linux guests is, that Linux (and other OS's, too) are using the PIT (Programmable Interrupt Timer) to count the timer ticks. Linux requests a timer interrupt in frequencies of 100 - 1000 Hz per OS instance + per (virtual) processor (n+1). One bad thing about that is, that this will consume ressources, even if the system itself is idle.&lt;br /&gt;
&lt;br /&gt;
The other bad thing is that only the guest which actually owns the processor receives the interrupt, so many interrupts are lost (Lost Timer Tick). That's why the time of a virtualized machine would always run too slow, if there is no compensation.&lt;br /&gt;
Windows uses the PIT, too, and other different mechanisms/time sources which can even change if you install software, for example Apple's Quick Time.&lt;br /&gt;
&lt;br /&gt;
As loosing these ticks happens on hardware, as well, there is a Lost Timer Tick correction algorithm within Linux to compensate this. This works well enough on pure hardware.&lt;br /&gt;
But there's a second compensation mechanism if you run it onVMware: VMware tracks the interrupts lost and sends them in a timely compressed manner to the guest later (in fact not all are send, some lost ticks needs to be deleted by the Vmware time management). That's the reason why the time doesn't run consistent and seems to "jump" sometimes.&lt;br /&gt;
&lt;br /&gt;
So there are two mechanisms to keep the time accurate and that could lead to a clock running too fast (overcompensation). There is no way to slow it down with the VMware tools, yet, nor do they set the time back. Slowing down the clock is planned for a future release of the tools.&lt;br /&gt;
&lt;p /&gt;
The suboptimal usage of the PIT has changed from Kernel 2.6.18 for 32 Bit / 2.6.21 64 Bit. In newer Kernels Linux uses a different lock source (TSC, Time Stamp Counter) where it can read the time directly (has not to count the ticks to generate the time) and without using an interrupts. Another advantage is that his time device can be read faster that the PIT.&lt;br /&gt;
&lt;p /&gt;
AWo</description>
      <pubDate>Thu, 20 Mar 2008 21:47:11 GMT</pubDate>
      <author>AWo</author>
      <guid>http://communities.vmware.com/message/892575?tstart=0#892575</guid>
      <dc:date>2008-03-20T21:47:11Z</dc:date>
      <clearspace:dateToText>1 year, 8 months ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/890136?tstart=0#890136</link>
      <description>&lt;br /&gt;
might want to try this to get the cpu freq &lt;br /&gt;
&lt;p /&gt;
 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq&lt;br /&gt;
&lt;p /&gt;
use that result for the first line of :&lt;br /&gt;
&lt;p /&gt;
host.cpukHz = 1833000&lt;br /&gt;
host.noTSC = TRUE&lt;br /&gt;
ptsc.noTSC = TRUE&lt;br /&gt;
&lt;p /&gt;
and insert this into the /etc/vmware/config&lt;br /&gt;
&lt;p /&gt;
 I don't believe you use quotes around the values &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 18 Mar 2008 18:44:53 GMT</pubDate>
      <author>Steve-J</author>
      <guid>http://communities.vmware.com/message/890136?tstart=0#890136</guid>
      <dc:date>2008-03-18T18:44:53Z</dc:date>
      <clearspace:dateToText>1 year, 8 months ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/801351?tstart=0#801351</link>
      <description>&lt;br /&gt;
After playing with the timing issues for a couple hours today I figured out that the guest OS runs perfectly as long as my laptop is on AC power when it boots.  If the AC power goes away and comes back, it doesn't work without a reboot.&lt;br /&gt;
&lt;p /&gt;
Andrew</description>
      <pubDate>Wed, 21 Nov 2007 20:59:45 GMT</pubDate>
      <author>chanla</author>
      <guid>http://communities.vmware.com/message/801351?tstart=0#801351</guid>
      <dc:date>2007-11-21T20:59:45Z</dc:date>
      <clearspace:dateToText>2 years, 2 days ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/801190?tstart=0#801190</link>
      <description>&lt;br /&gt;
I am very annouying with this never ending clock problem...&lt;br /&gt;
&lt;p /&gt;
My host is Dell Laptop with 2GHz Core 2 Duo running Windows XP.  I am using VMWare Workstation 6.0.2.&lt;br /&gt;
&lt;p /&gt;
My guest is Linux 2.6.23.1 with the latest vmware tools installed and running.&lt;br /&gt;
&lt;p /&gt;
I have pretty much tried every trick I can find on how to fix the fast clock problem, but nothing seems to work.  My linux guest is not useable because the clock is running about 2x or 3x real time.  &lt;br /&gt;
&lt;p /&gt;
Setting  the host config with:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;host.cpukHz = "2000000" &lt;br clear="all" /&gt; host.noTSC = "TRUE" &lt;br clear="all" /&gt; ptsc.noTSC = "TRUE"&lt;/blockquote&gt;
&lt;br /&gt;
didn't seem to help.  I also need to add the kernel option noapic to linux with that config.&lt;br /&gt;
&lt;p /&gt;
I have tried two different clock settings for linux: clock=pit notsc and clock=mptmr and no luck with either.&lt;br /&gt;
&lt;p /&gt;
I set the kernel config to use 100Hz clock.  Didn't help.&lt;br /&gt;
&lt;p /&gt;
Now im just tinkering with different kernal options in the kernel config in hopes that disabling something will make it start working...&lt;br /&gt;
&lt;p /&gt;
Anyone else have any luck with this problem?&lt;br /&gt;
&lt;p /&gt;
Andrew</description>
      <pubDate>Wed, 21 Nov 2007 17:34:36 GMT</pubDate>
      <author>chanla</author>
      <guid>http://communities.vmware.com/message/801190?tstart=0#801190</guid>
      <dc:date>2007-11-21T17:34:36Z</dc:date>
      <clearspace:dateToText>2 years, 2 days ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/799618?tstart=0#799618</link>
      <description>Well, I hate to say it, but this is the "never ending question".  If we could get a good, definitive answer on this one, I'd be overjoyed.&lt;br /&gt;
&lt;p /&gt;
Anyone?&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
I'm running on a Dell 6650 with 3 physical CPUs (6 cores) with Ubuntu 7.04 on the physical hardware (no skew), vmware server 1.0.3(?) and seeing time skew of about 1.5x on guests running FreeBSD 6.2 and other Linux variants&lt;br /&gt;
&lt;p /&gt;
Help!&lt;br /&gt;
&lt;br /&gt;
Message was edited by: Knobee to add version information</description>
      <pubDate>Tue, 20 Nov 2007 12:33:50 GMT</pubDate>
      <author>Knobee</author>
      <guid>http://communities.vmware.com/message/799618?tstart=0#799618</guid>
      <dc:date>2007-11-20T12:33:50Z</dc:date>
      <clearspace:dateToText>2 years, 3 days ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/778038?tstart=0#778038</link>
      <description>&lt;br /&gt;
I have the same situation. Both WinXP and Linux guests are running way fast.&lt;br /&gt;
&lt;p /&gt;
No published fixes have had any effect. I first noticed the problem when I went to v1.0.3 and 64-bit and a dual-core host.&lt;br /&gt;
&lt;p /&gt;
I am running 1.0.2 on 64-bit SLES 9 on a single-core AMD Athlon64 with no problems. WinXP guests stay right on target.</description>
      <pubDate>Wed, 24 Oct 2007 21:51:50 GMT</pubDate>
      <author>Jim VandeVegt</author>
      <guid>http://communities.vmware.com/message/778038?tstart=0#778038</guid>
      <dc:date>2007-10-24T21:51:50Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/777092?tstart=0#777092</link>
      <description>BTW, the host is configured for 250 Hz (4ms):&lt;br /&gt;
&lt;br /&gt;
% gunzip -c /proc/config.gz | grep CONFIG_HZ&lt;br /&gt;
CONFIG_HZ_250=y&lt;br /&gt;
CONFIG_HZ=250</description>
      <pubDate>Tue, 23 Oct 2007 23:13:45 GMT</pubDate>
      <author>rubio</author>
      <guid>http://communities.vmware.com/message/777092?tstart=0#777092</guid>
      <dc:date>2007-10-23T23:13:45Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
    </item>
    <item>
      <title>Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/776945?tstart=0#776945</link>
      <description>I have looked for solutions for this problem, but haven't found one that works for this system. Any help or pointers would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
The clock of the guest OS runs around 1.5x faster than that of the host OS. The problem is present whether the guest OS is idle or busy. &lt;br /&gt;
&lt;br /&gt;
Among several things, I have disabled power management on the host. I have tried a time server which failed as the time drifted too fast. Also tried VMware tools, but it only corrects time when the guest falls behind, not when it goes ahead in time.&lt;br /&gt;
&lt;br /&gt;
The host is:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;One Dual-core Intel Xeon 5160 -- 3.00GHz; 12 GB&lt;/li&gt;
&lt;li&gt;"SUSE Linux Enterprise Server 10 SP1 (x86_64)"&lt;/li&gt;
&lt;li&gt;VMware-server-1.0.4-56528 (the problem was also there for version 1.0.2)&lt;/li&gt;
&lt;li&gt;cpufreq governor set to "performance" (so cpu frequency is always at 3 Ghz)&lt;/li&gt;
&lt;li&gt;No other apps running except for vmware&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The guest is:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Windows Server 2003 Enterprise&lt;/li&gt;
&lt;li&gt;1 processor; 1 GB&lt;/li&gt;
&lt;li&gt;c:\windows\system32\hal.dll internal name is halaacpi.dll&lt;/li&gt;
&lt;li&gt;default "boot.ini"&lt;/li&gt;
&lt;li&gt;Running VMware tools with time synchronization enabled&lt;/li&gt;
&lt;li&gt;Running a database and other "periodic" daemons/services&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Let me know if you have any questions or advice.</description>
      <pubDate>Tue, 23 Oct 2007 19:59:38 GMT</pubDate>
      <author>rubio</author>
      <guid>http://communities.vmware.com/message/776945?tstart=0#776945</guid>
      <dc:date>2007-10-23T19:59:38Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Guest OS' clock runs too fast</title>
      <link>http://communities.vmware.com/message/777023?tstart=0#777023</link>
      <description>I also disabled processor power management in the BIOS as recommended here (&lt;a class="jive-link-external" href="http://communities.vmware.com/thread/106492?tstart=0"&gt;http://communities.vmware.com/thread/106492?tstart=0&lt;/a&gt;). But the problem is still present.</description>
      <pubDate>Tue, 23 Oct 2007 21:18:58 GMT</pubDate>
      <author>rubio</author>
      <guid>http://communities.vmware.com/message/777023?tstart=0#777023</guid>
      <dc:date>2007-10-23T21:18:58Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
    </item>
  </channel>
</rss>

