[solved] detected frequency

Discussions about using Linux guests in VirtualBox.

[solved] detected frequency

Postby vthnts » 8. Dec 2009, 21:21

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.
vthnts
 
Posts: 4
Joined: 8. Dec 2009, 20:48
Location: Europe
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10

Re: detected frequency

Postby Perryg » 9. Dec 2009, 01:33

Is this on a laptop?
This would be set in the operating system, not in VirtualBox.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: detected frequency

Postby MarkCranness » 9. Dec 2009, 07:27

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?
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

Postby vthnts » 9. Dec 2009, 10:32

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?
vthnts
 
Posts: 4
Joined: 8. Dec 2009, 20:48
Location: Europe
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10

Re: detected frequency

Postby MarkCranness » 9. Dec 2009, 12:20

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

Try:
Code: Select all   Expand viewCollapse view
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.
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

Postby vthnts » 9. Dec 2009, 15:44

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
vthnts
 
Posts: 4
Joined: 8. Dec 2009, 20:48
Location: Europe
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: FC10

Re: [solved] detected frequency

Postby MarkCranness » 10. Dec 2009, 00:28

(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.
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


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 11 guests