Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Why is Linux reporting “free” memory strangely?

I recently bought a cloud VPS (CentOS 5.8 x64) with 1024MB RAM from one of the hosting providers. It's managed and has whm/cpanel and stuff installed. The server was just set up for me yesterday so I haven't used it in any way other than logging in and performing 'free -m' to check out the RAM. The results got my attention:

             total       used       free     shared    buffers     cached
Mem:          1024        886        137          0         24        272
-/+ buffers/cache:        588        435
Swap:         1023          0       1023

It's pretty appalling to see only 137MB RAM is free to be used by my websites that I haven't added any yet. So the 886MB used is all system overhead.

I re-booted the system and performed 'free -m' again and it's almost identical results.

My question is, should I worry about this?

I have another VPS with 1.5GB RAM from another provider currently with 20 websites or so. It's also managed with whm/cpanel and Apache, etc. It's not a busy one but moderately burdened. Yet, the 'free -m' results have always been very nice, with 1GB free RAM available every time I checked it. It assures me the system has enough RAM so that it doesn't tap on the swap space which would be a performance nightmare.

So is this normal for a brand new VPS to have so little free RAM even after a fresh reboot? Would I run into problems after adding 20 or so websites that are currently fine on a 512MB server (the $19.95 plan at Linode.com, with Apache, MySQL, PHP)?

Any insights will be greatly appreciated! Thanks!

share|improve this question

marked as duplicate by SvW, Michael Hampton, mulaz, thinice, EEAA Dec 26 '12 at 6:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Please, read linuxatemyram.com. –  SvW Dec 26 '12 at 4:52
    
You might want to consider searching for vmstat and iostat articles... –  ArrowInTree Dec 26 '12 at 4:54
    
Your other VPS is likely openvz whereas your new vps is likely xen. Xen will report usage of buffers/cache whereas an openvps typically does not. This is why you're confused. Buffers/cache should not be counted towards "used" ram in the typical sense. The "used" you are looking for is 588 under used and -/+ buffers/cache. –  Grumpy Dec 26 '12 at 6:08
add comment

1 Answer 1

Your 'usable' ram should be 137+24+272 = ~435 [margin of error] (Read 1st comment below by Peter)

In buffer/cache line free column, that 435M is "hold" by kernel but available when program request them.

In terms of memory usage is about right, if following is true

  • mysql is running with Innodb enabled
  • apache2 is running with mod_php enabled

Website size, traffic, DB size info is not available in question, it is difficult to judge how far this box can go or if it is going to blow up.

However, if same site(s) were hosting in a box half the size and running fine, there should be no issue (in theory). With one condition, both boxes are running on the same architecture (both 64bit or both 32bit).

share|improve this answer
1  
The usable ram is simply 435. One in the buffer/cached row already calculated it for you. The amount held by the OS is the buffer and cache which is 24 and 272 respectively. So, 'usable' ram is (137+24+272 = ~435 [margin of error]) –  Grumpy Dec 26 '12 at 6:12
    
@Peter thank you! –  John Siu Dec 26 '12 at 6:52
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.