Go Back   MacRumors Forums > Apple Hardware > Desktops > iMac

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 7, 2013, 05:35 AM   #1
turtlez
Banned
 
Join Date: Jun 2012
Writes to disk while asleep

Today I noted the writes at 250mb (fresh restart) just before I put the computer to sleep for 2.5 hours. I woke up it and it was at 1.40gb writes. Why does it need to write while in sleep mode?? Makes me want to shut down my computer instead of sleep it now to save the SSD wear and tear.

iMac 27" late 2012
10.8.2
Fusion
24GB
680MX

my hibernatemode is set to 0

Last edited by turtlez; Feb 7, 2013 at 06:04 AM.
turtlez is offline   0 Reply With Quote
Old Feb 7, 2013, 06:07 AM   #2
bmcgrath
macrumors 65816
 
bmcgrath's Avatar
 
Join Date: Oct 2006
Location: London, United Kingdom
I wouldn't worry about wear and tear.
__________________
iMac, Macbook Pro, iPhone, iPad, Sony Nex7
www.twitter.com/bazmeister
www.flickr.com/bazzymcg/
bmcgrath is offline   1 Reply With Quote
Old Feb 7, 2013, 06:15 AM   #3
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by turtlez View Post
Today I noted the writes at 250mb (fresh restart) just before I put the computer to sleep for 2.5 hours. I woke up it and it was at 1.40gb writes. Why does it need to write while in sleep mode?? Makes me want to shut down my computer instead of sleep it now to save the SSD wear and tear.

iMac 27" late 2012
10.8.2
Fusion
24GB
680MX

my hibernatemode is set to 0
You played around with hibernate mode and then ask for advice? Seriously, don't. If you know what you are doing, do whatever you like, but if you ask for advice on macrumors, don't play around with hibernatemode.

And you worry about wear and tear when your computer writes 1.4 GB to your SSD drive? Are you serious? Do you push your car when you go shopping because you worry about wear and tear?
gnasher729 is offline   2 Reply With Quote
Old Feb 7, 2013, 06:36 AM   #4
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by gnasher729 View Post
You played around with hibernate mode and then ask for advice? Seriously, don't. If you know what you are doing, do whatever you like, but if you ask for advice on macrumors, don't play around with hibernatemode.

And you worry about wear and tear when your computer writes 1.4 GB to your SSD drive? Are you serious? Do you push your car when you go shopping because you worry about wear and tear?
I didn't change anything i just checked what mode it was set to, 0, 1 or 2. Desktops are default to 0.

Ok lets do the math here

1.4GB of writes in 2 hours of sleep. I usually leave the computer sleeping during the night which is probably 10 hours so 0.7GB per hour so that is 7Gb writes a day in just sleep. Then my workday gives me 20-25GB writes per day so 27-32GB total per day. A lot more than the 20GB a day average everyone seems to state.

My understanding was that hibernate set to 0 was write to ram and not to disk. Please don't be such a jerk in your response because clearly my question is valid.

PS. My question was not "I don't want wear and tear how do I stop it?" it was "Should my computer be writing to the drive while in sleep mode?" Pretty easy question to understand in my opinion. Your attitude just clouded it.

here gnasher729, i made it a little more simple for you to understand:


note that there is only one question in the post. Do you see it with the red line?

Last edited by turtlez; Feb 7, 2013 at 06:51 AM.
turtlez is offline   4 Reply With Quote
Old Feb 7, 2013, 09:09 AM   #5
JustMartin
macrumors 6502
 
Join Date: Feb 2012
Location: UK
As I read it, you are making the assumption that because there was 1.4 Gb of writes in 2 hours of sleep that it would continue at that rate for the full 10 hours you had it sleeping at other times. That's not necessarily the case, it could just be doing a certain amount of Fusion access maintenance and then really sleeping.
JustMartin is offline   1 Reply With Quote
Old Feb 7, 2013, 09:40 AM   #6
jmpage2
macrumors 68030
 
jmpage2's Avatar
 
Join Date: Sep 2007
More than likely, even with hibernate 0, your new iMac has a sleepimage file. Mine has one that's about 2GB. That would explain your sleeping writes.
jmpage2 is offline   1 Reply With Quote
Old Feb 7, 2013, 10:07 AM   #7
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by jmpage2 View Post
More than likely, even with hibernate 0, your new iMac has a sleepimage file. Mine has one that's about 2GB. That would explain your sleeping writes.
thank you! if only I didn't have to sift through the trash to find your post haha
turtlez is offline   1 Reply With Quote
Old Feb 7, 2013, 10:34 AM   #8
jmpage2
macrumors 68030
 
jmpage2's Avatar
 
Join Date: Sep 2007
Well, your question isn't really iMac specific and probably should have been posted in the OS X sub-forum, you probably would have gotten better answers there.
jmpage2 is offline   2 Reply With Quote
Old Feb 7, 2013, 11:45 AM   #9
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by jmpage2 View Post
Well, your question isn't really iMac specific and probably should have been posted in the OS X sub-forum, you probably would have gotten better answers there.
I was considering it but I thought it was a Fusion thing and also hibernate modes are different from the MacBooks so I would get varied answers in the ML forum.
turtlez is offline   1 Reply With Quote
Old Feb 8, 2013, 04:32 AM   #10
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Here you go everyone with the same concern:


Quote:
Originally Posted by Brian Y View Post
Code:
sudo pmset -a hibernatemode 0
sudo rm /private/var/vm/sleepimage
sudo touch /private/var/vm/sleepimage
sudo chflags uchg /private/var/vm/sleepimage

Turns out my question was very valid and now I have a fix. using the 0 mode still doesn't stop writing a sleep image to the disk. Apparently this is a feature in 10.8.2 :S. So line 2 deletes the current sleep image, line 3 creates a blank sleep image manually and 4 line makes it immune. I tested it. Put the computer to sleep then woke it back up and no extra disk writes.

Sorry for making you look like the biggest idiot ever Gnasher
turtlez is offline   1 Reply With Quote
Old Feb 8, 2013, 12:35 PM   #11
Gogol
macrumors member
 
Join Date: Jan 2013
Location: The Netherlands
Quote:
Originally Posted by turtlez View Post
Here you go everyone with the same concern:





Turns out my question was very valid and now I have a fix. using the 0 mode still doesn't stop writing a sleep image to the disk. Apparently this is a feature in 10.8.2 :S. So line 2 deletes the current sleep image, line 3 creates a blank sleep image manually and 4 line makes it immune. I tested it. Put the computer to sleep then woke it back up and no extra disk writes.

Sorry for making you look like the biggest idiot ever Gnasher
And you take a post from someone on MR as a real solution? That sounds idiot to me too. Leave it the way it is, as Apple meant it to be. Or try to make yourself familiar with the various pmset settings. And why they are as they are.
Gogol is offline   2 Reply With Quote
Old Feb 8, 2013, 03:48 PM   #12
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by Gogol View Post
And you take a post from someone on MR as a real solution? That sounds idiot to me too. Leave it the way it is, as Apple meant it to be. Or try to make yourself familiar with the various pmset settings. And why they are as they are.
Actually I googled that person's answer before I tried it and read up a whole bunch about each line of code. My computer is working actually faster now since it doesn't have to write before sleep and read before waking up like a desktop is MEANT to do. It is a real solution since it works flawlessly. Have you never heard of bugs? You know why they call it 10.8.2? the .2 is a point update for corrections. A lot of people don't like to upgrade to the next OS X until it is at .5+ precisely because of this.

If my doing is so idiot then why have 5 others in another thread on MR done it and more than 20 on another forum I found for the explanation of each line. If it was so idiot of me to fiddle think of this. If I had not come across a reason to question the workings of the new os x update then I wouldn't be searching for a solution would I? Enjoy your ever growing writes to your SSD on sleep. Saw one guy post that each sleep was a 16GB write. Most users don't even use 15GB of writes in an 8 hour work day. Hope you got Apple care!!

