Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Inactive memory is good for you. Purging it just means that the disk cache is gone and files have to be read back from disk next time you access them.

The author of the article might have seen problems with swapfiles growing, but he certainly does not have the tools or experience needed to accurately find the cause of those problems. So I wouldn't trust what he says very much.

If you have a situation where it seems like the system is stalling or using too much memory, please do run sysdiagnose (see the man page for the handy key combo) and attach it to a report at bugreport.apple.com.



Yup, and he's fixing memory problems with "repair disk permissions", not sure how that works. But I would agree that sometimes the linux handling of memory is way better (but unfortunately I've been using linux for the last 15 years and saw some strange behavior there too).


One of the most irritating things about OSX memory management is that it appears to swap out inactive memory well beyond the point where OSX itself begins to yell at you for low disk space. Admittedly, I need to free up some disk space, but it's irritating that by rebooting (which I'm assuming is equivalent to purging) I can go from 500mb free to 9gb - and then back within a day.


How much memory do you have installed? I'm guessing most of that is taken up by /var/vm/sleepimage, not the swapfile.

There is a way to disable sleepimage, but I'd rather not say it, since you should really clean up your disk.


4GB installed. I looked at /var/vm/sleepimage before and after a reboot and it was 4GB in both cases (at least according to ls). The variation in free memory is greater than the memory I have installed anyway. I didn't however realize that /var/vm existed and contains pointers to the other swapfiles that I can monitor to see how they change. Thanks for the tip!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: