11

The memory compression caused frequently lag so I tried turning it off by using the command

sudo nvram boot-args="vm_compressor=1"

The lag was gone but I got crashing freeze when I opened some memory hungry apps. During freezing, it was not possible to quit some apps. I could only move the mouse cursor around. After several 10 minutes, OSX simply gave up and restarted itself. It seemed that OSX was out of memory. Is it true that the default pager does not use swap?

Activity Monitor Memory Status

This is the output of vm_stat 60 when OSX was nearly crashing. I managed to quit some apps this time.

Mach Virtual Memory Statistics: (page size of 4096 bytes)
    free   active   specul inactive throttle    wired  prgable   faults     copy    0fill reactive   purged file-backed anonymous cmprssed cmprssor  dcomprs   comprs  pageins  pageout  swapins swapouts
    4058    44827     4657    48725  1634771  1994370    18399  131709K  7262284 57729401   556707   234267       96668      1541        0        0        0        0  7562237   114241        0        0 
    9946    34459     3828    37655  1644905  2010562     5380   276137     9087   169197    23038    24071       75166       776        0        0        0        0    66041     2190        0        0 
    4849    19263     1147    20141  1687072  2051233      887   432193    13109   257173    25604    13480       40135       416        0        0        0        0    56827     4094        0        0 
   58504    23530    44743    21988  1585153  1947800     5595   129338     4993    72054     5776       58       86942      3319        0        0        0        0    81298     1083        0        0 
    4002    39171    38322    29484  1625825  1985636     7638   152421     5034    84976        1       24      101932      5045        0        0        0        0    60968        5        0        0 
    3953    41098     2953    39886  1649756  2008776     6047   128151     5709    70047      565     6361       82653      1284        0        0        0        0    60644       94        0        0 
   17900    37639    22066    40355  1619144  1978515     2208   126851     5895    55252    16022     5178       95881      4179        0        0        0        0    71205     1158        0        0 
    3618    46697     4240    51043  1631256  1991014     6082   157833     6794    84127        3       60       90901     11079        0        0        0        0    54852      206        0        0 

The OSX version and build is 10.10.2 (14C109)

$ pmset -g
Active Profiles:
Battery Power       -1
AC Power        -1*
Currently in use:
 standbydelay         4200
 standby              0
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 sms                  1
 networkoversleep     0
 disksleep            10
 sleep                0 (sleep prevented by SubmitDiagInfo)
 hibernatemode        3
 ttyskeepawake        1
 displaysleep         0
 acwake               0
 lidwake              1

