Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Capacities up to 48TB and speeds up to 1527MB/s

How to Purge the File System Disk Cache

Last updated 2016-05-28 - Send Feedback
Related: how-to, How To, Software

It can be confusing to evaluate available memory, because OS X can use many gigabytes for the file system cache. Thus, it can be useful to purge the OS X file system buffer cache for that reason, and another:

  • Before performing or repeating a performance test, for consistent results.
  • To assess system memory usage without a bloated disk cache.

In Terminal, use sudo purge:

diglloydMP:MPG lloyd$ sudo purge

Use of 'sudo purge' is harmless; it simply empties file system caches. The 'man' page states:

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.

The results can be seen in Activity Monitor under memory usage. The cache will not go to zero because the system keeps some important file system structures cached.

15.6GB of cache used before sudo purge, 1.09GB after (toggle to compare).

Cached files before and after
Durable and fast, up to 1800MB/s
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 161 min unless noted. Certain deals may last longer.
$1049 SAVE $450 = 30.0% $20 FREE ITEMS Canon EOS 77D DSLR with 18-135mm USM in Cameras: DSLR
$1497 SAVE $500 = 25.0% $466 FREE ITEMS Nikon D750 DSLR in Cameras: DSLR
$1998 SAVE $400 = 16.0% Sony a7R II Mirrorless in Cameras: Mirrorless
$648 SAVE $100 = 13.0% $37 FREE ITEMS Sony DSC-RX100 III in Cameras: Point and Shoot
$300 SAVE $160 = 34.0% $9 FREE ITEMS Steiner 8x32 XC Binocular in All Other Categories
$1399 SAVE $100 = 6.0% ZEISS 18mm f/2.8 Batis in Lenses: Mirrorless

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | Twitter
Copyright © 2008-2017 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__