What could cause swapping when there is no memory spike

activity-monitormemoryperformancevirtual-memory

I had a performance issue recently, which I was able to capture in the Monitor. It looks like there was plenty of free memory, but then suddenly the graph goes red, with no real spiking.

Could this occur when the size of an apps memory pages are nearly as large as free memory? In my mind, that would lead to green-level memory usage, but would go to red every time said application did its business.

I'd like to avoid having performance hits like these, but I'm more interested in understanding the way the OS works. Thanks


update: This issue did disappear after a Chrome update and reboot. The computer + Chrome hadn't been restarted in a while before the issue occurred.

Best Answer

See here for a basic, decent overview: https://www.switchingtomac.com/tutorials/osx/understanding-memory-pressure-in-os-x-mavericks/.

My guess is that something is hitting a bug, maybe doing something like getting into a memory allocation loop or something until that process crashes and gracefully reboots, freeing up that memory. I would check for Chrome updates.

The reason I suspect Chrome is two-fold: one is that I have personally experienced Chrome's resource usage going off the charts, and also because in your screenshot, the 'Force Quit' dialog shows Chrome as being paused - I initially just assumed that was because it was 'the' offender, and that lined up nicely with the theory I already had about Chrome - but in retrospect it could have been not because it was 'the' offender per-se, but the next biggest user of system resources after the kernel itself.