Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DukeOfMapleton

macrumors newbie
Original poster
Apr 4, 2013
3
0
I remember finding a bit of code floating on one of the apple forums but I can't find it after days of scouring google.

My initial problem was the inactive RAM was getting too high. I wanted to have the RAM purged periodically. I found a script that did just that, and had a value section where I can enter the time in milliseconds.

I have it now set to 21,600ms which is 6 hours. So my computer automatically purges the ram every 6 hours. But now I need to remove the code because it interferes with my music production workflow and freezes the computer for a few seconds which could be detrimental to a live set.

Please if anyone knows what I am talking about or remember where this specific code is, let me know.

Its almost as if the person who published the code, decided to delete the post or something because I tried typing in main key words in search queries and still nothing comes up.
 

benwiggy

macrumors 68020
Jun 15, 2012
2,371
179
Its almost as if the person who published the code, decided to delete the post or something
Perhaps that's because purging your Inactive RAM regularly is unnecessary and actually unhelpful?
OS X is designed to use lots of your RAM for Inactive Memory.

https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html

When the number of pages on the free list falls below a threshold (determined by the size of physical memory), the pager attempts to balance the queues. It does this by pulling pages from the inactive list. If a page has been accessed recently, it is reactivated and placed on the end of the active list. In OS X, if an inactive page contains data that has not been written to the backing store recently, its contents must be paged out to disk before it can be placed on the free list. If an inactive page has not been modified and is not permanently resident (wired), it is stolen (any current virtual mappings to it are destroyed) and added to the free list. Once the free list size exceeds the target threshold, the pager rests.

If you want to get rid of the scheduled script, it probably resides at /Library/LaunchAgents or /Library/LaunchDaemons (or the same folders in the user library).
 
Last edited:

DukeOfMapleton

macrumors newbie
Original poster
Apr 4, 2013
3
0
If you want to get rid of the scheduled script, it probably resides at /Library/LaunchAgents or /Library/LaunchDaemons (or the same folders in the user library).

Oh ok, I didn't know it was harmful to purge periodically. I found the script thanks to you. It was hidden in the Launch Agent folder. Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.