OpenVZ Forum


Home » General » Support » *CLOSED* softirq stats for a VE
*CLOSED* softirq stats for a VE [message #10359] Thu, 15 February 2007 20:17 Go to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
Hi,

Currently, /proc/vestat does not show softirq stats for a particular VE. Is there any way to get those stats ? Please let me know.

Thanks,
Pradeep

[Updated on: Mon, 19 February 2007 21:07] by Moderator

Report message to a moderator

Re: softirq stats for a VE [message #10369 is a reply to message #10359] Fri, 16 February 2007 07:41 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
As far as know, there is no such possibility.
/proc/stat in VE just output 0 for soft interrupt ticks.

Vasily
Re: softirq stats for a VE [message #10488 is a reply to message #10359] Mon, 19 February 2007 21:07 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

softirqs do system-specific job and it is very hard if possible at all to distinguish to which VE softirq can be charged to. So currently it is reported as 0.


http://static.openvz.org/userbars/openvz-developer.png
Re: *CLOSED* softirq stats for a VE [message #10833 is a reply to message #10359] Mon, 05 March 2007 15:07 Go to previous messageGo to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
I know that softirqs are difficult to account for. I am running a network heavy process (apache queried by httperf) and it produces enormous amount of CPU consumption is softirqs. This obviously has a lot of implications as I cannot control the VE consumption directly.

Do you think the following patch for more accurate process accounting might help ?

http://www.kip.uni-heidelberg.de/ti/HLT/software/software.ht ml#kernel

Please let me know. I am happy to make it work with OpenVZ, if it has any promise.

Pradeep
Re: *CLOSED* softirq stats for a VE [message #10837 is a reply to message #10833] Mon, 05 March 2007 15:50 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

No, this patch doesn't help. It's just make accounting more accurate (i.e. improves precision of accounting).

Look, the problem is the following. Imagine that someone
does a network flood at your host.
It takes a significant CPU time to determine to which VE (if any at all) these packets are going to. And this time is not accounted to the VE. That's the problem. The same for IRQ. IRQ doesn't know anything about whom it is reading packets for. So IRQ time can not be accounted to the VE.


http://static.openvz.org/userbars/openvz-developer.png
Re: *CLOSED* softirq stats for a VE [message #10855 is a reply to message #10837] Mon, 05 March 2007 19:47 Go to previous messageGo to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
I understand that when VEs receive data, it's difficult to account for the network processing. But, if the VEs are sending data, wouldn't the network stack know how to account for the CPU used for processing that ?

Pradeep
Re: *CLOSED* softirq stats for a VE [message #10863 is a reply to message #10855] Tue, 06 March 2007 08:06 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

The time spend by the VE by sending data is accounted to the VE.
However, when the packets gets into the host system for the routing or switching, it is now processed in VE0 context and this time is accounted for the router, which looks reasonable enough.

Looks like you want to account the whole time spent on packet handling until it gets out of ethX device to the corresponding VE?


http://static.openvz.org/userbars/openvz-developer.png
Re: *CLOSED* softirq stats for a VE [message #10887 is a reply to message #10359] Tue, 06 March 2007 14:17 Go to previous messageGo to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
Right. To give you the context, we have been working on developing adaptive control in virtual environments. A paper on this is being published at EuroSys (http://www.eecs.umich.edu/~ppadala/pubs/eurosys.pdf). We did that for CPU and now want to extend it to the network. We used Xen in that work, but are switching to OpenVZ, as we think it has much lower overhead.

When a network-processing-heavy application runs in a VE, it consumes both network and CPU resources. We only want it to be accounted properly. Perhaps I need some thing like lazy receiver processing (http://www.cs.rice.edu/CS/Systems/LRP/).

Any ideas are welcome.
Re: *CLOSED* softirq stats for a VE [message #10896 is a reply to message #10887] Tue, 06 March 2007 15:06 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

well... some ideas:
1. time should be accounted in cycles, as jiffies are too much inaccurate for such kind of accounting.

2. From net to VE path: it is possible to mark skb with cycles timestamp on it's arrival. When skb finally arrives to venet_xmit, delta_time = current_cycles() - skb->arrival_cycles can be accounted to the VE.

3. on VE to net path: skb can be marked with VEID in venet_xmit() when it is moved from VE to VE0 and with a cycles timestamp.
Before doing hard_start_xmit the same delta time as above can be accounted to appropriate VE.

4. Both (2) and (3) work fine if skb is not queued anywhere for delayed sending (e.g. traffic shaping). On delayed sending time accounting can be done partially: time used before queueing and time used after queueing.


http://static.openvz.org/userbars/openvz-developer.png
Re: *CLOSED* softirq stats for a VE [message #10898 is a reply to message #10896] Tue, 06 March 2007 15:53 Go to previous message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
Thanks for the ideas. I might hack the code, when I get time. Will send a patch, if I do.
Previous Topic: *SOLVED* Problem with restarting services
Next Topic: *SOLVED* Umount action script problem
Goto Forum:
  


Current Time: Sat May 04 23:59:15 GMT 2024

Total time taken to generate the page: 0.01951 seconds