-1

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!

datasn.io
  • 279
  • 1
  • 4
  • 15
  • Please, read linuxatemyram.com. – Sven Dec 26 '12 at 04:52
  • You might want to consider searching for _vmstat_ and _iostat_ articles... – ArrowInTree Dec 26 '12 at 04: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 06:08

1 Answers1

0

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).

John Siu
  • 3,577
  • 2
  • 15
  • 23