I have a web-app running in Apache Tomcat 5.5 under Arch Linux. The application has a very high memory-usage - the JVM is collecting about 10gb/minute. The whole thing is running on a box with 8gb memory and due to the high rate the application consumes memory, we've allocated 6gb of heap-memory for the Tomcat JVM. Now, what I've discovered (or at least how it looks to me) is that Arch Linux will allocate a file-cache in RAM which appears to grow to use all available memory. My sense is that in our case, this is not ideal since the JVM:s memory usage flucuates wildly (a full GC collects over 2gb of memory). The problem we're having is that the server runs out of free memory regularly and starts to swap, forcing a restart.
Is there a way in Arch Linux to configure a max-value for the file-cache? I want to be able to cap the JVM and file-cache memory-usage to get more predictable memory usage profile. A lot of the application works against a file-based BDB on an SSD, so file-caching in RAM should not be crucial for performance.
Of course, other perspectives/ideas on the problem would also be appreciated.