[Vserver] memory usage

2006-10-13 Thread Chuck
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.


-- 

Chuck



___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Roman Barczyński

Dnia 2006-10-13 12:31, Chuck napisał:
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.


http://oldwiki.linux-vserver.org/Memory+Allocation

I'm using something like that to gather information for RRD's:
/bin/grep ^RSS: /proc/virtual/$hostId/limit|/usr/bin/cut -f2
/bin/grep ^VM: /proc/virtual/$hostId/limit|/usr/bin/cut -f2

regards
--
Roman Barczyński
romke(at)estrefa.pl

___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Corey Wright
On Fri, 13 Oct 2006 06:31:21 -0400
Chuck [EMAIL PROTECTED] 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
-- 
[EMAIL PROTECTED]
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Chuck
On Friday 13 October 2006 08:23, Corey Wright wrote:


i should have read the manual first and asked later :P but in my defense it 
was VERY early in the am here and i was still waitinig for coffee to brew so 
i had not had even my first cup yet.. i should try not to think until then :P


anyway i discovered virt_mem to put into the flags file which works just fine.

your answers actually answered some future things i will be dealing with so 
thank you ahead of time :D

we are letting a friend use a guest as a 'colo' and we want him to have all 
the resources he needs, but i want to give him a way to see just what he is 
using, not combined statistics, so i put  the virt uptime, cpu, mem and load 
in there and they report exactly what he will want to see.

 On Fri, 13 Oct 2006 06:31:21 -0400
 Chuck [EMAIL PROTECTED] 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
 -- 
 [EMAIL PROTECTED]
 ___
 Vserver mailing list
 Vserver@list.linux-vserver.org
 http://list.linux-vserver.org/mailman/listinfo/vserver
 

-- 

Chuck

...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. 
The Book of John, chapter 1, page 1, and end of book


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Herbert Poetzl
On Fri, Oct 13, 2006 at 06:31:21AM -0400, Chuck 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.

free inside a guest/context is virtualized and
shows the amount used by the guest

you can get similar data with either vserver-stat
and/or the limits proc entry 

HTH,
Herbert

 -- 
 
 Chuck
 
 
 
 ___
 Vserver mailing list
 Vserver@list.linux-vserver.org
 http://list.linux-vserver.org/mailman/listinfo/vserver
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Chuck
On Friday 13 October 2006 09:33, Herbert Poetzl wrote:
 On Fri, Oct 13, 2006 at 06:31:21AM -0400, Chuck 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.
 
 free inside a guest/context is virtualized and
 shows the amount used by the guest
 

without the virt_mem, i get the same report inside a guest as i get on the 
host using free.. it shows all memory usage..  the virt_mem appears to show 
only what is being used by that guest when free runs, so this is what i 
probably want.

 you can get similar data with either vserver-stat
 and/or the limits proc entry 
 
 HTH,
 Herbert
 
  -- 
  
  Chuck
  
  
  
  ___
  Vserver mailing list
  Vserver@list.linux-vserver.org
  http://list.linux-vserver.org/mailman/listinfo/vserver
 

-- 

Chuck

...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. 
The Book of John, chapter 1, page 1, and end of book


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Guillaume Pratte

Chuck a écrit :

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 humbly suggest that you also look at vsmon, which displays in a web 
page the equivalent of vserver-stat, and more :


http://vsmon.revolutionlinux.com/

--
Guillaume Pratte
Recherche et développement
Révolution Linux

Toutes les opinions et les prises de position exprimées dans ce courriel sont 
celles de son auteur et ne répresentent pas nécessairement celles de Révolution 
Linux.

Any views and opinions expressed in this email are solely those of the author 
and do not necessarily represent those of Revolution Linux.




___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] memory usage

2006-10-13 Thread Chuck
On Friday 13 October 2006 13:23, Guillaume Pratte wrote:

that is a beautiful system but it is for the server admin. i need for a guest 
to behave like a standalone server would to the root admin who rents it. he 
is familiar with linux cmdline utilities and so i need to provide them with 
accurate results... free must display only that particular guest's memory 
usage and with virt_mem it seems to do so. other utilities such as top must 
return only the guest and nothing else hence the rest of the virt_.. i 
suspect this setup would do it but until i test it more i cannot be positive.



 Chuck a écrit :
 
 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 humbly suggest that you also look at vsmon, which displays in a web 
 page the equivalent of vserver-stat, and more :
 
 http://vsmon.revolutionlinux.com/
 
 -- 
 Guillaume Pratte
 Recherche et développement
 Révolution Linux
 
 Toutes les opinions et les prises de position exprimées dans ce courriel 
sont celles de son auteur et ne répresentent pas nécessairement celles de 
Révolution Linux.
 
 Any views and opinions expressed in this email are solely those of the 
author and do not necessarily represent those of Revolution Linux.
 
 
 
 
 ___
 Vserver mailing list
 Vserver@list.linux-vserver.org
 http://list.linux-vserver.org/mailman/listinfo/vserver
 

-- 

Chuck

...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. 
The Book of John, chapter 1, page 1, and end of book


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver