The only problem with asking for help by pigging backing on another user's thread, is you have no control of the thread. And if your discussion takes a "Left Turn", the original creator of the thread ends up having the discussion they started hijacked in a directory they may not like it to go (it could still go where they do not what, but at least it is about their problem, not someone else's 🙂 ).
But many people piggy back on existing threads. You are not the first, and will not be the last.
Do you know if purging the RAM when I feel the underperformance can be unhealthy for the system?
No. It just forces the system to invalidate its cached data. If any of the Inactive data was waiting to be written to disk, it is done at the time of the purge before being moved to the free list. Doing this every once in awhile is not much of an issue. Go ahead and purge away.
However, if you were doing a purge every few seconds, I would think you are making the problem worse, and putting an extra strain on your disk, as it will need to do more writes and a lot more reads as it will no longer have any data cached in RAM to avoid doing a read.
Sometimes I purge and a whole chunk frees up but in a matter of seconds the Inactive RAM builds up again, with no apps running and without quitting anything....just frees up and then drains down again
Then something is running that is using that data. TimeMachine, or another backup utility (Mozy, CrashPlan, Carbonite, SuperDuper, Carbon Copy Cloner, etc...), or iTunes downloading podcasts, or BitTorrent, your browser doing prefetches of pages it thinks you are about to read, or an RSS news reader checking for new stories and downloading them ever few minutes, you have enabled System Preferences -> Sharing -> File Sharing and someone else is read/writing files on your Mac, Software Update is automatically downloading the software updates before it tells you there is a new update, iTunes is downloading the next iPhone/iPad/iPod Touch update, you recently added new files, and Spotlight is busy scanning the data to update its Spotlight database, you installed a virus scanner and it is busy looking at all your files looing for non-existent virii, other app you have installed that runs in the background, or an Apple standard daemon I haven't thought of...
Inactive RAM is a cache of recently used data to avoid doing slow reads and writes to the disk. This is very important for battery life in a laptop as that disk drive is one of the more demanding power users on a laptop.
ve read about some scripts that'll purge the RAM if inactive memory build beyond a certain threshold or if Free Ram falls below a ertain threshold... any tips on that? Or is this behaviour perfectly normal in ML and I should simply forget about it? It's basically the fact that I have plenty of RAM but feel underperformance when I trust I shouldn't that bugs me
If you want to run a script, feel free, as long as it does not cause a purge constantly, as that would totally defeate the purpose of the cache, and if you have a laptop, drain your battery faster. If it only triggers a purge every once in awhile, again I do not see much of a problem.
However, the behavior of keeping Free RAM low and maximizing the cached data via Inactive RAM is normal behavior. After all you paid for all that RAM, when it is Free it is not doing anything for you. At least when it is Inactive it is potentially holding something useful, and attempting to earn its keep.
Another thought is maybe you are actually using your Mac, the apps you are running would benefit from more RAM, as I expect that you do not normally use your Mac with ONLY Finder and Activity Monitor running. If the apps you are using are RAM hungry, you might consider adding more RAM to your system. RAM is not very expensive these days. I just bumped my 27" iMac from 8GB to 16GB for $83 via Crucial.com. I'm considering doing the same thing to my Macbook Pro (I'm only holding back because the iMac just required removing 3 screws, and the Macbook Pro requires removing 10 screws and they are not all the same length (you have to keep track of which screw goes back into which hole 🙂 ).
If you are really have RAM issues when actually using your Apps, I find the best way to monitor that is by monitoring pageout numbers over time.
Start an Applications -> Utilities -> Terminal session and run the following command:
sar -g 60 100
which will tell you the number of pageouts every minute for 100 minutes (adjust the numbers to suit your tastes).
Now go use your Mac normally.
Come back after an hour, or when you feel performance is really back, and look at the pageout numbers. If mostly zero, then it is not paging and RAM is sufficient. If a few bursts of low values still not much of an issue. If sustained high numbers, then you either need to stop running so many concurrent apps, or get more RAM.