The Joyent Community

A place where the Joyent community can gather, help each other out, and stay informed.

You are not logged in.

#1 2008-07-12 02:44:05

mlemos
New member
From: São Paulo - Brazil
Registered: 2006-03-23
Posts: 22
Website  Expertise

How to check my zone size?

I need to know what is the size of my accelerator. I'm not sure it is with the size I ordered it.
I need to check the amount of RAM allocated to my Zone.


Manoel Lemos
manoel@lemos.net
http://pocsw.com/
http://blogblogs.com.br/

Offline

 

#2 2008-07-12 08:43:25

lderezinski
Happy Camper
From: Essex, Maryland USA
Registered: 2006-04-14
Posts: 4351
Website  Expertise

Re: How to check my zone size?

There is no way to see from inside of the accelerator your memory limits. Just remember to look at both your Swap and RSS numbers. Manytimes people have plenty of RSS memory but have used up all of their swap memory.

Also note that all files located in /tmp also count as part of your swap.


The greatest oak was once a little nut who held its ground.
MG->3ML->Premiere (Lithographer) + Accelerati + Joyeur (Yes, I work here, we are hiring)

Offline

 

#3 2008-08-28 13:53:46

thequietlab
New member
Registered: 2008-01-29
Posts: 16
Expertise

Re: How to check my zone size?

I'm always puzzled as to what is the difference between the SIZE and RSS columns for prstat -Z output. As well as summary line SWAP and RSS.. I've read that for RAM-that-my-software-uses I should look at RSS, what is SIZE then ?

Linda, could you please explain ?

Thanks,
Andrzej

Offline

 

#4 2008-08-28 15:50:41

mamash
I Just Work Here
From: Prague
Registered: 2004-06-01
Posts: 2166
Website  Expertise

Re: How to check my zone size?

SIZE is total virtual memory (including memory swapped out). What prstat does is add up the RSS usage of all the processes to calculate the RSS summary value, and the same for SIZE (which becomes SWAP). Then you take SWAP, add whatever you store under /tmp and you get your total swap usage. Complicated?

What we're coming up in the next Accelerator template revision is a smart Bash script that pulls such data for you and prints it nicely, e.g.

Code:

Memory cap: 1 GiB
Memory used: 211 MiB
Memory free: 813 MiB
Swap cap: 2 GiB
Virtual memory used: 343 MiB
/tmp used: 4 B
Total swap used: 343 MiB
Total swap free: 1 GiB


There is also a machine parseable output format, if you want to plug this into any of your own scripts. And while a new template won't affect any existing Accelerators, we'll make this script downloadable for all.

Edit: Heh, just realized that the math doesn't add up in the example above. Still a work in progress... :)


The things you can't remember tell the things you can't forget.

Offline

 

#5 2008-08-28 17:58:42

thequietlab
New member
Registered: 2008-01-29
Posts: 16
Expertise

Re: How to check my zone size?

Ok, thanks for the clarification. So I have 2GB accelerator and everytime I do prstat I see ALL of my processes having SIZE bigger then RSS ie apache processes like :

SIZE : 58M
RSS : 15M

What does it mean ?

The summarized numbers in the same time are like :

SWAP : 1202M
RSS : 1105M

Does it mean all of my processes are swapping all the time ?

Offline

 

#6 2008-09-01 10:45:50

thequietlab
New member
Registered: 2008-01-29
Posts: 16
Expertise

Re: How to check my zone size?

I would appreciate if someone could answer my questions :)

Thanks a ton !

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson