Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have an EC2 small instance that has 2 gigs of memory, running Fedora Linux.

Typically, I get about 275 page views per day on average, and I have a monitoring agent on the box. Some of the stats are little worrying in terms of free memory.

Last week, at it's lowest point we had only 30 mb free of memory, this morning it appears to have increased to about 150 mb. Hyperic is our monitoring agent which runs Java. A top shows that its memory usages is only about 3.4%.

When I add up all of the httpd processes I get about 15-20% memory usage with mysql using about 1%.

Top doesn't reveal where the rest of the memory is going. What could I do to find out whats causing the high memory consumption? Could it be the 275 hits a day? About 95% of our code is PHP and HTML. MySQL is being used lightly from an application called OpenVBX which is only used internally.

If it's apache, an upgrade in memory should solve our issue right?

Any advice would be a huge help, thanks!

UPDATE: free shows this:

             total       used       free     shared    buffers     cached
Mem:       1718724    1575024     143700          0     234328     969284
-/+ buffers/cache:     371412    1347312
Swap:       917500       1140     916360
share|improve this question
What does free actually say? The important line is the one that says "-/+ Buffers/Cache:" that shows how much is free when you don't count the filesystem cache as used. – DerfK Mar 28 '11 at 16:23
up vote 4 down vote accepted

Basically you want to look at the free column of the buffers/cache row, so you have about 1.3G free -- you are probably in good shape.

The famous page for this "Help! Linux ate my Ram!" at .

To put it very simply, Linux is going to use ram to cache files and the sort so it can deliver them faster. If a program really needs ram then it will take it from the cache -- but why not use the ram while it can?

share|improve this answer
Excellent thank you for clearing that up :) – Doug Molineux Mar 28 '11 at 16:37

ps aux|less gives percentage of the memory used per process and might help a little.

share|improve this answer

Your Answer


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

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