Operating System - HP-UX
1826775 Members
1382 Online
109702 Solutions
New Discussion

Re: How do I know if I need more RAM?

 
SOLVED
Go to solution
Vin_5
Occasional Advisor

How do I know if I need more RAM?

Hi,

What's the best way to tell if a system would benefit from additional RAM when under load? I have a 32bit application running with 3Gb of RAM and want to check if an extra 1Gb of RAM is justified. (10Gb of swap configured with about 70% utilised).

What should I look out for in glance etc?

Many thanks,

Vin.
9 REPLIES 9
Brian Bergstrand
Honored Contributor

Re: How do I know if I need more RAM?

If you have 70% of your swap used, the I would say you could use more RAM, probably more than 1GB too. The ideal value for used swap is 0. Anything higher than 0 means the OS is paging out to disk because memory is low.

HTH.
Stefan Farrelly
Honored Contributor
Solution

Re: How do I know if I need more RAM?


The swapinfo -mt command shows you what you want. But, dont use the total line at the bottom as this usually includes memory/pseudo swap, look at the device (dev) line(s).

If device swap has any part used then this is how much ram you are short (which has been paged out from memory to disk). Ie. if you have 4Gb of device swap and the used column for the dev lines from swapinfo -mt shows say 1GB used (25%) then you are short of ram by 1GB.

Basically, to keep your server running optimally you should NEVER have the dev lines from swpainfo -mt show any used at all - it should always remain 0% used. Thats the way we run all our production servers. Anything else and performance starts to drop off considerably. You always want to keep some memory free (from vmstat).
Im from Palmerston North, New Zealand, but somehow ended up in London...
doug mielke
Respected Contributor

Re: How do I know if I need more RAM?

Check to see if that 70% is 'reserved'with swapinfo. ( I hope you're talking about reserved)

If that much swap is really being used, and not not just reserved, you definitly need memory.
Steve Steel
Honored Contributor

Re: How do I know if I need more RAM?

Hi

Look for a lot of swapping as a good guide.

Look at swapinfo -at for the memory line.
If a high proportion is being used by pseudo swap then tune your kernel with to reduce the amount used.
see dbc_maxpct dbc_minpct swapmem_on and bufpages in the kernel

dbc_maxpct = dbc_minpct = 10 is good


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Vin_5
Occasional Advisor

Re: How do I know if I need more RAM?

here's the output of 'swapinfo -tam':

__________________________________________
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1536 0 1536 0% 0 - 1 /dev/vg00/lvol2
dev 8500 0 8500 0% 0 - 1 /dev/vg00/lvol9
reserve - 5823 -5823
total 10036 5823 4213 58% - 0 -
____________________________________________

So, as the 'dev' lines are both 0%, I should be ok with the existing RAM?
RAC_1
Honored Contributor

Re: How do I know if I need more RAM?

You are fine with exisisting RAM. No swap is being used.
There is no substitute to HARDWORK
Elena Leontieva
Esteemed Contributor

Re: How do I know if I need more RAM?

Vin,

Yes, you are OK.

You may monitor the situation in glance plus memory report window. Watch out for low free memory AND deactivation rate > 0. If this happens, you would see not 0% under USED 'dev' lines in swapinfo -tam output, meaning that you are short of RAM.

Elena.
Stefan Farrelly
Honored Contributor

Re: How do I know if I need more RAM?

Vin,

yes, you are fine. Nothing swapped out. All you need now is to check how much free ram you have to see if youre beginning to run out. Use vmstat and look at the memory free figure. Its in pages of 4096 bytes, multiply to get your free ram in bytes.
Im from Palmerston North, New Zealand, but somehow ended up in London...
doug mielke
Respected Contributor

Re: How do I know if I need more RAM?

Now that you're sure no swapping is taking place, you could next look for areas of improvement in existing or new ram.

Try a sar -b 5 5

You can see your cache hit rates, and could decide that more ram could be put to use there.
( mine average around 95% read, 80% write)
Although, if you have high perf. disks, (like a SAN), hit rate can be considered less important.

You could also look at application or database reserved memory. I.E., with more RAM you could increade Oracle SGA, which can be a great performance boost.