All of lore.kernel.org
 help / color / mirror / Atom feed
* cpu frequency
@ 2014-12-23 11:19 Nerijus Baliunas
  2014-12-23 11:37 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Nerijus Baliunas @ 2014-12-23 11:19 UTC (permalink / raw)
  To: kvm

Hello,

A commercial application running on Windows (kvm guest) detects CPU as:
CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2200,
078BFBFD000206A1, 10753, CPU 0
After some time, without reboot, it detects as:
CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2298,
078BFBFD000206A1, 10753, CPU 0

Windows Server 2012 Control Panel -> System shows CPU as 2.3 GHZ, but after 
reboot it might show 2.2 or 1.97 GHz.

The problem is, that commercial application stops working after it detects 
CPU frequency change (2200 -> 2298 in above case). Is it possible to patch 
qemu-kvm that it shows some constant frquency to the guest?

Regards,
Nerijus



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 11:19 cpu frequency Nerijus Baliunas
@ 2014-12-23 11:37 ` Paolo Bonzini
  2014-12-23 11:57   ` Nerijus Baliunas
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2014-12-23 11:37 UTC (permalink / raw)
  To: Nerijus Baliunas, KVM list



On 23/12/2014 12:19, Nerijus Baliunas wrote:
> Hello,
> 
> A commercial application running on Windows (kvm guest) detects CPU as:
> CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2200,
> 078BFBFD000206A1, 10753, CPU 0
> After some time, without reboot, it detects as:
> CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2298,
> 078BFBFD000206A1, 10753, CPU 0
> 
> Windows Server 2012 Control Panel -> System shows CPU as 2.3 GHZ, but after 
> reboot it might show 2.2 or 1.97 GHz.
> 
> The problem is, that commercial application stops working after it detects 
> CPU frequency change (2200 -> 2298 in above case). Is it possible to patch 
> qemu-kvm that it shows some constant frquency to the guest?

How are you running qemu-kvm?  (Command line, or XML if you're using
libvirt, or similar).

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 11:37 ` Paolo Bonzini
@ 2014-12-23 11:57   ` Nerijus Baliunas
  2014-12-23 14:40     ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Nerijus Baliunas @ 2014-12-23 11:57 UTC (permalink / raw)
  To: kvm

Paolo Bonzini <pbonzini <at> redhat.com> writes:

> How are you running qemu-kvm?  (Command line, or XML if you're using
> libvirt, or similar).

XML - http://paste.fedoraproject.org/162378/14193357
command line - http://paste.fedoraproject.org/162379/93358231


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 11:57   ` Nerijus Baliunas
@ 2014-12-23 14:40     ` Paolo Bonzini
  2014-12-23 22:52       ` Nerijus Baliunas
  2015-02-03 13:25       ` Nerijus Baliunas
  0 siblings, 2 replies; 11+ messages in thread
From: Paolo Bonzini @ 2014-12-23 14:40 UTC (permalink / raw)
  To: Nerijus Baliunas, kvm

> A commercial application running on Windows (kvm guest) detects CPU as:
> CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2200,
> 078BFBFD000206A1, 10753, CPU 0
> After some time, without reboot, it detects as:
> CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2298,
> 078BFBFD000206A1, 10753, CPU 0
> 
> Windows Server 2012 Control Panel -> System shows CPU as 2.3 GHZ, but after 
> reboot it might show 2.2 or 1.97 GHz.
> 
> The problem is, that commercial application stops working after it detects 
> CPU frequency change (2200 -> 2298 in above case). Is it possible to patch 
> qemu-kvm that it shows some constant frquency to the guest?

Do you know how the application computes the frequency?

In the case of Windows it's probably some timing loop that is executed
at startup, and the result depends on frequency scaling in the host.
Try adding this to the XML in the meanwhile, and see if the control
panel shows the same value:

Inside <features>:

  <hyperv>
    <relaxed state='on'/>
  </hyperv>

Inside <clock offset='localtime'>:

  <timer name='hypervclock' present='yes'/>

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 14:40     ` Paolo Bonzini
@ 2014-12-23 22:52       ` Nerijus Baliunas
  2015-01-05 12:44         ` Nerijus Baliunas
  2015-02-03 13:25       ` Nerijus Baliunas
  1 sibling, 1 reply; 11+ messages in thread