$ nvram -p
tbt-options %00
efi-apple-payload0-data %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%00%00%00%00%00%00%04%01*%00%01%00%00%00(%00%00%00%00%00%00%00%00@%06%00%00%00%00%00%1b|%00%00-/%00%00%ea%0e%00%00%8aO%00%00%02%02%04%04H%00\%00E%00F%00I%00\%00A%00P%00P%00L%00E%00\%00F%00I%00R%00M%00W%00A%00R%00E%00\%00P%00o%00r%00t%00M%00i%00c%00r%00o%00.%00b%00i%00n%00%00%00%7f%ff%04%00
efi-boot-device <array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>23B4430A-E749-440D-85DC-879D5DFFF3A4</string></dict></dict><key>BLLastBSDName</key><string>disk0s3</string></dict></array>%00
fmm-mobileme-token-FMM  ...
SystemAudioVolumeDB %80
prev-lang:kbd   en:0
EFICapsule_Result   STAR
efi-apple-recovery  <array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>00007C1B-2F2D-0000-EA0E-00008A4F0000</string></dict></dict><key>BLLastBSDName</key><string>disk0s1</string></dict><dict><key>IOEFIDevicePathType</key><string>MediaFilePath</string><key>Path</key><string>\EFI\APPLE\FIRMWARE\MBP81_0047_27B_LOCKED.scap</string></dict></array>%00
efi-apple-payload1-data %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%00%00%00%00%00%00%04%01*%00%01%00%00%00(%00%00%00%00%00%00%00%00@%06%00%00%00%00%00%1b|%00%00-/%00%00%ea%0e%00%00%8aO%00%00%02%02%04%04T%00\%00E%00F%00I%00\%00A%00P%00P%00L%00E%00\%00F%00I%00R%00M%00W%00A%00R%00E%00\%00H%00P%00M%00-%00e%00m%00-%000%000%000%002%000%000%000%007%00.%00b%00i%00n%00%00%00%7f%ff%04%00
ThorUpdateResult    %00%00%05%0e%01%03%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00
LocationServicesEnabled %01
fmm-computer-name   MacBook Pro
backlight-level 3%01
efi-apple-payload1  <array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>00007C1B-2F2D-0000-EA0E-00008A4F0000</string></dict></dict><key>BLLastBSDName</key><string>disk0s1</string></dict><dict><key>IOEFIDevicePathType</key><string>MediaFilePath</string><key>Path</key><string>\EFI\APPLE\FIRMWARE\HPM-em-00020007.bin</string></dict></array>%00
SmcFlasherResult    %00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00
bluetoothActiveControllerInfo   %1a%82%ac%05%00%00%000%11%fa(%cf%da%ef%ab%c5
efi-apple-payload0  <array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>00007C1B-2F2D-0000-EA0E-00008A4F0000</string></dict></dict><key>BLLastBSDName</key><string>disk0s1</string></dict><dict><key>IOEFIDevicePathType</key><string>MediaFilePath</string><key>Path</key><string>\EFI\APPLE\FIRMWARE\PortMicro.bin</string></dict></array>%00
SystemAudioVolume   %80
boot-args   vm_compressor=1
efi-boot-device-data    %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%02%1f%03%12%0a%00%00%00%00%00%00%00%04%01*%00%03%00%00%00h%8b/%25%00%00%00%00 _%13%00%00%00%00%00%0aC%b4#I%e7%0dD%85%dc%87%9d]%ff%f3%a4%02%02%7f%ff%04%00
boot-gamma  %10%06%00%00%c5%9c%00%00%00%00%00%00%f2%00%00%00%00%00%00%00%13%00%c1%05%85%00C%0c%86%02%04%12%d6%05F%18/%0b%08!B%15%0c30.O<%1f9UUNSZk%ebh%1dv%f3r%a4%91%10%8a%a5%97%0d%92%a8%a3K%9ej%a9%17%a5%ad%b4%e4%b0%ae%b9]%b7%b3%ccG%cd%b7%dc%8b%dc%fd%f5)%f3%0f%00%01%06y%00%03%0d~%02%04%13%bb%05%06%19l%0a%08!%8c%12%8c3%0e)N;E1%1aj*]%1f%7f%c0o%a4%93y%80%a8%a3%f6%8f%ad%b5%c8%a2%b4%d1%1d%c4%ba%ea%bd%e0%fd%f6%fa%ef%14%00%01%06j%00%03%0d9%02%04%13%1d%05F%19r%09%08!v%10L2%00#%0e:]*%9ex%02^%a3%8eVoi%a6%ea%80%ad%b7w%90%f1%c4v%9d%f4%d1%a5%ab%b7%df8%bd%fb%ec%f7%ce}%f6%b6%dd%fe%f9%9a%e4%ff%fc%cf%ec%ff%fd]%f1%ff%fe%df%f7
bluetoothInternalControllerInfo %1a%82%ac%05%000%11%fa(%cf%da%ef%ab%c5

ls -laO /private/var/vm
total 8388608
drwxr-xr-x   3 root  wheel  -        102 Mar 20 23:13 .
drwxr-xr-x  27 root  wheel  -        918 Oct 20 10:34 ..
-rw------T   1 root  wheel  - 4294967296 Mar 20 22:16 sleepimage

Apple refused to fix it. This is the reply from Apple.

There are no plans to address this based on the following:

This configuration is no longer supported.

We are now closing this report.

If you have questions about the resolution, or if this is still a critical issue for you, then please update your bug report with that information.

Please be sure to regularly check new Apple releases for any updates that might affect this issue.

So, since Apple aren't supporting this, I'm wondering if Is it true that the default pager does not use swap?

4

The issue is not that paging is actually turned off but that mode 1 is no longer an implementation of standard memory management but instead an ugly hack that prevents compression by making almost all active memory "wired", hence preventing compression but as an aside also swap.

  • Interesting, but I'd like to see supporting evidence before voting. Something in open source, maybe? – Graham Perrin Nov 1 '15 at 6:32
  • 1
    This makes a lot of sense. I don't have a system that I can break in this way - maybe when I spin up some VM in a bit, I'll try "breaking" El Capitan and see what I can learn. In practice, I've never needed to mess with Apple's VM and instead just tune the apps I run or eliminate another bottleneck to remain productive. – bmike Nov 1 '15 at 14:21
  • @GrahamPerrin easier yet, set mode 1, fire up Activity Monitor, take a look at "Wired Memory" vs. "Memory Used". Case closed. – tolgraven Nov 1 '15 at 19:54
3

In OSX Mavericks, I had also turned off VM compression (via the vm_compressor=1 boot-arg & reboot), because it seemed implicated in some very sluggish sessions when using a high-RAM VMWare Fusion guest. Everything seemed to work fine in Mavericks, no compression but still the expected paging.

After upgrading to OSX Yosemite (10.10.4), I was getting freeze-crashes similar to what you describe. (Specifically, after just 10-15 minutes of light web-browsing, the mouse/display/keyboard would freeze. After about another minute, the machine would spontaneously reboot. The crash report after reboot mentioned a "progress watchdog" event in all four cases.)

Fortunately, the first thing I tried was reenabling VM compression (vm_compressor=4). After 4 crashes in the first ~90 minutes of using Yosemite, there have been no crashes in the 4 days since.

So I can confirm: the vm_compressor=1 setting that seemed functional before Yosemite now seems crash-buggy. Using the Mavericks-and-beyond actual default for this value, vm_compressor=4 ('VM_PAGER_COMPRESSOR_WITH_SWAP'), seems to fix.

  • 1
    vm_compressor=1 boot-arg & reboot works in OS X 10.9 Mavericks, and does not working in OS X 10.10 Yosemite, I'm curious, will it works in OS X 10.11 El Capitan? – Albert Nov 24 '15 at 17:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .