As an Amazon Associate I earn from qualifying purchases @AMAZON

Designed for the most demanding needs of photographers and videographers.
Connect and charge all of your devices through a single Thunderbolt or USB-C port.

OS X Mavericks: Compressed Virtual Memory (Big Win)

2013-10-26 • SEND FEEDBACK
Related: Apple macOS, CPU cores, memory

OS X Mavericks virtual memory compression is a big win for anyone on the margins of not quite enough memory.

Virtual memory compression is particularly valuable for users running systems with 4GB to 12GB of memory (systems likely to be suffering from virtual memory paging).

For example, even if only ~30% average compression savings are achieved, that means a 16GB memory system approaches 20+GB in usable “feel”.

Activity Monitor 'Memory' tab showing compressed memory

Since many programs might allocate memory and store highly compressible data within that memory (text, white areas of an image, computer code instructions, repetetive data structures, zeroed memory blocks, etc), many things in memory can be compressed down to a fraction of their original size.

Further, the more memory the system has, the greater the chance that large chunks of it are compressible by 50% or even 90%. Thus, upgrading memory is still a big win, but doubly so; it’s almost like getting more than you pay for!

CPU utilization is a net gain, not a loss

Virtual memory compression takes CPU cycles, but on Macs with four fast CPU cores or more, the CPU cores are often idle.

But the situation is more complex: the apparent “overhead” of using CPU cycles to compress memory is in fact a huge win. In fact, this approach is not only not a loss of performance, but a massive gain.

With virtual memory paging to disk, the CPUs are forcibly idled until the virtual memory contents can be read or written to disk, a process which can be glacially slow compared to avoiding disk access (e.g. a factor of 10 or so

With virtual memory compression, there is no disk activity and the memory compression itself is extremely fast. Hence compressed virtual memory is a massive net win: while there is some CPU utilization for the compression but real work on all CPU cores gets back “on task” in far less time, rather than idling the CPU cores waiting for disk I/O to complete.

Furthemore, the very need for more memory often forcible idles CPU cores, so in a sense virtual memory compression is free, or

Testing it

I ran the MemoryTester 'stress' command on my MacBook Pro to see how OS X would fare when all the memory is being actively used, and then launched several browsers, Photoshop and a few other things to “pile on”. I am impressed—the new VM system is clearly very robust in using memory. This feature alone makes Mavericks worthwhile for anyone on the edges of almost enough or not quite enough memory.

Shown below, this is a far more demanding scenario than 99.99% of uses cases most users might experience, but OS X 10.9 handles it quite well. There are delays in response, but the system is usable.

Memory usage of programs in Activity Monitor: OS X 10.9 Mavericks
View all handpicked deals...

Nikon Z7 II Mirrorless Camera
$2997 $2997
SAVE $click

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | X.com/diglloyd
Copyright © 2020 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__