From: Nerijus Baliunas @ 2014-12-23 22:52 UTC (permalink / raw)
  To: kvm

Paolo Bonzini <pbonzini <at> redhat.com> writes:

> Do you know how the application computes the frequency?

No.

> In the case of Windows it's probably some timing loop that is executed
> at startup, and the result depends on frequency scaling in the host.
> Try adding this to the XML in the meanwhile, and see if the control
> panel shows the same value:
> 
> Inside <features>:
> 
>   <hyperv>
>     <relaxed state='on'/>
>   </hyperv>
> 
> Inside <clock offset='localtime'>:
> 
>   <timer name='hypervclock' present='yes'/>

So far Control Panel -> System shows CPU as 2.2 GHz, I rebooted once. So it 
seems OK.

Thanks,
Nerijus



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 22:52       ` Nerijus Baliunas
@ 2015-01-05 12:44         ` Nerijus Baliunas
  0 siblings, 0 replies; 11+ messages in thread
From: Nerijus Baliunas @ 2015-01-05 12:44 UTC (permalink / raw)
  To: kvm

Nerijus Baliunas <nerijus <at> users.sourceforge.net> writes:

> Paolo Bonzini <pbonzini <at> redhat.com> writes:
> 
> > In the case of Windows it's probably some timing loop that is executed
> > at startup, and the result depends on frequency scaling in the host.
> > Try adding this to the XML in the meanwhile, and see if the control
> > panel shows the same value:
> > 
> > Inside <features>:
> > 
> >   <hyperv>
> >     <relaxed state='on'/>
> >   </hyperv>
> > 
> > Inside <clock offset='localtime'>:
> > 
> >   <timer name='hypervclock' present='yes'/>
> 
> So far Control Panel -> System shows CPU as 2.2 GHz, I rebooted once. So it 
> seems OK.

Unfortunately after the host reboot the problem reappeared once. It helped to 
reboot the VM. Any ideas what else to try?

Regards,
Nerijus



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2014-12-23 14:40     ` Paolo Bonzini
  2014-12-23 22:52       ` Nerijus Baliunas
@ 2015-02-03 13:25       ` Nerijus Baliunas
  2015-02-03 14:03         ` Paolo Bonzini
  2015-02-03 14:07         ` Andrey Korolyov
  1 sibling, 2 replies; 11+ messages in thread
From: Nerijus Baliunas @ 2015-02-03 13:25 UTC (permalink / raw)
  To: Paolo Bonzini, kvm

On Tue, 23 Dec 2014 15:40:22 +0100 Paolo Bonzini <pbonzini@redhat.com> wrote:

> > A commercial application running on Windows (kvm guest) detects CPU as:
> > CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2200,
> > 078BFBFD000206A1, 10753, CPU 0
> > After some time, without reboot, it detects as:
> > CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2298,
> > 078BFBFD000206A1, 10753, CPU 0
> > 
> > Windows Server 2012 Control Panel -> System shows CPU as 2.3 GHZ, but after 
> > reboot it might show 2.2 or 1.97 GHz.
> > 
> > The problem is, that commercial application stops working after it detects 
> > CPU frequency change (2200 -> 2298 in above case). Is it possible to patch 
> > qemu-kvm that it shows some constant frquency to the guest?
> 
> Do you know how the application computes the frequency?
> 
> In the case of Windows it's probably some timing loop that is executed
> at startup, and the result depends on frequency scaling in the host.
> Try adding this to the XML in the meanwhile, and see if the control
> panel shows the same value:
> 
> Inside <features>:
> 
>   <hyperv>
>     <relaxed state='on'/>
>   </hyperv>
> 
> Inside <clock offset='localtime'>:
> 
>   <timer name='hypervclock' present='yes'/>
> 
> Paolo

It did not help. Today that commecrial application detects 2400, although
Control Panel -> System shows 2.20 GHz.
So my question again - is it possible to patch qemu-kvm that it shows some
constant frequency to the guest? But the answer is probably not, because
I don't know how the application computes the frequency...

Regards,
Nerijus

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2015-02-03 13:25       ` Nerijus Baliunas
@ 2015-02-03 14:03         ` Paolo Bonzini
  2015-02-03 14:07         ` Andrey Korolyov
  1 sibling, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2015-02-03 14:03 UTC (permalink / raw)
  To: Nerijus Baliunas, kvm



