-1

i am running Java application on Tomcat-6 on CentOs .

JAVA_OPTS Like this :

 JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask` -server -Xms256m -Xmx2536m -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -XX:+UseParallelOldGC  -XX:ThreadStackSize=512 -XX:MaxPermSize=1024M"

but cache memory of server growing

            total       used       free     shared    buffers     cached
Mem:         32101      16153      15948          0         20       3968
-/+ buffers/cache:      12164      19936
Swap:        16383        114      16269

where i am doing wrong ??

1 Answer 1

2

You're doing nothing wrong. "Cached" memory in Linux is the kernel using available RAM to cache files from disk, for speedy access( no need to go to slow disk for commonly accessed files). This is by design, and a good thing.

3
  • 1
    Obligatory link to linux ate my ram :) Jan 1, 2015 at 8:59
  • I have the same problem and it ends up with crashing my java web app. Is there something else to do than reboot the server ?
    – Labe
    Feb 11, 2016 at 16:30
  • Give the server more memory. If your application needs more than the server has available, you have very little choice. Feb 13, 2016 at 3:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .