We run an Apache Mod_proxy cluster with 3 JBoss in three dedicated server. Because we need share many files (small object files which our apps need to read/write ) between these JBoss servers ,we using NFS in Apache node and mount them into each JBoss Node as same directory.

Both nodes are installed RHEL 5.4 version and there are in same intranet network. We have 8G RAM in each server.

The problem is we got linux cache increased about 2-3M per minute, in heavy load day (about 100-150 online user ) the server cache will increased to about 3-4G each day.

After run these clean code:

echo 3 > /proc/sys/vm/drop_caches

It will back to normal level:

             total       used       free     shared    buffers     cached
Mem:       8173504     589772    7583732          0      87444      72100
-/+ buffers/cache:     430228    7743276
Swap:      5799928          0    5799928

We want to know are these caused by JBoss open files not closed?

Are they other solutions we can use to share files between servers?

Thanks for any reply.


Linux will normally use all available memory. The memory that is not being used by application data will then be used by buffers and caches to speed access to disks and hardware. What you are describing seems like normal behavior. The caches will get smaller to allow application data to grow if needed, unless you change the swapiness vm parameter for the kernel. Swapiness is:

So... swappiness, which is exported to /proc/sys/vm/swappiness, is a parameter which sets the kernel's balance between reclaiming pages from the page cache and swapping out process memory.

You can read more about it here. Normally the default is ok, and if you are not having any process being killed by lack of memory the caches are nothing to worry about.

  • Is is a safe operation if we running follow command to clean system cache each day ? there was a mysql in that server too. sync echo 3 > /proc/sys/vm/drop_caches – hntangwei Apr 11 '11 at 13:03
  • I will sync the caches to disk, nothing too dangerous about it. Just keep in mind that clearing caches will have performance implications until the caches are hot again. – coredump Apr 11 '11 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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