This document covers the steps necessary to reproduce the apparent memory issue with our CentOS VMs, in particular the wiki-dev VM.
To reproduce this problem, do the following:
- Reboot server
- Look at memory usage: about 5GB free, and going down
- Watch Confluence start up in about 2 minutes
- Stop Confluence (it may not stop, so you might have to kill the process, but give it a few minutes to try to exit cleanly)
- Look at memory usage: on a server with 6GB of RAM, only 1.5GB are free
- Start Confluence – it will now take about 10 minutes to start, and there could be considerable errors
- Look at memory usage: probably about 500MB free
- Stop Confluence – will probably have to kill the process this time
- Look at memory usage: still 1.5 GB free
Clearing the Filesystem Cache
Linux caches pages and inodes in memory, but you are supposed to be able to clear these. To do this, type the following:
free command is given so that you can see how much is being used before and after the
sync; echo... is run.
sync ; echo... on wiki-dev
As you can see, not much is freed.
sync ; echo... on Sven clone
A lot more is freed here. Of course, the Sven clone has 2GB more of RAM, but the numbers are telling: 4GB used on wiki-dev with no Java running, and less than 400MB on the Sven clone with no Java running.
Below is another snapshot of freeing memory on the Sven clone:
Again, as you can see in this run, the result is 400MB, not 4GB, as is the case with wiki-dev.
The above is how the filesystem cache clearing should work. But, for some reason, it does not work this wan on wiki-dev.
After trying lots of things on wiki-dev, I can not get it to have more than 2GB of free memory, and yet, the Sven clone has almost all of its memory free. This test should be reproduced on Stefan's previous Alfresco VM to see if it behaves the same.