[solved] detected frequency

Discussions about using Linux guests in VirtualBox.
Post Reply
vthnts
Posts: 4
Joined: 8. Dec 2009, 20:48
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10
Location: Europe

[solved] detected frequency

Post by vthnts »

Hi,

I am using VirtualBox 3.0.10 on an Intel core2duo T9400 at 2.53GHz.
Host OS: Windows Vista
Guest OS: Fedora Core 10 (Linux version 2.6.27.38-170.2.113.fc10.i686)

Everything is fine.
But I am getting a weird detected frequency anytime I reboot the Guest OS...
Here is a sample of detected frequencies:

kernel: Detected 273.212 MHz processor.
kernel: Detected 1630.253 MHz processor.
kernel: Detected 212.622 MHz processor.
kernel: Detected 105.430 MHz processor.
kernel: Detected 2425.616 MHz processor.
kernel: Detected 99.620 MHz processor.

Why is the detected frequency changing?
How can I get the maximum frequency at every reboot?
Thanks for your help!

V.
Last edited by vthnts on 9. Dec 2009, 16:02, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: detected frequency

Post by Perryg »

Is this on a laptop?
This would be set in the operating system, not in VirtualBox.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: detected frequency

Post by MarkCranness »

Time keeping inside a guest sometimes has problems, and such problems could affect calculations such as the CPU clock you give.
See: http://www.virtualbox.org/ticket/3135
Do you have any: 'TM: Giving up catch-up attempt...' lines in your VBox.log?
vthnts
Posts: 4
Joined: 8. Dec 2009, 20:48
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10
Location: Europe

Re: detected frequency

Post by vthnts »

Is this on a laptop?
This would be set in the operating system, not in VirtualBox.
Yup, this is on a laptop.
Do you have any: 'TM: Giving up catch-up attempt...' lines in your VBox.log?
Nope.
But, um... interesting..., here is what I found in the two latest VBox logs while looking for "TM":

00:00:02.714 TM: cTSCTicksPerSecond=0x104ad0c0 (273 338 560) fTSCVirtualized=true fTSCUseRealTSC=false
00:00:01.151 TM: cTSCTicksPerSecond=0x612c7940 (1 630 304 576) fTSCVirtualized=true fTSCUseRealTSC=false

Matching the Fedora boot messages:

kernel: Detected 273.212 MHz processor.
kernel: Detected 1630.253 MHz processor.

Is there a way to fix this or is it a VirtualBox bug?
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: detected frequency

Post by MarkCranness »

AMD or Intel CPU, family, model, and what does the fMaybeUseOffsettedHostTSC value say (on the line below)?

Try:

Code: Select all

VBoxManage setextradata "<VMName>" "VBoxInternal/TM/TSCTicksPerSecond" 2530000000
Then turn off the VirtualBox service / time-sync daemon in the guest (I'm not sure how to do that for a Linux VM) and see how the VM time tracks and also if any 'TM: Giving up catch-up attempt...' lines then appear in your VBox.log.
Maybe set 2/3 of that amount, = 1686666667 (based on a crazy theory...)

I'd say it's a VirtualBox bug. I'd say it's VirtualBox doing the best it can to handle a CPU that has a varying TSC clock?
Last edited by MarkCranness on 10. Dec 2009, 00:28, edited 2 times in total.
vthnts
Posts: 4
Joined: 8. Dec 2009, 20:48
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10
Location: Europe

Re: detected frequency

Post by vthnts »

It used to be fMaybeUseOffsettedHostTSC=true in previous boots.

After executing the code you provided:

00:00:00.799 TM: cTSCTicksPerSecond=0x96ccbc80 (2 530 000 000) fTSCVirtualized=true fTSCUseRealTSC=false
00:00:00.799 TM: fMaybeUseOffsettedHostTSC=false TSCTiedToExecution=false TSCNotTiedToHalt=false

And Fedora now sees the right frequency:

kernel: Detected 2529.899 MHz processor.

A good enough workaround for me.
Thanks a lot!

:D
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: [solved] detected frequency

Post by MarkCranness »

(fMaybeUseOffsettedHostTSC was set true when VirtualBox had identified your CPU as having the 'Invariant TSC' feature.)

You might want to check that your VM is keeping time accurately.
Post Reply