I was using my MBP (with 16GB of RAM) as usual and out of blue I've this popup that:
Your system has run out of application memory.
To avoid problems with your computer, quit any applications you are not using.
I've obviously closed few which I could, but it didn't help.
After checking on memory, it seems kernel task ate 7GB and 22.36GB swap memory was used of total 23GB (which obviously was the case). However I've still 20GB of space free on my SDD.
Activity Monitor didn't help much whilst my OS X was heading to the destruction.
top stats before my kernel freeze:
Processes: 344 total, 2 running, 5 stuck, 337 sleeping, 2580 threads 19:23:56 Load Avg: 1.56, 1.62, 2.09 CPU usage: 3.51% user, 8.47% sys, 88.1% idle SharedLibs: 46M resident, 0B data, 6572K linkedit. MemRegions: 757970 total, 2139M resident, 56M private, 907M shared. PhysMem: 9410M used (6198M wired), 556M unused. VM: 1155G vsize, 1311M framework vsize, 112872658(320) swapins, 122668389(0) swapouts. Networks: packets: 299419263/363G in, 142126838/14G out. Disks: 58970173/1079G read, 20012389/1120G written.
At the end my OS X frozen and I had to do hard reset, repair my SDD in recovery mode and fixing afterwards (recovering lost work, fixing application conflicts, checking my lost+found folder, Chrome/Terminal tabs gone, headache, etc.).
My question is, how do I check on high memory usage of kernel task or how to properly deal with that kind of situation? I've tried to take Sample with Activity Monitor, but it's greyed out.
My MBR details: 2.3GHz Intel Core i7 (late 2013) with 16GB RAM. OS X: 10.9.5