Skip to contentSkip to conversation

Idle time statistics for a container

DISCUSSION Srivatsa Vaddagiri 3 participants 4 messages Oct 10, 2007 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi Kirill/Hertbert,
Does Openvz or Linux-VServer provide idle time statistics per
container? i.e how much time a container has been idle?

Just exploring whether that be a usefull stats to provide on a per-control group basis.

Signature · 2 lines
Regards,
vatsa

A message that is not in the archive (sent off-list or not yet received): 20071010142529.GA4690-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org

#2 lore raw

yes, OpenVZ calculates idle statistics for VE.
it is calculated as follows:
cpu user/system time are incremented as usual on timer tick, idle time is incremented on per-VE per-VCPU runqueue when there is no tasks in VE runqueue.

i.e. VE idle time is the time when there were no VE tasks on the runqueue.

Quoted 7 lines · Srivatsa Vaddagiri

Hi Kirill/Hertbert,
Does Openvz or Linux-VServer provide idle time statistics per
container? i.e how much time a container has been idle?

Just exploring whether that be a usefull stats to provide on a per-control group basis.

#3 lore raw
In reply to a message not in the archive
Quoted 3 lines · Srivatsa Vaddagiri

Hi Kirill/Hertbert,
Does Openvz or Linux-VServer provide idle time
statistics per container?

Linux-VServer accounts the time/ticks a contain was running and on hold for being over limits, the time running is broken down into sys/user/etc ...

Quoted 1 line

i.e how much time a container has been idle?

so, while it is not accounted per se, it can be easily calculated from the other vaules ...

Quoted 2 lines

Just exploring whether that be a usefull stats to provide on a per-control group basis.

I think it makes perfectly sense to account that, and a smart version is required to get the statistics inside a container right :)

best,
Herbert

Quoted 3 lines
Signature · 2 lines
Regards,
vatsa

A message that is not in the archive (sent off-list or not yet received): 20071010180039.GG27755-ZD0Mn47LIGX0Pe/[email protected]

#5 lore raw
Quoted 3 lines · Herbert Poetzl

I think it makes perfectly sense to account that, and a smart version is required to get the statistics inside a container right :)

With the group cfs scheduler, it may be bit easy to provide this. If I am not mistaken, se->sum_sleep_runtime would provide this idle time, where 'se' is the group level schedulable entity representing a container/control-group on a cpu.

Signature · 2 lines
Regards,
vatsa