Home:ALL Converter>CentOS memory availability

CentOS memory availability

Ask Time:2015-06-08T06:05:48         Author:user697911

Json Formatter

My system has 8GB ram and my system is CentOS 7. The system info shows the following memory usage.

Memory Information
Total memory (RAM):  7.6 GB
  Free memory:  143.4 MB (+ 6.1 GB Caches)
  Free swap:  7.8 GB

Does this mean free memory is only 143.4MB, or 143.4 + 6.1BG? Why is it caches? Is this normal? I am asking this because I am running a Java problem but received an OutOfMemory exception. I am thinking whether there is any problem with my operating system.

Author:user697911,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30698936/centos-memory-availability
Brian Agnew :

It's more likely that you need to run your JVM with an increased maximum memory setting. The JVM will run with it's own limit on memory usage (subject to that available from the OS).\n\ne.g.\n\n$ java -Xmx2048m ...\n\n\nwill run the JVM with a maximum memory setting of 2Gb. See here for more information. \n\nIf you suffer from an OutOfMemoryException, then it's likely that you need to tweak this setting. It is also possible that the JVM can't allocate that memory from the OS, or that your program suffers from a memory leak, but setting -Xmx is a reasonable first approach to resolving such an issue. Note that setting -Xms in a similar fashion will force the JVM to allocate the memory upon startup, and is useful not only as an optimisation, but also as an early warning for the lack of allocatbale memory. See here for more info.",
2015-06-07T22:08:32
yy