Virtual servers and false alarms

When you start looking after virtual machines instead of buying shared hosting, you very quickly realise how important RAM is to making a server run properly.

I’m using a machine with a fairly heft chunk of free memory, but recently when shelling into the box to check memory usage I’ve have some pretty scary stats that look like I’ve hardly got any memory left at all:

stemcaa1- ~ — ssh — bash — top

No cause for concern

I was understandably a bit confused when I first saw this, and contacted support at Memset, and I’m pretty satisfied with their answer.

This is actually the way Linux handles memory management – it’s rather complicated. As long as your swap isn’t very high, you’re not actually using that much memory. This link sum’s it quite well:
http://www.linuxvox.com/linux-articles/memory-and-swap/2-how-much-free-memory-does-my-linux-server-really-have

By default the Linux Kernel is designed to use as much free ram as possible when it can, and then release as and when it’s needed by other apps.

Panic over.

  • Share/Bookmark
This entry was posted in Journal. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted January 15, 2010 at 1:11 pm | Permalink

    Yup, that is a bit confusing. Linux tends to cache files in the spare RAM, so it fills up quickly – but it’s not really “full”. Our VPS has been falling over ocassionally due to a lack of RAM, I think because Apache was starting too many server processes.. but I’m still not entirely convinced I got to the bottom of it.

    My hosting provider has a HOWTO page on this which I found useful: http://rimuhosting.com/howto/memory.jsp

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">