Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Memory Deals, Thunderbolt Drives, Performance Upgrades, and More
Small Business Tax Write-Off?
Now is the time to purchase computer or photo gear for 2018 federal tax write-off. Consult with Lloyd.

How to Purge the File System Disk Cache

Last updated 2016-05-28 - Send Feedback
Related: 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
Deals Updated Daily at B&H Photo
View BEST Deals Right Now
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 12 hours unless noted. Certain deals may last longer.
$599 SAVE $200 = 25.0% Canon 17-40mm f/4 EF L USM in Lenses: DSLR
$520 SAVE $130 = 20.0% Canon 70-200mm f/4 EF L USM in Lenses: DSLR
$449 SAVE $100 = 18.0% DJI Goggles Racing Edition in Video: Drones
$299 SAVE $50 = 14.0% $149 FREE ITEMS DJI Spark Quadcopter (Sunrise Yellow) in Video: Drones
$50 SAVE $100 = 66.0% Lowepro DroneGuard CS 400 in Video: Drones
$2497 SAVE $300 = 10.0% $29 FREE ITEMS Nikon 70-200mm f/2.8 AF-S NIKKOR E FL ED VR in Lenses: DSLR
$898 SAVE $500 = 35.0% Sony a7 II Mirrorless in Cameras: Mirrorless
$898 SAVE $506 = 36.0% $19 FREE ITEMS Sony a7 II Mirrorless with Accessory Kit in Cameras: 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__