[vbox-dev] IPerformance Stats

Aleksey Ilyushin Aleksey.Ilyushin at Sun.COM
Tue Jan 19 18:59:07 GMT 2010


Hi Joe,

VirtualBox obtains VM process stats from /proc/<pid>/stat (utime and  
stime members as listed in man page for CPU time spent in user and  
kernel modes respectively), just like ps command does. Please try to  
compare the values against the values reported by ps.

Cheers,
Aleksey

On Jan 19, 2010, at 8:34 PM, Joseph Smith wrote:

> Hi,
>
> I am trying to understand the performance values returned by the  
> queryMetricsData APIs (same for the VBoxManage command line utility).
>
> From my testing, the values being returned for a running VM does not  
> seem to match the Linux values of CPU usage.  The vbox metrics do  
> seem to trend in the same direction as the Linux metrics
>
> For testing, I did the following:
>
> 1) Wrote utility that read CPU jiffies over fixed delta
> 2) Use VirtualBox period same as fixed delta in #1 above
> 3) use prstat and top as validation for the accuracy of the cpu  
> jiffies utility
>
> I used a period of 5 seconds for my tests (but used others with the  
> same result).
>
> It seems the perf data for a host object matches closely the Linux  
> overall CPU usage.
>
> The discrepancy seems to be however when comparing virtual  
> machines.  The vbox metrics are lower (by up-to 30% at times) than  
> the linux os level metrics for the corresponding vm task.
>
> It seems the vbox metrics are stats specific to the 'virtualized  
> cpu'.  If that is the case, it would appear then that the delta  
> between what vbox metrics reports vs what the linux os level metrics  
> reports for the same VM would be the VirtualBox 'overhead'.
>
> OK ... so after all that ... essentially ... I am asking if anyone  
> can confirm that the vbox stats are internal kernel and user usage  
> within the VM based on the VMs view of available CPU cycles.
>
>
> Thanks,
> Joe
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100119/260fd6e5/attachment.html>


More information about the vbox-dev mailing list