Cache memory too high

Latest response


we are facing cache memory utilization is too high from past few days on our production server. Due to that, we unable to start any application until unless we freed the cache manually. Hence, we want to find out which process utilized high cache memory. Could you please help how to find out that.



Do you use THP? If so, what are the THP stats:

grep thp /proc/vmstat grep AnnonH /proc/memstat free -m

This is a good article which explains about "cache"

You would need to provide more details on this topic so that anyone on the forum would give suggestion or ideas. You had mentioned that cache memory utilization is high does this means even swap usage is more? This is all managed by kernel. So, as an admin at most cases we don't worry about such, however, sometimes yes we start to think/analyze why this is happening, which process is consuming more memory etc., If you run "ps up " command for any processes then you would get to see "RSS" & "VSZ" values which identifies "total virtual memory mapped with physical memory" and "total amount of virtual memory that the process has requested for" respectively. So, the RSS would show up actual physical memory being consumed.

Again, swap usage should also not be a concern since kernel would manage it and whenever required move in/out of pages from disk to memory, however, if there are a lot of swap-in activities happening then certainly it is a concern since moving a page from disk to memory would take time. As Kamil said you would need to run vmstat or other commands to find out the statistics. So, let us know the commands that you had run and other observations that you come across for further help. Also, don't forget to write about RHEL version being used, kernel version etc..

Thanks Sadashiva for getting back. It's RHEL 6.8. There is free in RAM and SWAP. But, cache consumed 70% of total memory. Due to that, process unable to start(getting like, there is no such free memory) until we clear the cache manually. Is there any way to find out what is using by cache memory?

Jagadeesh, pages in cache would get re-claimed by memory management sub-system as and when required and this is managed by kernel. There is this famous saying 'un-used memory in linux is a wasted memory', so kernel would keep pages which are read/written from disk in primary memory which is RAM for latter re-use and this gets filled up as system usage grows. The mechanism of cleaning up these pages in cache would be done by kernel whenever a memory request comes in, however, if a system is of very less free memory and also swapping pages then it could indicate that system would need more memory. First, I'd say that you would need to understand more about memory management in linux so, please look into this article which explains all this :

Also, you may post the /proc/meminfo details here.

Hi, i am Also facing same issue. in my server Cached memory usage is high...Is there any impact ? if yes what is the recommendations ?


Check if you've configured 'hugepages'? and also post the output of the following commands:

#cat /proc/meminfo
#free -g

In case you've configured 'hugepages' then you would need to adjust 'vm.dirty_ratio' based on the available memory, please refer this Red Hat KB :

To find out processes wise memory consumption, you may use "pidstat" command which is part of the sysstat package. So, to find out memory usage for active process run "pidstat -l -r|sort -k8nr".

If there is a high pressure of cache memory then one could start flushing out dirty data sooner than defaults by tuning "dirty_background_ratio" to lower values. But this would certainly need careful attention and study of memory sub-system, hence, better you may contact support team if these parameters require tuning.

All the best!


Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.