Question: I recently upgraded my mid-2011 15” MacBook Pro to Mac OS X 10.9 Mavericks. Since then, my computer’s RAM usage spikes to the point of making my computer unusable. Specifically, anywhere between a minute and 2 hours after booting up, the process `kernel_task` will use between 4 and 5 GB of RAM (I have 8 GB installed) and `mds` and `mds_store` will use around 2 GB between them. At that point all of my apps become unresponsive. 

If I don't restart my computer within about five minutes of this happening, Mac OS X will ask me to quit all of my apps. If I don’t do that the computer becomes totally unresponsive (even to restart requests) and I have to perform a hard shutdown. If I do, the same thing happens but it takes a couple minutes longer. I talked to an Apple representative and he said to flash my PRAM and reset the SMC, which I did, but nothing happened. 

Aside from that he said to send my device in, which I can’t do at the moment. Any idea what's going on?

Answer: 
So I found the same thing with my iMac: Mavericks seemed to be chewing through a lot more RAM than Lion or Mountain Lion.

I found a solution though that doesn't require a reboot: [“Using the Purge Command in OS X Mavericks”](http://osxdaily.com/2013/11/14/use-purge-command-os-x-mavericks/)

Simply run `sudo purge` (it’ll ask you for your password) and it purges the unused memory the OS is hanging onto.

I freed up over 5GB this way without any hitches although the system appears to hang for a moment or two while it’s doing this purge.
What I did for my machine was to do a cron job to purge memory

**I've switched to super user**

```
sudo su
crontab -e

```

Then I've added the next line:

```
* * * * * purge

```

To run purge each minute. My memory usage went down from 16/16G to 9/16G on average.