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

This question already has an answer here:

I have a linux server with tomcat and MySql installed on it, with axis2 as well.

At first I started with ~400MB allocated I deployed my project and still memory allocation was the same.

But then I tried to use Log4j, which I think caused the problem. Problem is that not I have ~800MB allocated. Then I removed the service I deployed and still 800MB allocated.

What have I done wrong? How can I check what have done wrong and fix it?

Thanks Yoav

share|improve this question

migrated from May 18 '12 at 22:58

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

marked as duplicate by Michael Hampton Aug 6 '14 at 4:18

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. – mgorven May 19 '12 at 23:48
Have a look at for interpreting the top output. If your tomcat + mysql memory is still elevated, then you may have a problem. Otherwise, it sounds like you're running into the trap of thinking the "Free" line is "my programs are using everything but this", which is not true in Linux. – sysadmin1138 May 20 '12 at 2:35

This is the linux caching mechanism and is totally normal and nothing to worry about. Linux will free memory if another application requests memory.

You can enforce that all not-needed memory is freed (sync; echo 3 > /proc/sys/vm/drop_caches), however this is not necessary and linux will work perfectly fine even if 98% memory shows up as used

share|improve this answer