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 ??
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.