Answer the question
In order to leave comments, you need to log in
How to remove /var/log/httpd/*.gz from the system cache (RAM)?
CentOS 7 x64 system.
The httpd service is running, logs are ~500Mb each, there is a daily rotation with archiving, the last 3 months of logs are stored.
So, the system clogs up most of the RAM by caching (leaving) these files in memory.
In htop, you can see how 15% of the RAM is occupied, and about 80% of the cache (orange bar).
When deleting log archives, the cache naturally decreases.
Can I somehow prevent the system from caching log archives in RAM?
There are almost no calls to these logs, I look through them with my hands once a month, and the cache hangs.
Once I even noticed that part of the RAM went into swap, although the actual data still occupied ~ 15-25% of the RAM.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question