WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] vcpu performance : 1 vcpu for all guets or 4 vpcu ?

On Mon, 2007-06-11 at 06:59 +0200, Pascal wrote:
> Hi Tim 
> 
> Thanks a lot for this long answer  ;)
> 
> We've done some tests and it seems good to have 1 core reserved for
> dom0, the other balancing through vcpu to all guests.
> 
Or at least 1/2 of one core. It really depends on the I/O needs of your
guests.

I have one server that has nearly 50 load balancing guests running on
it. It uses software that never touches disk once resident and running.
It could easily hold 50 more. 

> Maybe one more question.

Sure :)

> We are working on a solution to count the guest trafic by month and
> maybe to limit the bandwidth used by every guests.
> 
> For the trafic, we are currently trying to play with rrdtool + a
> script that does something like this and write these data in a mysql
> database :
> ifconfig -a vif34.0 | grep 'RX bytes' | cut -d : -f 2 | cut -d ' ' -f
> 1
> 
> For the bandwidth limit there is of course TC 
> 
> Just by curiosity, did you implement one of these solutions ?
> Do you have others idea, is there some control panel or existing
> script which do that ?
> 
> Thanks
> 
> 
> Pascal

Try reading from /proc/net/dev directly. That pipe invokes many things
that allocate much more memory than is actually needed.

Line editors have *no* idea how big stdin is going to be, so they need
to allocate a lot of memory that is just wasted for 15 - 30 mins for
such a menial task.

Ideally, back end stuff on dom-0 tries its best not to do that, since
contiguous chunks of RAM can be hard to come by in such small spaces.

Ideally, such a solution would e-mail (or otherwise notify) your clients
when they reached about 80% of that quota. Floats in simple shell
scripts are a pain, I recommend you use C or python. Bash is very
bloated for this particular use. Every invocation of /bin/sh puts a
gazillion things in memory you'll never use. You could try other
bourne-ish shells, but most of them don't support arrays which you'd
want for this.

If you don't know python or C, try grawk.

http://dev1.netkinetics.net/hg/utils.hg/grawk.c

.. in place of grep / awk / cut

grawk "^\ \ eth0" '$2,$9' /proc/net/dev

produces the two values I think that you want with a single invocation. 

Of course, substitute eth0 for the vifname. That repo also contains non
blocking highly abuse-able http and ftp services you may find of use.

Please reply-to-all or CC the list so everyone can benefit from the
answers to your questions :) 

Best,
--Tim



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>