swapfile is not created even though dynamic_pager is loaded

Hi guys,


Recently I've faced the fact that I've had only 37M left on my SSD (which is the only disc in my system). I'm not sure if that's somehow connected with the thing I discovered several days later: the swap file is not created. That results in missing graphics in some places of a system. Lots of images in browser are just blank, some icons in dock won't show, some applications will crash and so on.


I've read the whole google about the problem and found tons of advice how to disable your swap and only few of them on how to enable it. So basically all of them just tend to execute the following line:

sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

So running sudo launchctl list | grep page gives me the following output:

- 0 com.apple.dynamic_pager

which I assume as a proof that dynamic pager service is loaded. I've viewed the contents of the .plist file and executed the following line manually:

sudo /sbin/dynamic_pager -f /private/var/vm/swapfile

which resulted in exit code=0, but still no swap file is located at /private/var/vm/


I dunno what to think. I was told that the system kernel will create the swap file whenever it needs one and this 'service' only tells kernel where to create this file. I tried to change the swap file name, still no luck -- the file is just not created.


PS: yes, I tried to enable/disable swap service. yes, I rebooted after every enable/disable prcedure.

PPS: Macbook Pro 13 mid-2014/256Gb/8Gb/Core-i5

MacBook Pro with Retina display, OS X Yosemite (10.10.4)

Posted on Jul 26, 2015 2:19 PM

Reply
5 replies

Jul 27, 2015 1:15 AM in response to turbo.exe

I wouldn't try to hack the system in this way. I would assume that the system process are launching and running as intended, unless they've been messed with.

In which case, I would look for some other cause to your problem. No swap may be a symptom, rather than a cause.


Have you verified/repaired the disk? (NB Disk, not permissions, booted to the Recovery Partition or other volume).

I would re-install the 10.10.4 Combo updater. This will re-apply every file updated in all the updates since Yosemite was released. You can download it from the Apple support pages.

Also, make sure you haven't got any rogue third-party software installed that might be modifying the system or running background processes.

Jul 27, 2015 1:54 AM in response to benwiggy

Well, you're right, I should've checked the disk first. Didn't get that idea coz my macbook is pretty new, I think it's a software issue. Though I just did a check with standard Disk Utility. Here's the log:

TL;DR: disk is ok

Verifying volume “Macintosh HD”Verifying storage systemChecking volumedisk0s2: Scan for Volume Headersdisk0s2: Scan for Disk LabelsLogical Volume Group C8572D49-DF98-4C97-A968-7C5AE49E24E7 on 1 devicedisk0s2: Scan for Metadata VolumeLogical Volume Group has a 24 MB Metadata Volume with double redundancyStart scanning metadata for a valid checkpointLoad and verify Segment HeadersLoad and verify Checkpoint PayloadLoad and verify Transaction SegmentIncorporate 0 newer non-checkpoint transactionsLoad and verify Virtual Address TableLoad and verify Segment Usage TableLoad and verify Metadata SuperblockLoad and verify Logical Volumes B-TreesLogical Volume Group contains 1 Logical VolumeLoad and verify CFEDA02C-971D-49CD-A4BF-E88DB2E7F1B9Load and verify C60CDE00-0558-44A9-B044-FC225B6899FCLoad and verify Freespace SummaryLoad and verify Block AccountingLoad and verify Live Virtual AddressesNewest transaction commit checkpoint is validLoad and verify Segment CleaningThe volume C8572D49-DF98-4C97-A968-7C5AE49E24E7 appears to be OKStorage system check exit code is 0.Verifying file system.Using live mode.Performing live verification.Checking Journaled HFS Plus volume.Checking extended attributes file.File system check exit code is 0.

Thanks for advice about Combo Update, I remember receiving some updates prior the issue existed, it may be the cause.


Prior the issue began I had only MagicPrefs installed. I turned on the three-finger click there (it now works as mouse3-click). MagicPrefs worked ok during all the lifetime I had this macbook (over 8 months).

After the issue occured, I installed Onyx and Cocktail as I knew they both had some preferences regarding swap enabling/disabling. Though I didn't touch any ckeckbox there, just looked at the available settings, no changes were made to the system through this 3rd party software.


I will apply the combo update this evening (it's UTC+3 here) and post an update here.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

swapfile is not created even though dynamic_pager is loaded

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.