Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently using a linux server to host a web application. The server does not seem to use any memory for caching. I noticed this, because I had the feeling the machine is pretty slow. I thought it might run out of ram.

Having ssh access, I was able to execute "free -m", which shows me the following:

             total       used       free     shared    buffers     cached
Mem:          1536        244       1291          0          0          0
-/+ buffers/cache:        244       1291
Swap:            0          0          0

In my opinion, normally it should use about 90% of its free memory for caching. I've never seen this before.

What might me the problem here?

BTW: It seems to be a RedHat. I don't know too much about RedHat, because I am more a Debian guy.

share|improve this question

migrated from Nov 26 '09 at 16:46

This question came from our site for professional and enthusiast programmers.

You need to tell us more about the specifics of your web application. Is it designed to utilize caching ? If this is a server question, it might belong on – driis Nov 26 '09 at 16:41
Very strange behaviour. Check the mount options of your filesystems. – hirschhornsalz Nov 26 '09 at 16:48
up vote 4 down vote accepted

You're on an OpenVZ or Virtuozzo VM. Confirm by looking for a file /proc/user_beancounters or a directory /proc/bc; if one (or both) of those are there, it's an OpenVZ/Virtuozzo VM for sure (those locations only exist in those VM types). If it's not there, their existence might have been patched out of the VM environment you're in (some extra-unscrupulous providers do that to try and hide their dodginess, but having no cache or buffers is a giveaway). If you have been sold a physical machine, you've been sold a dud.

share|improve this answer
It is a good idea to check /proc/bc/ directory also, since user_beancounters was deprecated some time ago (I'm unsure if it was/when it will be removed). – Juliano Nov 26 '09 at 18:22
@Juliano: Shows how long it's been since I admined a cluster of VZ machines. Thanks, answer updated. – womble Nov 26 '09 at 18:32
Thanks! That's it. Fortunately I did not buy anything. I just have to host my application on a server, which is owned by the customer and it is pretty slow sometimes. I was hoping to find a server configuration problem, so the customer could fix it. – user27352 Nov 27 '09 at 9:42
The "configuration problem" is that it's a ridiculously overloaded VZ VM; it's easy to run those things with far too many customers on them, leading to poor (and intermittent) performance. I'd be strongly recommending to my customer that they switch to a provider who doesn't run VZ. – womble Nov 27 '09 at 18:39

Have a look in /proc/sys/vm/pagecache.

That file controls how much memory the kernel will use for file system cacheing.

share|improve this answer

That's not what the output of free means

IIRC cached is the amount of swap that is still cached in memory.

share|improve this answer
You remember incorrectly. – womble Nov 26 '09 at 17:33
The amount of data that is present in both swap space and RAM is the SwapCached count seen in /proc/meminfo (and not displayed by free) – David Spillett Nov 26 '09 at 18:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.