• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

VM Timekeeping and PPD

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Cluster

Member
Joined
Dec 5, 2001
Location
Canuckistan
Just noticed something a bit off with my VMs as i was checking how their PPD was doing with my GPU client turned off. Im normally expecting these to run about 4kppd, did some quick math on my time/frame and it was working out close to 6kppd, sounds nice and all, but i knew something was up. So i took a look at the time in each VM, the time in windows, and there's quite a bit of difference between them. Then i compared the two VMs i have running, and there was quite a difference between them too lol. So i put up the clock setting screen to watch the seconds tick, got a wall clock to see where the error was, my host OS clock is right on the mark, but the VMs are running about 4-7 seconds slow per minute. Which was greatly inflating my PPD, and of course this would flow over into FahMon if your using it too. I think as far as VMware is concerned, you need to have VMWare Tools installed to get an accurate time sync between guest and host, so im gonna give that a shot.

Just a heads up for anyone checking their ppd in VMs, if your time in the VM os is way behind your host OS, then your ppd being output by any tracking app is likely inflated more than it really is.

Though 5500 ppd out of my Phenom sure did look nice :D
 
Did some messing around. It only seems to be off while folding is running. Stopped folding and the time started running in sync with my host OS. Im guessing vmware tools might help, dont have the time atm to mess around with it, as there is no apt-get for it, there's an rpm and a tarball, might mess with it later.
 
I've always thought it to be a SMP kernel & AMD issue that I had hoped AMD would fix with K10. I had little success running VMWare on my K8s (90nm or 65nm) in regards to the "time sync" issue... otherwise they did indeed run the guest OS just fine. One way I was able to "fix" the timing issues was to disable SMP in the kernel (or set VMWare to one cpu, either or). But then I was only able to use one cpu and couldn't run the SMP Client - unacceptable! :) To be honest I never tried VMWare Tools in those cases, so I don't know if it would have helped or not.

This "timing issue" has really been a point of curiosity for me for a while... so it's nice to see someone else make the same observation on an AMD chip.

Based on observation, my Intels don't lose that much time over long periods. All my log files from my Linux VMs show similar times based on the UTC time stamps. Case in point, I've had two VMs up on Q6600 machine and it's been Folding away for over 66 days non-stop... logs still look to be in sync with my GPU and WinSMP clients. No VMWare Tools! ;)
 
Its not so much an 'amd' issue, though it is really hard to point a finger at any one spot, there's about 5-6 different places in the chain between cpu and guest os kernel that could be at fault.

What makes it even worse is there's about 6 different ways to track 'time', as a computer sees it. The old school method relied on hardware interrupts and is referred to as 'tick-timing', the cpu was responsible to inform the OS every so many ticks with an interrupt, and the OS would update the time. Newer timing mechanisms, called 'tickless-timing' uses special performance registers on the cpu that the OS can query to get the time. My guess is that for amd chips, vmware is using tick-timing, and when an OS goes under load, the tick-timing mechanism can be skewed, this isnt a problem under a host OS because the kernel knows how to account for it, but there are more issues when it comes to VMs.

It all gets rather complex and confusing, but it really comes down to how vmware interracts with the host and guess to relay timing properly. And if you want to know more, there's a 10 page article on the concept on the vmware site somewhere that goes into better detail :)
 
I did some snooping around some vmware docs regarding linux guest OS installs. And i found a kernel command-line option that solves the issue without having to install vmware tools.

clocksource=acpi_pm

Im going to add instructions on where this goes and whatnot to my install guide. But basically goto your /boot/grub/menu.lst and edit the 'kernel' line, appending that at the end. I've only been running this change for a few minutes, but compared to how it was before, this seems to be keeping pace with my host.
 
I am having a problem with this too but i cant seem to fix it. I added the clocksource=acpi_pm line but still the time is lagging behind. It means that FahMon thinks that the folding client has hung. The time re-syncs when i restart the VM but i dont want to be at that all the time. Any other ideas welcome. I'm using Vmware server 1.0.8 and Ubuntu.
 