PS. My actions are easily reversible with just one line of code (sudo rm /private/var/vm/sleepimage) and in theory all I did was prevent the OS from writing a sleep image. No risk here, no red button, don't run for your bomb shelter it will be okay. Also don't comment on something you know nothing about.

http://forums.macrumors.com/showthread.php?t=1480259

link to the other thread where most of the users are posting.

Last edited by turtlez; Feb 8, 2013 at 04:04 PM.
turtlez is offline   1 Reply With Quote
Old Feb 8, 2013, 04:14 PM   #13
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Good as gold
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2013-02-09 at 7.12.31 AM.png
Views:	16
Size:	128.7 KB
ID:	395455  
turtlez is offline   1 Reply With Quote
Old Feb 8, 2013, 04:42 PM   #14
Fhantompain
macrumors member
 
Join Date: Feb 2013
Location: North Carolina
Quote:
Originally Posted by turtlez View Post
Actually I googled that person's answer before I tried it and read up a whole bunch about each line of code. My computer is working actually faster now since it doesn't have to write before sleep and read before waking up like a desktop is MEANT to do. It is a real solution since it works flawlessly. Have you never heard of bugs? You know why they call it 10.8.2? the .2 is a point update for corrections. A lot of people don't like to upgrade to the next OS X until it is at .5+ precisely because of this.

If my doing is so idiot then why have 5 others in another thread on MR done it and more than 20 on another forum I found for the explanation of each line. If it was so idiot of me to fiddle think of this. If I had not come across a reason to question the workings of the new os x update then I wouldn't be searching for a solution would I? Enjoy your ever growing writes to your SSD on sleep. Saw one guy post that each sleep was a 16GB write. Most users don't even use 15GB of writes in an 8 hour work day. Hope you got Apple care!!

PS. My actions are easily reversible with just one line of code (sudo rm /private/var/vm/sleepimage) and in theory all I did was prevent the OS from writing a sleep image. No risk here, no red button, don't run for your bomb shelter it will be okay. Also don't comment on something you know nothing about.

http://forums.macrumors.com/showthread.php?t=1480259

link to the other thread where most of the users are posting.
Thank you, sir. I am another paranoid like you . I was even thinking about setting 20gb of 32 available ram as a RAM disk for temp files. Sincerely thanks a ton for your research and sharing.
Fhantompain is offline   1 Reply With Quote
Old Feb 8, 2013, 05:40 PM   #15
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by Fhantompain View Post
Thank you, sir. I am another paranoid like you . I was even thinking about setting 20gb of 32 available ram as a RAM disk for temp files. Sincerely thanks a ton for your research and sharing.
you're very welcome, glad to help I noticed I had 6 swap files all over high file sizes in the same directory that were created before my fix. I went ahead and deleted them using the terminal command:
Code:
sudo rm /private/var/vm/swapfile0
. open /private/var/vm/ by going to Go > Go to folder

and see that you have the locked zero byte sleepimage. Also if you have any swapfile0 and up just use that terminal command to remove them individually to clean up disk space. You have 32GB of RAM so you won't be needing any of those swaps. I am assuming they were created from this hibernatemode bug.

Also remember you can reverse everything just with this: sudo rm /private/var/vm/sleepimage - you will be asked to override the lock just type yes
This will delete your zero byte locked sleep image that you created manually and another sleepimage will be recreated by the system on next sleep when it attempts to write another image assuming Apple doesn't patch the issue before you do it

Last edited by turtlez; Feb 8, 2013 at 05:51 PM.
turtlez is offline   2 Reply With Quote
Old Feb 8, 2013, 07:57 PM   #16
Fhantompain
macrumors member
 
Join Date: Feb 2013
Location: North Carolina
Thanks again for more information. I couldn't help but ask you why would you pick fusion drive if you are this sensitive with ssd wears. I couldn't help but notice your other topic stating your dilemma over fusion and ssd. I couldn't find that post again, thus I will post a reply here. So please forgive me if you find my post deviating from the main topic. Since fusion drive main idea is mostly use your ssd for speed and he'd for storage, theoretically we will fill ssd first then hdd, swap important files to ssd, ssd remain occupied hands full. As long as I remember, ssd tend to wear out, run significantly slower, tend to die before age regardless of write cycle if you fill the drive full, due to garbage collection and stuff. I have an anandtech article that can explain this a lot better than average joe me. Below is the link.

