Yersterday I started monitoring my homeserver memory consumition due some errors found in the system (network hangs). I've detected almost all the memory used (~10 MB free from 1GB).
First I thought it was because of the MySQL configuration, so I monitored it with top and found it wasn't (I've checked the config file too, a home server doesn't need very large databases ).
I was not sure and I stopped about what was happening and decided to stop processes in the system. I finaly stopped all server processes and still find about 800 MB of RAM memory in use. Top knows they're in use but doesn't know what is using them exactly.
Let's see this output first... See, even though my processes only take up about 83MB, there is only about 13MB free of 256MB.. That's because the kernel will cache and buffer things...
What do you think it should be doing with it? Unused memory just sits there, wasted, so it uses as much for cache as is available. It gives it up as easily as 'free' memory so it doesn't hurt anything.
I suddenly started to have problem with the system managing the huge NAT table from aMule connections and making the system hang temporaly the network interface. I never had this problem before and I'm trying to find the reason. I've found the kernel tcp_max_syn_backlog unusualy low, so I thought that the problem was the free memory.