OSX has disgusting VM / management performance – once it’s started creating swapfiles, dynamically, it never lets them go and it manages them awfully badly.
My machine has been crawling for the past few days and nothing obvious is eating CPU. Remembering the existence of the Dtrace toolkit on OSX, I did:
sudo iosnoop
…and it instantly showed me that Firefox (which I was trying to shut down) and Skype (likewise) were hitting various swapfiles. I wasn’t expecting to get that information, so I was pleasantly surprised.
The overall diagnosis of the problem was pretty easy too:
du -kh /var/vm
…said I was using 4Gb of (probably rather fragmented) swapfile space.
A swift reboot and everything is OK again… for the moment… but I wonder whether I can create a OSX swap partition and use it preferentially to anything else, and I further wonder what else I can do to alleviate this.
Alas, OSX seems to be heading down towards where Windows used to be.
Leave a Reply