Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Startup disk is full - too many swapfiles

My MacBook Air keeps coming up with a Startup Disk is full error. On checking with GrandPerspective I find that the SSD hard drive has about 60 1GB swapfiles in private/var/vm. The creation times on these files suggests that one is created each time I save a file in Pages. I've looked through the system log files for any messages that are relevant but don't see anything obvious.


Any thoughts on what is causing the problem and how to resolve it?


Details:

Early 2014 MacBook Air 11", 4GB RAM, 1.4GHz Intel i5 running Yosemite 10.10.5

Pages version 5.5.3

Posted on Sep 18, 2015 4:34 PM

Reply
7 replies

Sep 21, 2015 3:17 PM in response to Hoop of Steel

There is excessive swapping of data between physical memory (that is, the memory chips on the logic board) and virtual memory (one or more files on the startup volume.) That activity is relatively slow and causes the whole system to be less responsive. It can happen for two reasons:

A long-running process with a memory leak (a kind of bug)

Not enough memory for your usage pattern

Please note that if the cause is a memory leak, installing more memory will not help. That's likely if you already have more than 4 GB of memory. Tracking down a memory leak can be difficult, and it may come down to a process of elimination.

These instructions are for OS X 10.9 and later. Some details may be slightly different for earlier versions of OS X.

When you notice the swap activity, open the Activity Monitor application and select All Processes from the View menu, if it's not already selected. Select the Memory tab. Click the heading of the Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select

View ▹ Columns ▹ Real Memory

from the menu bar.

If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more real memory over time without ever releasing it. Here is an example of how it's done.

The processes named "Safari Web Content" render web pages for Safari. They use a lot of memory and may leak if certain Safari extensions or third-party web plugins are installed. Consider them prime suspects.

Another process often implicated in memory leaks is "inkjet4" or "inkjet8," which is a component of the HP printing software. If it's present, force-quit the process in Activity Monitor to solve the problem temporarily. Empty the print queues in the Printers & Scanners preference pane (which has a slightly different name in each recent version of OS X.) If you don't use an HP printer, reset the printing system. Otherwise, if the problem is recurrent, update the software (which may not help) or contact HP support.

"Wired" memory should be a small part of the total. That memory is not swapped, but it makes less physical memory available which may then result in swapping. If you have a lot of wired memory, that's usually an indication of a memory leak in a third-party program that modifies the operating system at a low level. Ask for guidance in that case.

If you don't have an obvious memory leak, the options are to install more memory (not possible with your model) or to run fewer programs simultaneously.

The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command:

sudo leaks -nocontext -nostacks process | grep total

where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the leaks(1) man page and the Apple developer documentation for details.

Sep 21, 2015 3:26 PM in response to Linc Davis

Thanks for the detailed instructions, Linc.


I checked the memory usage using Activity Monitor next time it happened and found that the culprit was the Finder with 41GB of memory used. Obviously there is some sort of memory leak here. The Finder looks like it is the problem, or Pages, which is the App doing all the saving. I relaunched the Finder and all the extra swapfiles disappeared, so that is a workaround but finding the cause would be nice.


Does this suggest something to anyone?


Could it be a problem with the SSD? The Macbook is only a few months old so now would be a good time to take it back if that is the case.

Sep 22, 2015 10:37 AM in response to Hoop of Steel

1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.

The test works on OS X 10.7 ("Lion") and later. I don't recommend running it on older versions of OS X. It will do no harm, but it won't do much good either.

Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.

2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.

There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.

You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.

In this case, however, there are ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the requisite skill can verify what it does.

You may not be able to understand the script yourself. But variations of it have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message. See, for example, this discussion.

Another indication that the test is safe can be found in this thread, and this one, for example, where the comment in which I suggested it was recommended by one of the Apple Community Specialists, as explained here.

Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.

4. Here's a general summary of what you need to do, if you choose to proceed:

☞ Copy a particular line of text to the Clipboard.

☞ Paste into the window of another application.

☞ Wait for the test to run. It usually takes a few minutes.

☞ Paste the results, which will have been copied automatically, back into a reply on this page.

These are not specific instructions; just an overview. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait, paste again. You don't need to copy a second time.

5. Try to test under conditions that reproduce the problem, as far as possible. For example, if the computer is intermittently slow, run the test during a slowdown.

You may have started up in safe mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual before running it. If you can only test in safe mode, do that.

6. If you have more than one user, and only one user is affected by the problem,, and the affected user is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.

7. Load this linked web page (on the website "Pastebin.") The title of the page is "Diagnostic Test." Below the title is a text box headed by three small icons. The one on the right represents a clipboard. Click that icon to select the text, then copy it to the Clipboard on your computer by pressing the key combination command-C.

If the text doesn't highlight when you click the icon, select it by triple-clicking anywhere inside the box. Don't select the whole page, just the text in the box.

8. Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing command-V, then press return. The text you pasted should vanish immediately.

9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter

exec bash

and press return. Then paste the script again.

10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. If you don't know the password, or if you prefer not to enter it, just press return three times at the password prompt. Again, the script will still run.