On 03/02/2015 14:25, Nerijus Baliunas wrote:
> It did not help. Today that commecrial application detects 2400, although
> Control Panel -> System shows 2.20 GHz.
> So my question again - is it possible to patch qemu-kvm that it shows some
> constant frequency to the guest? But the answer is probably not, because
> I don't know how the application computes the frequency...

Indeed.

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2015-02-03 13:25       ` Nerijus Baliunas
  2015-02-03 14:03         ` Paolo Bonzini
@ 2015-02-03 14:07         ` Andrey Korolyov
  2015-02-04  0:06           ` Nerijus Baliunas
  1 sibling, 1 reply; 11+ messages in thread
From: Andrey Korolyov @ 2015-02-03 14:07 UTC (permalink / raw)
  To: Nerijus Baliunas; +Cc: Paolo Bonzini, kvm

> It did not help. Today that commecrial application detects 2400, although
> Control Panel -> System shows 2.20 GHz.
> So my question again - is it possible to patch qemu-kvm that it shows some
> constant frequency to the guest? But the answer is probably not, because
> I don't know how the application computes the frequency...
>

Have you tried to disable turbo mode (assuming you have new enough CPU
model) and fix frequency via frequency governor` settings? If it
helps, it can be an ugly hack with pre-up/post-up libvirt actions,
though you`d probably want to keep frequency the same to maximize
performance.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2015-02-03 14:07         ` Andrey Korolyov
@ 2015-02-04  0:06           ` Nerijus Baliunas
  2015-02-04  7:20             ` Andrey Korolyov
  0 siblings, 1 reply; 11+ messages in thread
From: Nerijus Baliunas @ 2015-02-04  0:06 UTC (permalink / raw)
  To: Andrey Korolyov; +Cc: kvm

On Tue, 3 Feb 2015 18:07:57 +0400 Andrey Korolyov <andrey@xdel.ru> wrote:

> Have you tried to disable turbo mode (assuming you have new enough CPU
> model) and fix frequency via frequency governor` settings? If it
> helps, it can be an ugly hack with pre-up/post-up libvirt actions,
> though you`d probably want to keep frequency the same to maximize
> performance.

I tried to alter frequency governor settings, but unsuccessfully.
They seem to change but then revert back in some short time.
CentOS 7, Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz.

Regards,
Nerijus

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: cpu frequency
  2015-02-04  0:06           ` Nerijus Baliunas
@ 2015-02-04  7:20             ` Andrey Korolyov
  0 siblings, 0 replies; 11+ messages in thread
From: Andrey Korolyov @ 2015-02-04  7:20 UTC (permalink / raw)
  To: Nerijus Baliunas; +Cc: kvm

On Wed, Feb 4, 2015 at 3:06 AM, Nerijus Baliunas
<nerijus@users.sourceforge.net> wrote:
> On Tue, 3 Feb 2015 18:07:57 +0400 Andrey Korolyov <andrey@xdel.ru> wrote:
>
>> Have you tried to disable turbo mode (assuming you have new enough CPU
>> model) and fix frequency via frequency governor` settings? If it
>> helps, it can be an ugly hack with pre-up/post-up libvirt actions,
>> though you`d probably want to keep frequency the same to maximize
>> performance.
>
> I tried to alter frequency governor settings, but unsuccessfully.
> They seem to change but then revert back in some short time.
> CentOS 7, Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz.
>

I remember that the floating frequency was resulted in incorrect guest
CPU information, so may be it is an exact solution for your situation.
Those frequency values could be altered by running service,
unfortunately I have a not enough knowledge about Centos7 packages to
name it.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-04  7:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-23 11:19 cpu frequency Nerijus Baliunas
2014-12-23 11:37 ` Paolo Bonzini
2014-12-23 11:57   ` Nerijus Baliunas
2014-12-23 14:40     ` Paolo Bonzini
2014-12-23 22:52       ` Nerijus Baliunas
2015-01-05 12:44         ` Nerijus Baliunas
2015-02-03 13:25       ` Nerijus Baliunas
2015-02-03 14:03         ` Paolo Bonzini
2015-02-03 14:07         ` Andrey Korolyov
2015-02-04  0:06           ` Nerijus Baliunas
2015-02-04  7:20             ` Andrey Korolyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.