Re: [Vserver] memory usage

From: Corey Wright <undefined_at_pobox.com>
Date: Fri 13 Oct 2006 - 13:23:40 BST
Message-Id: <20061013072340.cffcaae0.undefined@pobox.com>

On Fri, 13 Oct 2006 06:31:21 -0400
Chuck <chuck@sbbsnet.net> wrote:

> is there a way to see how much memory a particular guest is using? maybe
> something similar to the free command? i have no memory limitations on
> these first few.

i use vserver-stat for informational purposes and not for placing resource
limits.

to decipher vsz & rss (as used in vserver-stat), see
http://oldwiki.linux-vserver.org/Memory+Management.

of course, memory accounting seems to be such a variable thing from command
to command and os to os (see the many internet discussions at large
trying to explaining the memory usage reported by top). witnessed within
vserver's very own wiki:

from http://oldwiki.linux-vserver.org/Memory+Management:

the RSS (resident set size) is the amount of pages which are currently in
RAM (physical memory)

from http://linux-vserver.org/Memory_Limits:

The Resident Set Size (rss) is the amount of virtual memory (RAM + swap)
that the context is allowed to use

so from the vserver wiki (both old & new) it appears that for vserver-stat
rss = guests' RAM usage, but for memory limits rss = guest's RAM + swap.
and then in my case i use vhashify, so all guests using apache have memory
shared among them, so properly accounting that shared memory is tricky
(does the total shared memory get accounted to each guest, or do you divide
the total shared memory equally among all guests, etc).

but if you don't have to account for shared usage amoung vservers, then i
presume vserver-stat is pretty accurate of each guests' specific memory
usage and the difficulty is choosing policy (do you want to limit RAM usage
or a guest's total memory usage, ie RAM + swap, if you can even have that
granularity in memory limits).

i looked into memory limits a year ago or so and gave up as i'm in control
of all guests (though it would be nice to keep a process from running away,
either from a memory leak or DOS attack).

hopefully somebody will correct me if i'm wrong in my details above, but
at least look to vserver-stat as a possible answer to your question.

corey

-- 
undefined@pobox.com
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Oct 13 13:27:44 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 13 Oct 2006 - 13:27:51 BST by hypermail 2.1.8