Odd that it doesnt work, its the fix that is provided by vmware for ubuntu, along with many other distros. I have noticed that my clocks are 'slightly' behind (a couple of seconds to a minute after a few days), but it is much better than the 50 second minutes that i was getting before.

There is the alternative that is supposed to be the absolute method for perfect clock synchronization, installing vmware tools, i've been thinking to add an explanation of the process to my guide, but just havent had the time the last few days.

Are you sure its edited properly? Not doubting you, but even a simple typo or having it in the wrong place will cause the kernel to ignore it.
 
I'll check again and I'll try installing the vmware tools but i have no idea how to configure it. This is my first time using Linux for anything productive.

*EDIT*
My 500th post and my 5th star :D
 
I got my time issue sorted by installing the VMware Tools. Here’s a quick guide on what to do. This is done using VMware Server 1.0.8.


  1. When you have your VM open go the toolbar and click VM and select Install VMware Tools. A window will appear asking you to make sure the guest operating system is running. Click install to proceed.


  2. On the guest OS desktop there should now be a DVD icon called VMware tools. Open it and extract the contents of the file called VMwareTools-1.0.8-xxxxxx.tar.gz to your Home Folder (also called [username] in the extract manager). It’s a good idea to go into the Home Folder and re-name the vmware-tools-distrib to something short like vmt as it saves some typing later on.


  3. Open up Terminal and enter the following:

    -> cd ~/vmt
    -> sudo ./vmware-install.pl

    It will then ask you to select where to install the Binary Files, Init Directories, Init Scripts, Daemon Files, Library Files, and the Documentation. For each one just press enter and they will be installed in default locations. You will then be asked if you want to VMware Tools; just press enter to continue.


  4. When the configuration starts you may get the following warning depending on the version of Linux you are using:
    None of the pre-built vmhgfs modules for VMware Tools is suitable for your running kernel. Do you want this program to try and build the vmhgfs module for your system (you need to have a C compiler installed on your system)? [yes]
    Just press enter and when it asks for the location of the directory of C header files just press enter again for the default location. The module is then built.
    When it is finished press enter again to continue. You are then asked to select a resolution for you screen by selecting a number from the list 1-13 where each number is for a different resolution. Press enter after making you selection and VMware Tools is installed. You should then re-start Linux before continuing.


  5. After restarting Linux its time to actually configure VMware Tools to keep the time synchronized with your system time.
    Open Terminal and enter the following:

    -> vmware-toolbox &

    This will launch the VMware Tools. On the first tab of the window that open you will find an option for Time Synchronization Between the Virtual Machine and the Host Operation System. Tick the box beside it and click close. Your time will now stay synchronized with your system time.

Hope this helps others out who are in this situation :)
 
Double that... looks like it's time for a VM refresh after the holidays. :) ...I'm still running Ubuntu 7.04. ;)
 
I've finally solved my problems with VMWare on my old 939 hardware. :)

Cluster... I tried adding the kernel switch you showed us 'clocksource=acpi_pm'. That didn't seem to help, left it enabled anyway. Also tried enabling sync via NTP, which I guess only happens on startup? :shrug:

What did for me... and it's really just another kludge... was having VMWare Tools installed, then going to the .vmx file (config file) for the VM and changing the following:

tools.syncTime = "TRUE"

Mine was set "FALSE"... but after changing to "TRUE" every couple minutes my VM plays "catch up" with the host system clock. Again, kind of a kludge... but it does keep the clock relatively accurate and allows me to monitor the VM with FahMon with, again, relative accuracy. :)

Here's the post where I found this "fix":

http://muffinresearch.co.uk/archives/2008/07/22/vmware-fixing-time-drift-in-amd-dual-core-systems/
 
I tried installing VMTools on my computer, and I keep getting an error that "VMTools is not available for my guest OS". I am running VMware server 1.08 and Ubuntu 8.04 on my Q9300 quad. I have a physical CD-ROM drive setup in the VM, but I do not have a virtual CD-ROM drive setup. Do I need one?
 
Back