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

10.6: Free up system resources using Automator System 10.6
Snow Leopard only hintGiven the popularity of utility programs that let you free up computer resources, it is worth noting that we can get the same effect free of charge using built-in system tools. The simple trick behind utilities that free up computer resources is the purge command. Instead of using any of these apps, it is enough to fire up, type in 'purge' (no quotes) and press Enter.

This may be of course a bit cumbersome if we repeat this task often. In order to speed up the process and limit the procedure to a single click, we can use Automator to make a small app or a service to execute the 'purge' command.

Do do so we have to:
  • Open Automator and select 'Application' or 'Service' as our workflow.
  • Drag the 'Run Shell Script' action to our workflow from the Utilities section of the Actions Library.
  • Type in 'purge' (no quotes) in the text box.
  • Save the workflow as an Application or a Service.
  • Use the Application or Service to execute the command and free up some resources.
I have saved the workflow as an Application, and placed it in my grid. This way, the purge command is just one click away, and is always accessible from the dock.

I have tested this on 10.6 and 10.7.

[crarko adds: I tested this (in 10.6.7), and it works as described. Obviously you'll begin consuming resources again after the purging when you run applications.]
  • Currently 1.91 / 5
  You rated: 2 / 5 (11 votes cast)

10.6: Free up system resources using Automator | 11 comments | Create New Account
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.
Just two things wrong with this hint
Authored by: lincd0 on Jun 10, '11 07:41:03AM

1. The purge command is part of Xcode and isn't installed on a base system.
2. It doesn't "free up resources." It empties the disk buffer cache, thereby slowing down performance.

Otherwise, it's a great hint.

[ Reply to This | # ]
Just two things wrong with this hint
Authored by: kolouker on Jun 10, '11 07:49:33AM

I don't have Xcode installed, yet it still works.
Anyways, when I execute the purge command, the amount of free RAM displayed in Activity Monitor increases, so I assume it may speed up some memory intensive tasks.

[ Reply to This | # ]
Authored by: ash7 on Jun 10, '11 07:58:40AM

If you're at the RAM ceiling and the disk is thrashing as OS X decides what part of the mutli-gigabyte disk cache to write out, purge can be very useful to speed things up. Blindly clicking purge without knowing the RAM status can also be silly, though.

[ Reply to This | # ]
Authored by: kiltbear on Jun 10, '11 08:02:07AM

per this person's device, evidence that you may need to purge would be having greater than half of your memory listed as Inactive:

But this could all be very situation specific.

[ Reply to This | # ]
Disk Utility
Authored by: azrichg on Jun 10, '11 12:02:16PM

Somewhere along the line I found a suggestion that clears out that inactive memory problem. Seems every morning my inactive memory is a huge chunk of total memory.

Somewhere along the line I saw a post saying disk utility's 'repair disk permissions' fixes this. Sure enough, most of the time it does. Soon after all the Java stuff that always needs to be repaired the inactive memory drops significantly.

Wish I understood why it's happening in the first place.


[ Reply to This | # ]
Disk Utility
Authored by: Auricchio on Jun 10, '11 07:20:52PM

I doubt Disk Utility is doing anything directly to memory. More likely, it's using a bunch of memory, which causes things to get flushed out.

EMOJO: mojo no longer workin'

[ Reply to This | # ]
Disk Utility
Authored by: jantonc on Jun 11, '11 02:50:25PM
'mds' can and does grow extremely large, memory wise. As Spotlight indexes files the files are opened. You can also create a simple file like this

save it as 'purge.command' someplace, click on the spotlight search, type 'purge.command' followed by a return, an poof, command runs in terminal.

[ Reply to This | # ]
10.6: Free up system resources using Automator
Authored by: gmachen on Jun 10, '11 11:48:58AM

Works great under Leopard 10.5.8 (with the appropriate Developer Tools, of course).

[ Reply to This | # ]
10.6: Free up system resources using Automator
Authored by: glindsay on Jun 12, '11 01:57:49PM

The current version of Onyx allows users to free memory without the need for Xcode tools.

Graham Lindsay

[ Reply to This | # ]
10.6: Free up system resources using Automator
Authored by: apikoros on Jun 14, '11 07:49:11AM

I'm using Onyx version 2.2.8b4, the latest. I know that freeing up memory is supposed to be a feature of Onyx now, but I'll be damned if can find it. Can you point me to it? Thanks in advance.

[ Reply to This | # ]
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 | # ]