http://www.anandtech.com/show/2738/8

Therefore, since we don't know/probably don't have the control of garbage collection or how much percentage of overall space ssd we would like it to fill, the fusion drive will run whole a lot slower in a short time. I had this experience with four of my ssd in the past, two being corsair ssd using barefoot controllers(yes I was an early adopter of ssds ). I had to rma both corsair drives due to that wear issue by filling the capacity to full, with TRIM on, all 128gb drives, running as major os bootdrive. So don't expect much from TRIM either. After using/successfully destroying four ssds, I came to this idea of buying only high storage ssd, since it will be a lot harder for me to fill it. I could be wrong, I am just putting my 2 cents here since a lot of people seem to think fusion will be a cheap and better alternative to ssd option. Please feel free to make a correction to my theory, but I am going to go with 768gb once the order dates slip down .
Fhantompain is offline   0 Reply With Quote
Old Feb 9, 2013, 04:08 AM   #17
turtlez
Thread Starter
Banned
 
Join Date: Jun 2012
Quote:
Originally Posted by Fhantompain View Post
Thanks again for more information. I couldn't help but ask you why would you pick fusion drive if you are this sensitive with ssd wears. I couldn't help but notice your other topic stating your dilemma over fusion and ssd. I couldn't find that post again, thus I will post a reply here. So please forgive me if you find my post deviating from the main topic. Since fusion drive main idea is mostly use your ssd for speed and he'd for storage, theoretically we will fill ssd first then hdd, swap important files to ssd, ssd remain occupied hands full. As long as I remember, ssd tend to wear out, run significantly slower, tend to die before age regardless of write cycle if you fill the drive full, due to garbage collection and stuff. I have an anandtech article that can explain this a lot better than average joe me. Below is the link.

http://www.anandtech.com/show/2738/8

Therefore, since we don't know/probably don't have the control of garbage collection or how much percentage of overall space ssd we would like it to fill, the fusion drive will run whole a lot slower in a short time. I had this experience with four of my ssd in the past, two being corsair ssd using barefoot controllers(yes I was an early adopter of ssds ). I had to rma both corsair drives due to that wear issue by filling the capacity to full, with TRIM on, all 128gb drives, running as major os bootdrive. So don't expect much from TRIM either. After using/successfully destroying four ssds, I came to this idea of buying only high storage ssd, since it will be a lot harder for me to fill it. I could be wrong, I am just putting my 2 cents here since a lot of people seem to think fusion will be a cheap and better alternative to ssd option. Please feel free to make a correction to my theory, but I am going to go with 768gb once the order dates slip down .
I'm not concerned about SSD usage. I am concerned about more than necessary usage not on my behalf. If my OS is going to write double the amount than necessary for no good reason then it is of great concern to me because it would halve the life of the SSD. I only got paranoid when I saw 2GB of data being written after waking the computer from sleep. I was watching disk activity to work out how many writes I did in an average work day then calculate out in theory how long I should expect my SSD to last. Of course now I should be expecting 8-10 years since I fixed Apple's screw up but before that it was barely going to make 4-5 years which is a big deal for me.
turtlez is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Desktops > iMac

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Application/way to see which process Reads/writes to disk justperry OS X 10.8 Mountain Lion 5 Mar 4, 2013 09:40 PM
video converter who writes to the same folder and .. zinger123 Digital Video 6 Mar 4, 2013 01:33 AM
Safari and Chrome disk writes turtlez Mac Applications and Mac App Store 4 Feb 4, 2013 07:18 AM
Mysterious disk writes TrailerTrish PowerPC Macs 8 Aug 22, 2012 09:21 AM

Forum Jump

All times are GMT -5. The time now is 01:02 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC