On an Apache server of my own, logging requests to files has been enabled using a custom Apache module.
The log files can reach several GB at the end of the day.
Using Nagios I have noticed memory usage higher than usual (free memory got lower by 4-5 GB) mostly because of cached memory (e.g. what is reported in buff/cache using free -m command).
- 19 : log disabled
- 20 : log enabled
- 21 : log enabled + more VM memory
It's currently unclear why exactly it happens, but I expect Linux to temporarily keep in memory what has been written to the disk, in a case it needs to be read again later.
Does it make any sense, or is this cache mostly for what is read from the disk (not written)?
I don't think the Apache module has memory leaks because what it allocates is automatically cleaned up once the connection is closed (one possibility is to have lots of TCP/IP lingering connections) and (AFAIK) therefore it would not appear in cached memory.
