As I may or may have not pointed out before, my attitude towards OS X's memory management is somewhere between confused and annoyed.
This has several reasons: I am confused because tools like
top or Activity Monitor will provide me many different numbers – of which I don't know the significance: Is it OK for a web browser to use 75, 170, 31 and 49 megabytes of physical, virtual, shared and private memory respectively? I don't know. I have no idea how these numbers come to be and which kind of application activity will generate which kinds of numbers.
Remember the days of classic MacOS? You'd have simple bars showing the application's memory usage, giving you a good idea of who's using a lot of resources and who isn't. Perhaps the plumbing behind that was very 1980s, but I could 'see' what's going on. Perhaps someone with good technical or Unix knowledge can enlighten me as to what the numbers mean and which ranges of memory consumption are adequate for which kind of task.
My other pet peeve is virtual memory: For all I can say, it is very poorly managed in OSX. Not only does the copying of large files seem to cause a lot of swapping afterwards (and that swapping in turn render the system unresponsive and cause iTunes to hang), also the consumption of both real and virtual memory is horrendous. Just take my current situation: The Powerbook has been running for eight days (with a couple of log-outs in between to clear up said virtual memory). Currently it's on a very light load, meaning there are nine proper applications running: Finder, Terminal, Mail, GeburtstagsChecker, iChat, Stickies, Hydra, Safari, Watson. That, plus the standard WindowManager, SystemUIServer, AFP, ssh and Web servers, an ssh session and the script to keep it alive along with all those background apps OSX starts.
Now how much memory do they consume? Well, I can't tell. My feeling is that all this should easily fit into 640MB of RAM. In fact it fills them and, according to Activity Monitor, there are roughly 4,5GB of virtual memory in use – strangely occupying 1GB on my hard drive. So again, what do those numbers mean? Why can't the system clean up its swap files a little more – the space occupied by them seems to increase with the uptime.
Any enlightening comments?
I have very little technical knowledge regarding memory management, but it is a good thing if all or most of your memory is being used at all times. If it’s there, it should be used! Since OS X can dynamically allocate memory, it makes no sense for physical RAM to go unused.
Your memory consumption stats are in line with mine.
As for the swap performance problems, I haven’t experienced those, but I’m running with 1GB of RAM and an 8MB buffered 7200RPM drive. Portable Macs generally have slow hard disks…
Not that I have sound knowledge of memory management, but I’ve heard what you wrote before. And I don’t want to contend it.
Still, I wonder whether there is any reason - and by that I mean ‘good’ reason rather than a mere explanation - why my system has to use one to two GB of my precious hard drive space for its swapfiles even though I have 640MB of RAM.
It could at least reliably free up the space it uses once there are only few applications left running. Yesterday I only had 5 applications running with two GB of swapfiles happily occupying my drive, so the rest of the system could trash its preference files.
Dude you’re a total dumbass. Memory is very well managed in OS X. The only thing you have to worry is having enough free space on the hard disk (min. 10%), so the virtual memory sytem can work efficiently. On the activity monitor watch the Private Memory column which shows best the application’s memory usage. Also watch the Pageouts number on the bottom of Activity Monitor. If you have a big and growing number there buy more RAM to decrease memory swapping to hard disk. That’s all, asswipe, stop whining.
Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.