On Sat, 2006-04-01 at 22:24 +0200, Alexander Skwar wrote: > Jim wrote: > > > Here is a little program I tossed together to free that cached memory. > > Hm. Why do this? Do you actually get any performance benefits > after having freed the memory occupied by the cache? > > In theory, you shouldn't see any benefits, as the system > should throw away memory pages occupied by cache stuff, > as soon as there are "more important" requests (like > any malloc). > > Or am I wrong?
That is how it should be. However I noticed when I only had 512 MB of memory that most of my memory would be "used" and I would see a lot of cache. Instead of that cache being freed or used, I would see a lot of swap file usage which really kills performance. I basically don't want to see swap touched unless I actually run out of physical memory. The best thing to do besides have a bunch of memory is to tune your "swappiness": http://kerneltrap.org/node/3000 Now that I have 2 GB of memory, I don't worry about it any more. However when I had 512MB it was an issues, especially when trying to run apache, mysql, postfix, courier and a full desktop. Jim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- I'm a geek, but I don't get it. 36-24-36 = -24. What's the significance? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Florida, USA, Earth, Solar System, Milky Way -- [email protected] mailing list

