OpenVZ Forum


Home » Mailing lists » Devel » Idle time statistics for a container
Idle time statistics for a container [message #21530] Wed, 10 October 2007 14:16 Go to next message
Srivatsa Vaddagiri is currently offline  Srivatsa Vaddagiri
Messages: 241
Registered: August 2006
Senior Member
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.

-- 
Regards,
vatsa
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: Idle time statistics for a container [message #21536 is a reply to message #21530] Wed, 10 October 2007 15:35 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

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.

Srivatsa Vaddagiri wrote:
> 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.
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: Idle time statistics for a container [message #21541 is a reply to message #21530] Wed, 10 October 2007 18:00 Go to previous messageGo to next message
Herbert Poetzl is currently offline  Herbert Poetzl
Messages: 239
Registered: February 2006
Senior Member
On Wed, Oct 10, 2007 at 07:55:29PM +0530, Srivatsa Vaddagiri wrote:
> 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 ...

>       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 ...

> 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

> -- 
> Regards,
> vatsa
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: Idle time statistics for a container [message #21543 is a reply to message #21541] Wed, 10 October 2007 18:10 Go to previous message
Srivatsa Vaddagiri is currently offline  Srivatsa Vaddagiri
Messages: 241
Registered: August 2006
Senior Member
On Wed, Oct 10, 2007 at 08:00:39PM +0200, Herbert Poetzl wrote:
> 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.

-- 
Regards,
vatsa
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH] Rewrite proc seq operations via seq_list_xxx ones
Next Topic: [PATCH 1/5] rtnl_unlock cleanups
Goto Forum:
  


Current Time: Mon Nov 18 16:17:19 GMT 2024

Total time taken to generate the page: 0.02812 seconds