Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com 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 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.

    
serverfault.com/a/379392/115189 –  mgorven May 19 '12 at 23:48
    
Have a look at serverfault.com/questions/377617 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

1 Answer 1

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