[Users] Measuring and Adjusting CPU utilization

Pradeep Padala ppadala at gmail.com
Tue Jun 6 14:03:37 EDT 2006


Hi,

I am trying to measure the CPU utlilization of the VZ containers, and change
the cpu share dynamically. I have poured over most of the documentation, and
looked at the code as well, and it seems like there's no utility that can
directly show the current CPU utilization of a container (some thing like
30% of CPU). A search on the user list got me a message, where someone
suggested using loadavg. However, It seems like the loadavg is not showing
the proper utilization (or showing the total CPU utilization). This is what
I am doing.

I setup a container with 1000 units limit (total CPU units: ~10000). I wrote
a small do {; }while(1); loop and ran it in the container, now I do cat
/proc/loadavg in both the container and on the host node. Since, the
container is only using 1000 units, I should see something like 100% loadavg
in the container, and 10% loadavg in the hostnode. But, I see 100% at both
places. Am I doing something wrong? How do I get the current cpu utilization
of a container?

Thanks,
-- 
Pradeep Padala
http://ppadala.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openvz.org/pipermail/users/attachments/20060606/07844d15/attachment.html


More information about the Users mailing list