If the test is taking much longer than usual to run because the computer is very slow, you might be prompted for your password a second time. The authorization that you grant by entering it expires automatically after five minutes.

If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.

11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, a series of lines will appear in the Terminal window like this:

[Process started]

Part 1 of 8 done at … sec

Part 8 of 8 done at … sec

The test results are on the Clipboard.

Please close this window.

[Process completed]

The intervals between parts won't be exactly equal, but they give a rough indication of progress. The total number of parts may be different from what's shown here.

Wait for the final message "Process completed" to appear. If you don't see it within about ten minutes, the test probably won't complete in a reasonable time. In that case, press the key combination control-C or command-period to stop it. Then go to the next step. You'll have incomplete results, but still something. If you close the Terminal window while the test is still running, the partial results won't be saved and you'll have to start over.

12. When the test is complete, or if you stopped it because it was taking too long, quit Terminal. The results will have been saved to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.

At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.

If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.

13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "The message contains invalid characters." That's a bug in the software that runs this website. Please post the test results on Pastebin, then post a link here to the page you created.

14. This is a public forum, and others may give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but whatever else you're told to do may not be. For others who choose to run it, I don't recommend that you post the test results on this website unless I asked you to.

______________________________________________________________

Copyright © 2014, 2015 by Linc Davis. As the sole author of this work (including the referenced "Diagnostic Test"), I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

Jan 7, 2016 4:57 PM in response to Hoop of Steel

A


Some OS X files (Installer package receipts) are missing or invalid. Other OS files may also be missing or invalid.

If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.

There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.

*The linked support article refers to OS X 10.10 ("Yosemite"), but the procedure is the same for OS X 10.7 ("Lion") and later.

B

The symbol cache is very large. It stores data used in logs and crash reports, and it may have grown because it's corrupt. The cache is created automatically, and if deleted, it should be recreated when you restart the computer. Initially, at least, it will be a lot smaller.

I've seen one unverified report that a system became unbootable when the cache was deleted. That would have been due to a corrupt installation of OS X, but you should be prepared to reinstall if necessary. There is no reason to panic as long as you have good backups.

Back up all data before proceeding.

Triple-click anywhere in the line below on this page to select it:

/System/Library/Caches/com.apple.coresymbolicationd

Right-click or control-click the highlighted line and select

Services Reveal in Finder (or just Reveal)

from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash.

*If you don't see the contextual menu item, select the line below and copy it to the Clipboard by pressing the key combination command-C:

/System/Library/Caches

In the Finder, select

Go Go to Folder...

from the menu bar and paste into the box that opens by pressing command-V. You may not see what you pasted because a line break is included. Press return.

A folder named "Caches" should open. Inside it is a subfolder named "com.apple.coresymbolicationd". Move that subfolder to the Trash, restart, and empty.

C

Back up all data before proceeding.

Launch the Font Book application and validate all fonts. You must select the fonts in order to validate them. See the built-in help and this support article for instructions. If Font Book finds any issues, resolve them.

Start up in safe mode to rebuild the font caches. Restart as usual and test.

Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t start in safe mode. In that case, ask for instructions.

If you still have problems, then from the Font Book menu bar, select

FileRestore Standard Fonts...

You'll be prompted to confirm, and then to enter your administrator login password.

Also note that if you deactivate or remove any built-in fonts, for instance by using a third-party font manager, the system may become unstable.

D

There may be a hardware fault in the storage subsystem, such as a partial break in the ribbon cable connecting the internal drive to the logic board. If the above steps don't resolve the problem, see below.

Make a "Genius" appointment at an Apple Store, or go to another authorized service provider. You may have to leave the machine there for several days.

Back up all data on the internal drive(s) before you hand over your computer to anyone. There are ways to back up a computer that isn't fully functional—ask if you need guidance.

If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.

Keeping your confidential data secure during hardware repair

Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.

*An SSD doesn't need to be zeroed.

E

The Wi-Fi signal is too weak for good performance. You should either move closer to the router or extend the wireless network with another access point. If you're already close to the router, or if you get poor Wi-Fi performance on all networks, there may be a hardware fault such as a detached antenna cable.

Jan 7, 2016 5:10 PM in response to Linc Davis

Hi Linc,


I did reinstall the operating system in the end by upgrading to Mavericks. This seemed to fix the problem but the laptop had to go back under warranty when it failed to start one day. The power circuitry was replaced and all was well until the screen died a few weeks later. That, too, was replaced (after the replacement screen had to be sent back because it was DOA) and no further issues until the screen died again last week. I'm just waiting now until the Apple Authorised Service Provider reopens after Christmas/New Year. They said last time that another failure would result in them replacing the entire machine.


I guess that this may have been caused by a hardware failure, either in the storage subsystem or somewhere else. This may have cascaded to the power circuitry and screen etc. I do hope they honour their word and replace the machine outright.


I have made sure that the machine has a TimeMachine backup so I'm not too concerned about unbacked-up data.


At any rate, thank you so much for the time you spent helping with this.


cheers

Huub

Startup disk is full - too many swapfiles

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