Hi Edward,

On Thursday 06 September 2012 02:45:44 Edward Ned Harvey (virtualbox) wrote:
> Host machine is openindiana 151a5.  (A solaris derivative)
> Guest machines are Centos 5 (fully updated) x86_64
> 
> ntpd is not running.
> Virtualbox guest additions are running.
> 
> On the guest:
> cat /sys/devices/system/clocksource/clocksource0/*
> jiffies
> jiffies
> 
> When I power on the guests, they start with the right time from the host.
> But every minute, the guests gain approx 10 seconds.  (Holy cow!)
> Obviously, the guests are running too fast.  The host is maintaining the
> correct time.

That normally means that the guest time calibration did not work as expected.
It's always difficult in a virtualized environment to guarantee deadlines.
The Linux kernel does some calibration during boot and especially if there
is a bigger host load at the same time, for example, if you start several
VMs in parallel or if you assign too virtual CPUs to the guest, the time
calibration does not work reliably. There does code exist for other VMMs
which reads the calibration information directly from the host. Unfortunately,
there is no general interface for this case.

> The guest kernel is Linux 2.6.18-308.13.1.el5.  (Normal for a fully updated
> centos 5).  Even though this is the latest kernel for centos 5, I recognize
> this is a pretty old kernel.

Actually these 2.6.18.xyz kernels are heavily patched and are not comparable
to a vanilla kernel anymore. They are completely independent kernels. But
newer kernels seem to be able to better calibrate their timer in
virtualized environments. Unfortunately they use a guest clock frequency of
1000Hz which makes it even harder to satisfy their timing demands.

> As I google around, I find plenty of bug reports of people having
> virtualbox time running too fast or too slow for various guests, and in
> particular, too fast for centos5 / redhat 5 guests.  The bug seems to have
> been around forever ... The major question is...  While a lot of people
> post various solutions that work for specific systems in specific
> conditions, by passing arguments to the guest kernel... Is there a well
> tested, reliable, well understood solution for this?
> 
> Or do I just have to follow the random people on google, try various kernel
> options and see what works for me?

As written above, there is is no general fix for this problem. Decrease the
concurrent load on the host. Use the divider=10 parameter for the guest
kernel. This will force the guest kernel to use a clock frequency of 100Hz
which should help a lot. Try to use only one guest CPUs.

Kind regards,

Frank
-- 
Dr.-Ing. Frank Mehnert
Senior Manager Software Development Desktop Virtualization, VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
VBox-users-community mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:  
mailto:[email protected]?subject=unsubscribe

Reply via email to