We have a bunch of servers with the below configuration:
Dual Core single processor 2GHz with 1 MB Cache. Swap is enabled with 1GB limit Memory - 2GB OS - RHEL5.3 64bit
One of our alarms is configured to wake us up when Free memory goes below 256MB for 2 hours (continuously) and above. We are constantly running into memory issues in our machines. With just one java service running at a limit of 1 GB (using Xmx flag), the rest of the memory is for the OS to play with. We observe that a lot of memory is being allocated to buffers/cache (as much as 1GB). At this juncture I have a few questions which are being difficult for me to answer correctly.
- As much as I have searched, it seems quite not possible to control how much the OS can allocate for buffers/cache. Is there any policy in the OS that will dictate it to control this?
- What would be an alarming limit if the java process is CPU bound?
- What would be an alarming limit if the java process is IO bound?
- If we simply run a single java service (with Xmx much lesser than available RAM), should we even worry about free memory? Won’t SwapUsedPercent be the best parameter to check if we are hitting memory issues?
Kindly share your thoughts.