1

I currently have a web application running on a vps server running Ubuntu 9.04 Jaunty. I recently had installed Nagios as monitoring tool. I had configured an extra plugin in order to check the free available memory. One of the servers has only approximadettly 7% of free memory.

Is that a reasonable value?

Thanks in advance for the help, Best regards!

Rui Gonçalves
  • 195
  • 2
  • 8

2 Answers2

1

It depends how that figure is calculated.

Some tools include buffers and cache in the free memory figure, some don't. I/O caching has a huge impact on webserver performance. If you've got shell access, try running 'free' to see what the actual values are, e.g. from a system with virtually no load on it:

             total       used       free     shared    buffers     cached
Mem:       4135700     504028    3631672          0      52240     262880
-/+ buffers/cache:     188908    3946792
Swap:      4192944        156    4192788

Here I've actually got (4135700 - 188908) = 3946792 free

While you can never have too much memory, if you've got less than 50% available for buffers and cache and the total size of the content in the website is more than this amount then your website will slow down.

Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
symcbean
  • 19,931
  • 1
  • 29
  • 49
0

That's a bit high, actually. Linux uses unused memory for buffers and cache, releasing it to applications as needed, so free memory is wasted memory.

Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84
  • Hi! Taking in consideration what you told, how can I now if the server performance is becoming to be degrated? Is 5% of free memory a more realistic threshold? Thanks for the help, Best regards! – Rui Gonçalves Jul 28 '10 at 15:15
  • The way to check if performance is being degraded is to check the CPU usage, load average, and I/O wait. – Ignacio Vazquez-Abrams Jul 28 '10 at 15:25
  • Hi! My main concern is implement some mechanism to warn me as system administrator that the memory is reaching critical values. Given a concrete example, some weeks ago I not even could establish a remote connection to the servers. It was needed an intervention of the hosting provider, that performed a hard reboot of the server. Thanks for the help, Best regards! – Rui Gonçalves Jul 28 '10 at 15:34