PDA

View Full Version : When to add more ram...


Justec
05-21-2008, 01:09 PM
My server is running great, just want to know when is a good time to just go ahead and upgrade.

With 1GB of ram
~ 10 MB Buffered
~ 160 MB Cached
~ 500-600 MB Swap

I still have some memory left for cache and buffer so not sure if more ram would speed up the server any. Maybe it would increase the amount of buffer/cache which would make things faster?

I know there is no yes/no to this, but just wanted to get some opinions.

Thanks

Kevin
05-25-2008, 02:58 PM
How is your IO wait level at peak usage time? If that number is high or you have active applications in your swap, you should probably add more RAM. Inactive applications do get pushed to swap, so the total swap used is not implicit of a problem, but if you see IO wait higher or that the amount of swap used is increasing or changing a lot, those are indications more RAM is needed.

Of course, you are correct. The more RAM you have, the more room there is for buffers and cache which store files and filesystem data in memory so they don't need to be read from or written to disk as often or quickly, which allows your software to process data more quickly for the most frequent requests.

For most server configurations you'll find that 2 to 4 GB of RAM reach about optimal performance before you start to run into problems that demand faster disks. Up to 8 GB of RAM may help very heavy load web servers, and 8 GB of RAM or more can sometimes be useful with heavy load MySQL servers, assuming you have around 8 GB or more of MySQL data.

Justec
05-25-2008, 04:08 PM
I'll have to watch the IOwait time, but now on the weekend when things seem slower...

~ 8 MB Buffered
~ 115 MB Cached
~ 275 MB Swap

So it does seem that when the server is more active it uses up more of the swap space.