Any better way to purge the inactive memory?
Solution 1:
Yes, you can, one command only (run in Terminal):
purge
And recheck inactive RAM
Solution 2:
The real way I've made progress diagnosing this sort of issue is to use sysdiagnose
to profile your system immediately after boot, then again before swap starts to get written and again when you note the slowdown.
Issuing purge
is not effective with OS X virtual memory on Lion and muddies the waters to find the real culprit in terms of memory leaks or paging stress.
I've found that server Macs are generally stable for 6 months or more and don't need reboots before an update will force a reboot. Client Macs running software like Office, Adobe and even some of Apple's consumer products (or Pro apps) do not run perpetually like other UNIX and benefit from a reboot once a month or so to clear memory if you have issues with swap that cannot be isolated and ameliorated by sysdiagnose
or other changes in usage.