8 Replies Latest reply: Jan 22, 2013 9:38 AM by Matt Kimmel
Matt Kimmel Level 1 (5 points)

Hi everyone,


I have an SSD (used as the system disk) in my iMac, and after noticing that its lifespan (according to S.M.A.R.T.) has ticked down a bit, I started looking at what's writing to the system disk, using iostat, iotop, and fs_usage.


What I discovered is that, even though I have Resume turned off (by checking "Close windows when quitting an application"), Mountain Lion is still writing huge amounts of data to the *savedState folders in ~/Library/Saved Application State, for each application I have open. The only difference with Resume turned off is that it removes the *savedState folder for each app when I quit that app.


Since I use this iMac for work, I typically have quite a few applications open for long periods of time. According to iostat, this is causing over 1 gigabyte of data per hour to be written to savedState. That's 10-12GB in a typical day, not including data I actually write to the drive as I work! Needless to say, this is hammering my SSD and is probably what is decreasing its lifetime.


I've spent a couple of hours googling this problem, and though I've found lots of ways to turn off Resume both globally and per-application, none of them prevent Mountain Lion from continuing to write all this Resume data to the *savedData folders. Does anyone know how to completely turn off Resume and stop all this unnecessary disk I/O?



iMac, OS X Mountain Lion (10.8.2), 2012 iMac 27", 3.4GHz
  • leroydouglas Level 6 (17,812 points)

    Starting with 10.7 and now 10.8 If you have TimeMachine turned on (Ex HD connected or not) local snap shots are being saved to disk.


    Turn off Time Machine prevents this feature.



  • macjack Level 9 (51,639 points)

    YOu can get it stop by going to ~/Library/Saved Application State/TextEdit (by example) and delete that file…

    (note that the User Library is hidden - one way to get there is to go to your Finder "Go" menu hold the option key to choose "Library")


    You can also delete all Saved Application State files


    Or use Terminal to turn off Resume globally...

    chflags uchg ~/Library/"Saved Application State"

    Press return



    defaults write -g ApplePersistence -bool no

  • Matt Kimmel Level 1 (5 points)

    Thanks! I'm not sure this is the same thing, though. That article says "On portable Macs, local snapshots are automatically enabled when you turn on Time Machine." That was my understanding of local snapshots as well--that they only happen on portables. But this is happening on an iMac.

  • Matt Kimmel Level 1 (5 points)

    Thanks, the defaults command seems to have worked! I no longer see writes to the *savedData folders. iotop still shows that launchd is writing large amounts of data periodically, but at least the writes have slowed down.

  • macjack Level 9 (51,639 points)

    Are you running an NAS disk or a Java process?

    What are "large amounts of data... in Activity Monitor > Inspect what does it show?

  • Matt Kimmel Level 1 (5 points)

    I am running a Java-based app; maybe that's the problem? In terms of data, I'd say launchd is writing around 100K every 30 seconds or so. Activity Monitor shows that most of the files it has open are mmapped; maybe it's just paging memory out?

  • macjack Level 9 (51,639 points)

    Try quitting out of Java and see. It doesn't seem excessive though...

  • Matt Kimmel Level 1 (5 points)

    Quitting out of Java makes a small difference, nothing huge. At this point, though, I'm seeing something like 600MB/hour of writes while I'm working, where I used to see > 1GB/hour when I wasn't touching anything. So I'm much happier. :-)