Can't activate noatime on new iMac

Discussion in 'macOS' started by ArtemL, Jan 3, 2011.

  1. ArtemL macrumors newbie

    Joined:
    Jan 3, 2011
    #1
    Hello!
    I just gained my new iMac iMac, 27-inch, 2.93GHz Core i7, 8Gb, 1Tb+256GB SSD, ATI 5750 with this type of SSD:APPLE SSD TS256B. And now I want to deactivate atime (so to activate noatime) and I can't do it. Well, I have done everything like written here http://forums.macrumors.com/showthread.php?t=863807 but after typing mount nothing have happened I didn't see noatime. Who knows the solution of these problem? May be in last iMacs we can not activate noatime cause OS X doesn't need it?
     
  2. psedog macrumors newbie

    Joined:
    Jul 12, 2009
    Location:
    横須賀 Yokosuka, Japan
    #2
    Mine wasn't working as well. I noticed that my string didn't match my file name.

    I had
    <string>noatime</string>

    but my file was com.noatime.plist

    after I changed my string to
    <string>com.noatime</string>

    and set the permission to root:wheel
    then rebooted and now I have noatime on my /dev/disk0s2

    Hope this helps you.
     
  3. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
    #3
    Thanks for your reply. I'll try it in a few moments. Did you managed to activate noatime on iMac? Or you are talking about laptop?
     
  4. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
  5. psedog macrumors newbie

    Joined:
    Jul 12, 2009
    Location:
    横須賀 Yokosuka, Japan
    #5
    My lappy. One thing thing that I noticed in that other thread is they talk about having two files. I have a noatime.plist and a com.noatime.plist. Kind of just in case. I don't know if having both are required. Probably not, but you never know. I also restarted from terminal after I was done. shutdown -r now
    That probably didn't do anything, but just trying to give you my variables.
     
  6. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
    #6
    I've already tried this variant as well and it doesn't work but thanks again. Finally, I must come to conclusion that this tweak doesn't work on iMac. I managed to do it easily on my MacBook and people who try to help also have this tweak enabled on laptops. And Apple put SSD in my computer themselves...
     
  7. psedog, Jan 4, 2011
    Last edited: Jan 4, 2011

    psedog macrumors newbie

    Joined:
    Jul 12, 2009
    Location:
    横須賀 Yokosuka, Japan
    #7
    Sorry I couldn't help. How can we check to see if it is actually working? I just opened up a file and then checked the more info and the OS says I opened it today. If we can figure that out we might be able to find out if your system has it enabled but isn't reporting it through mounting options.

    Edit: I just rebooted the computer and the file I checked still shows todays date for last opened. Looks like even with noatime it is still recording file access times.
     
  8. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
    #8
    That was a great idea to see the work of the file in "more info"! It showed that the file was used after last reboot as it is written in code of this file. It means the actually it should be working but terminal doesn't show that. Thank you.
    However, yesterday I called to to Apple support in my country and they told me that I can't activate noatime on my iMac, but actually I am not quite sure that they understood me in a proper way, cause it was woman who answered on my call)
     
  9. xyzzy-xyzzy macrumors member

    Joined:
    Sep 19, 2010
    #9
    I guess I chime in here with my experiences with setting noatime for my boot ssd:

    1. Make sure the owner:group is root:wheel

    2. The command should be,

    mount -vuwo noatime /

    3. Make sure RunAtLoad key in the plist is a Boolean and not a string. I seem to recall I had a problem getting a Boolean in there. It kept changing to a string (true).

    As for verifying it is set, just use the 'mount' command in terminal. The disk that was set for noatime will show the attributes something like "(hfs, local, journaled, noatime)".
     
  10. psedog macrumors newbie

    Joined:
    Jul 12, 2009
    Location:
    横須賀 Yokosuka, Japan
    #10
    Artem, I think you've misunderstood me. I don't think it's working on mine. I thought the whole point of noatime was to kill it recording every time you access a file.
     
  11. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
    #11
    The owner is root. Can you write the part of your code with runatload, cause mine is <key>RunAtLoad</key>

    And I also misunderstood this:
    2. The command should be,

    mount -vuwo noatime /
     
  12. ArtemL thread starter macrumors newbie

    Joined:
    Jan 3, 2011
    #12
    And do you have noatime in your terminal after you write "mount"?
     
  13. psedog macrumors newbie

    Joined:
    Jul 12, 2009
    Location:
    横須賀 Yokosuka, Japan
    #13
    Yes I do. That's why I'm trying to figure out a way to test it.
     
  14. xyzzy-xyzzy, Jan 6, 2011
    Last edited: Jan 6, 2011

    xyzzy-xyzzy macrumors member

    Joined:
    Sep 19, 2010
    #14
    I'm not exactly sure what you're asking. Here's the xml form of my plist:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>Label</key>
    	<string>com.enable.boot.noatime</string>
    	<key>ProgramArguments</key>
    	<array>
    		<string>mount</string>
    		<string>-vuwo</string>
    		<string>noatime</string>
    		<string>/</string>
    	</array>
    	<key>RunAtLoad</key>
    	<true/>
    </dict>
    </plist>
    
    So the command the launch daemon executes is the "mount -vuwo noatime /". The RunAtLoad key is typed boolean (in the plist editor) so it's value is "true". All I was saying was that initially I was having trouble with this field because the plist editor kept treating it as a sting instead of a boolean.

    You say yours has the owner as root. Do I assume then that the group is wheel? You didn't specify that in your reply.

    As for specifically testing whether noatime is "doing it's thing" or not (mentioned by psedog in the previous post) since noatime is supposed to inhibit the file access time from being updated then I think -- and this is thinking out loud off the top of my head -- that you could write a simple C program to do a stat() on a file, look at the returned st_atimespec value of the file, access the file (say open it and close it), and then look at the stat()'s st_atimespec again, then I would it expect it to be the same. I would expect it to be different if the file is not on a volume with the noatime attribute. I'm assuming here that the st_atimespec, as documented in sys/stat.h as the "time of last access" is the field in question with respect to noatime. But I'm not 100% sure of that.

    And, psedog, if you don't know what I'm talking about then let us know if you find some non-programmable way of testing for noatime. Personally I'm just accepting it on faith that if mount says the attribute is set for a volume then it's set.
     
  15. rtrt, Jan 6, 2011
    Last edited: Aug 13, 2011

Share This Page