Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Free up system resources using Automator' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Free up system resources using Automator
Authored by: kamath on Jun 12, '11 09:54:05PM
I'm always amazed at people's complete lack of understanding how the buffer cache works in *nix's. I swear, every utility out there that displays to an end-user the memory utilization should just ignore the buffer cache, and the world would be a happier place.

Flushing the buffer cache does nothing to "give back resources". The buffer cache is mostly the cache of files read. "flushing" them means marking them invalid. That is all. I.e., when the system needs a page of memory, regardless if the page is marked invalid or valid, the page will be given to the requesting application.

The whole idea is to speed up repeated reads of files.

The comment in the 'purge' man page says it very clearly:

Purge can be used to approximate initial boot conditions with a cold disk buffer cache for performance analysis. It does not affect anonymous memory that has been allocated through malloc, vm_allocate, etc.
That's why it's on the developer tools disk -- so that developers can repeatedly run tests to see what sort of performance (worst case performance, I might add) they'll get.

But, hey, if it makes you feel better, go for it. :-)

[ Reply to This | # ]