Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Thanks! So I restarted and all the swapfiles, but swapfile0 (67mb), is gone! So swapfiles are created even when my computer was asleep
No, swapfiles are not created when your Mac is asleep. It simply didn't delete the last swapfile. Also, swapfiles are not used or increased if you're not paging out. Make sure you have enough RAM for your normal workload.

To determine if you can benefit from more RAM, launch Activity Monitor and click the System Memory tab at the bottom to check your page outs. Page outs are cumulative since your last restart, so the best way to check is to restart your computer and track page outs under your normal workload (the apps, browser pages and documents you normally would have open). If your page outs are significant (say 1GB or more) under normal use, you may benefit from more RAM. If your page outs are zero or very low during normal use, you probably won't see any performance improvement from adding RAM.

Mac OS X: Reading system memory usage in Activity Monitor
 
No, swapfiles are not created when your Mac is asleep. It simply didn't delete the last swapfile. Also, swapfiles are not used or increased if you're not paging out. Make sure you have enough RAM for your normal workload.

To determine if you can benefit from more RAM, launch Activity Monitor and click the System Memory tab at the bottom to check your page outs. Page outs are cumulative since your last restart, so the best way to check is to restart your computer and track page outs under your normal workload (the apps, browser pages and documents you normally would have open). If your page outs are significant (say 1GB or more) under normal use, you may benefit from more RAM. If your page outs are zero or very low during normal use, you probably won't see any performance improvement from adding RAM.

Mac OS X: Reading system memory usage in Activity Monitor

Now you lost me. I was/am not doing anything intensive that's required more than 8GB of RAM, not even 2. And I lost that 1GB overnight, when my computer was asleep. Those swapfiles were not there before last night. You saw the screenshots. Hmm...something's still not right.
 
Now you lost me. I was/am not doing anything intensive that's required more than 8GB of RAM, not even 2. And I lost that 1GB overnight, when my computer was asleep. Those swapfiles were not there before last night. You saw the screenshots. Hmm...something's still not right.
Nothing is running when your Mac is asleep, so swapfiles cannot be created in sleep mode.
 
Nothing is running when your Mac is asleep, so swapfiles cannot be created in sleep mode.

But 1 GB of something in the Private folder was created between last night before I went to bed and just now when I opened my computer the first time today!
 
But 1 GB of something in the Private folder was created between last night before I went to bed and just now when I opened my computer the first time today!
It had to be created before your Mac entered sleep mode, or it didn't stay in sleep mode. If it's in sleep mode, nothing is running, no files are being created or modified.... nothing. I suggest you check it more carefully again tonight.
 
It had to be created before your Mac entered sleep mode, or it didn't stay in sleep mode. If it's in sleep mode, nothing is running, no files are being created or modified.... nothing. I suggest you check it more carefully again tonight.

I was restarting all throughout the day yesterday and again, I have never done anything RAM intensive since the day I got my Mac. So there is no reason I should have accumulated swapfiles like that. Therefore you can admit something is weird with my swapfiles, right? They are on hyper mode or something.

But of course I will do another test tonight! More screenshots!
 
I was restarting all throughout the day yesterday and again, I have never done anything RAM intensive since the day I got my Mac. So you have to admit something is weird with my swapfiles. They are on hyper mode or something.

But of course I will do another test tonight! More screenshots!
Be sure to check Activity Monitor's System Memory tab before you sleep and after you wake your Mac.
 
I'll make sure that's captured in the screenshot too.
For taking screen shots of Activity Monitor for troubleshooting, I recommend these steps:
  1. Launch Activity Monitor
  2. Change "My Processes" at the top to "All Processes"
  3. Click on the CPU column heading once or twice, so the arrow points downward (highest values on top).
  4. Click on the System Memory tab at the bottom.
  5. Take a screen shot of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
  6. Post your screenshots.
 
For taking screen shots of Activity Monitor for troubleshooting, I recommend these steps:
  1. Launch Activity Monitor
  2. Change "My Processes" at the top to "All Processes"
  3. Click on the CPU column heading once or twice, so the arrow points downward (highest values on top).
  4. Click on the System Memory tab at the bottom.
  5. Take a screen shot of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
  6. Post your screenshots.

Not to sound lazy, but do you actually need to see the processes down at the bottom (that take 0.0% of the CPU)? Also, what kinds of unusual processes or things should I be looking for?

Thanks for the tips on how use Activity Monitor more effectively.

I'll just post this to get your chops wet and maybe you can tell me what you think. This is basically how I always run my computer:
 

Attachments

  • Screen Shot 2012-08-09 at 3.17.39 PM.png
    Screen Shot 2012-08-09 at 3.17.39 PM.png
    223.2 KB · Views: 201
Not to sound lazy, but do you actually need to see the processes down at the bottom (that take 0.0% of the CPU)?
Usually they're not critical, but occasionally I see software running that isn't needed or isn't recommended, even though it might not be consuming a large amount of resources at the time of the screen shot.
Also, what kinds of unusual processes or things should I be looking for?
First, I look for any processes that are placing high demands on the CPU or memory. I also look for processes that may indicate a need for additional software, such as if Safari Web Content is high and Flash is being used, I recommend ClickToFlash to control what Flash content plays and when. High CPU/memory use by mds and mdworker processes may indicate Spotlight is indexing. There are quite a few things to look for. It just helps to start with a picture of what's happening.
 
There is a critical flaw in the logic behind this entire thread. What makes you think that, because your computer is writing data to your drive now, it will continue to do so until it fills the entire drive?
 
Scanned this thread so sorry if I missed, but any chance you're running SugarSync, or something similar? I had an issue where SugarSync wrote 30-50 GB of data as backups, so I had to find the folder in Library and delated it...got my space back.
 
Scanned this thread so sorry if I missed, but any chance you're running SugarSync, or something similar? I had an issue where SugarSync wrote 30-50 GB of data as backups, so I had to find the folder in Library and delated it...got my space back.

I'm not running SugarSync. I've never even heard of it.

The same exact swapfiles are back! :mad: In just 8 hours of sleeping (12AM-now), my storage is back to minus 1 GB. I'm sure a simple restart will delete them again, but that's not going to explain why this is happening. I didn't take a screenshot of activity monitor but I can tell you that I was doing absolutely nothing intensive and my computer wasn't slow at any point before I went to bed or this morning. Checking now, I'm still only using 2.15GB of memory.

So my swap files grow uncontrollably at night when I'm/my computer is asleep. Great...:mad:

I don't think I'll restart today. I'll just see what happens.

----------

Scanned this thread so sorry if I missed, but any chance you're running SugarSync, or something similar? I had an issue where SugarSync wrote 30-50 GB of data as backups, so I had to find the folder in Library and delated it...got my space back.

You're right.

Look what I just found. http://osxdaily.com/2012/04/10/shutdown-sleep-or-leave-mac-turned-on/

Laptop users with SSDs should shut down instead of shutting the lid. You write the swap file to the SSD every time you go to sleep, even if you don’t get to 0% battery and shut down. It won’t write all 4G (or 8G, or whatever), but that’s still a lot of memory getting written to the swapfile every time. If I shut the lid 4 or 5 times a day I am generating more writes than I’ll do the rest of the day.

The goal with SSDs is to minimize writes. With fast startup, startup isn’t that much slower than waking from sleep.

If you have a SSD, just turn of “safe sleep” (Google for instructions). Then the RAM contents aren’t written to it when you close the lid.

http://hints.macworld.com/article.php?story=20070302210328928

Would disabling safe sleep stop these swapfiles from growing? Do I even have an issue here or is this all normal?
 
Last edited:
So my swap files grow uncontrollably at night when I'm/my computer is asleep. Great...:mad:
Again, it is impossible for your swap files to grow when your Mac is in sleep mode. Apparently, it's keeping a 1GB swap file and not deleting it, but it's not paging in sleep mode.
You write the swap file to the SSD every time you go to sleep
It's not the swap file that gets written when you enter sleep mode; it's the sleepimage file.
 
Again, it is impossible for your swap files to grow when your Mac is in sleep mode. Apparently, it's keeping a 1GB swap file and not deleting it, but it's not paging in sleep mode.

It's not the swap file that gets written when you enter sleep mode; it's the sleepimage file.

Hmm but it's not there when I go to sleep and it's there in the morning. It's like magic. I wish I could know why. If I could I would wait 8+ hrs during the day and see what happens but I want to be able to use my computer, haha. What do you think about turning off safe sleep?
 
Hmm but it's not there when I go to sleep and it's there in the morning. It's like magic. I wish I could know why. If I could I would wait 8+ hrs during the day and see what happens but I want to be able to use my computer, haha. What do you think about turning off safe sleep?
You can certainly try that, but I don't know why you're so worried about 1GB of space being used. You should keep about 10-20% of your drive space free, anyway, so 1GB here or there shouldn't matter.

Why hibernate or 'safe sleep' mode is no longer necessary in OS X Lion (Updated)
How to Remove the Disk-hogging Sleepimage File from Your Mac
 
The sleep image file won't just keep growing till an infinite size for giggles. It is the same size as your RAM. Why don't you just leave the poor operating system alone to do its job?

There is no reason to be mucking about, unless there is a run away process that is really continuously writing data, which I don't believe is the case from reading this thread.

To double check open Activity Monitor and click on the Disk Activity tab and see what's going. You'll always see reads and writes happening, even if the computer is idling. Up to a couple of hundreds of KBs is normal. If you're seeing MBs being written then you need to check what is going on.

You can either use Activity Monitor, by checking which processes are not idling and then click on the process and click Inspect in the tool bar. Then click on Open Files and Ports. You can also check which processes are writing to the disk by opening Terminal and typing

Code:
sudo iotop -C 5 12

But, unless you have some understanding of computers, this might not mean anything to you.

To reiterate, processes are always writing and reading stuff.
 
Last edited:
The sleep image file won't just keep growing till an infinite size for giggles. It is the same size as your RAM. Why don't you just leave the poor operating system alone to do its job?

There is no reason to be mucking about, unless there is a run away process that is really continuously writing data, which I don't believe is the case from reading this thread.

To double check open Activity Monitor and click on the Disk Activity tab and see what's going. You'll always see reads and writes happening, even if the computer is idling. Up to a couple of hundreds of KBs is normal. If you're seeing MBs being written then you need to check what is going on.

You can either use Activity Monitor, by checking which processes are not idling and then click on the process and click Inspect in the tool bar. Then click on Open Files and Ports. You can also check which processes are writing to the disk by opening Terminal and typing

Code:
sudo iotop -C 5 12

But, unless you have some understanding of computers, this might not mean anything to you.

To reiterate, processes are always writing and reading stuff.

I have to run out quick now but I'll say this -
"Up to a couple of hundreds of KBs is normal. If you're seeing MBs being written then you need to check what is going on."

Yes, it's MBs. ~1000 MBs in 8 hrs to be exact.

"The sleep image file won't just keep growing till an infinite size for giggles. It is the same size as your RAM. Why don't you just leave the poor operating system alone to do its job?

There is no reason to be mucking about, unless there is a run away process that is really continuously writing data, which I don't believe is the case from reading this thread."

The sleepimage file is fine. It's always 8.6GB (my RAM is 8GB). The problem is Swapfiles growing out of control!
 
This is one of the absolutely strangest threads I've ever seen on here.

Seared - are you thinking that if you do nothing, that you will "lose" a GB of space every day until your HD is full? What do you based that concern on?
 
I have to run out quick now but I'll say this -
"Up to a couple of hundreds of KBs is normal. If you're seeing MBs being written then you need to check what is going on."

Yes, it's MBs. ~1000 MBs in 8 hrs to be exact.

"The sleep image file won't just keep growing till an infinite size for giggles. It is the same size as your RAM. Why don't you just leave the poor operating system alone to do its job?

There is no reason to be mucking about, unless there is a run away process that is really continuously writing data, which I don't believe is the case from reading this thread."

The sleepimage file is fine. It's always 8.6GB (my RAM is 8GB). The problem is Swapfiles growing out of control!

Please do the following.

1. Restart the computer
2. Open Activity Monitor. Select the System Memory tab and take a screenshot
3. Select the Disk Usage tab and take a screenshot
4. Select the Disk Activity tab and take a screenshot
5. Use your computer for a couple of hours, let it sleep etc, as if you would normally
6. Take all of the screenshots that I've mentioned above again and post everything here
 
Last edited:
Correction:

1000MB = 1GB
1000GB = 1TB

lol. Indeed. Clearly I need some sleep or learn to read better. :eek: :mad: I should have at least used capitals since they are different things again. Not having a good day.

I am sorry, but are we seriously worrying about 1 GB being written in 8 hours? I refuse to participate any further in these shenanigans.
 
lol. Indeed. Clearly I need some sleep or learn to read better. :eek: :mad:
I usually claim having a "senior moment" in cases like this! :D
I am sorry, but are we seriously worrying about 1 GB being written in 8 hours?
It's obviously not being written in sleep mode, so it's either not being deleted in the first place, or it's created before sleeping or after waking. I agree that 1GB is hardly cause for concern and certainly not "growing out of control!"
 
I agree that 1GB is hardly cause for concern and certainly not "growing out of control!"

Ok that's fine. Why didn't anybody say this before!? I'll leave this topic alone for a while, won't stress, and just see what happens.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.