I am trying to get the steal time with 2 VMs (each with 1 Vcpu) pinned to same core.
I run the same application on these 2 VMs simultaneously and see the performance difference. I am trying to read the steal time from inside the guest using top, vmstat etc.
vmstat -s report the steal time (st) as 0. I also
checked that procps is in latest version. I am using virtio-net. I
suspect that the steal time is not being updated well. Is there
something which I need to configure for this to work? My Linux version
for guest image is:
Linux server-147 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:15:26 UTC 2010 x86_64 GNU/Linux
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 0.14.0 stepping : 3 cpu MHz : 2992.498 cache size : 4096 KB fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good pni cx16 hypervisor lahf_lm bogomips : 5984.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:
Is there a way to programmatically get the value of steal cycles (e.g. using a C program)?