I'm running apache on my linux server and I notice many instances are taking over 100 MB memory a piece. I then ran process map and found out from one that 2/3 of the memory used by the process is dirty memory.
This is what the start of the result looks like:
root@server [/]# pmap -x 7752
7752: /usr/local/apache/bin/httpd -k start
Address Kbytes RSS Dirty Mode Mapping
0000000000400000 1116 684 0 r-x-- httpd
0000000000716000 48 44 24 rw--- httpd
0000000000722000 20 12 12 rw--- [ anon ]
00000000023d6000 62580 54348 54348 rw--- [ anon ]
00000000060f3000 1848 1828 1828 rw--- [ anon ]
00000000062c1000 37196 37120 37120 rw--- [ anon ]
00000031aba00000 128 88 0 r-x-- ld-2.12.so
00000031abc1f000 4 4 4 r---- ld-2.12.so
00000031abc20000 4 4 4 rw--- ld-2.12.so
00000031abc21000 4 4 4 rw--- [ anon ]
Is there a way somehow to wipe out that dirty memory (Example: get rid of the anon entries) so that the apache process takes up more like 40 MB instead of over 100 MB? I want to avoid constantly restarting the server if possible.