Contribute
Register

[HOWTO] Improve I/O performance & prolong SSD life

Status
Not open for further replies.
Joined
Mar 11, 2010
Messages
2,122
Motherboard
Gigabyte GA-P55M-UD4
CPU
i7-860
Graphics
9800 GT
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
As most Unix-based file-systems, HFS+ also updates the 'access time' upon reading files (don't confuse this with change/modification time).

Just browsing a directory will cause these accesses (e.g for previewing the file), leading to lots of unnecessary disk writes...
And think of Time Machine...

On Linux, it's been reported to improve I/O performance by up-to-40% !

It also could prolong the life of your SSD...

Credits to: http://www.ocztechnologyforum.com/forum ... post379197



Here's how to do it on your OSX main partition...

Create a text file with the following contents:
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.lnx2mac.noatime</string>
	<key>ProgramArguments</key>
	<array>
		<string>mount</string>
		<string>-vuo</string>
		<string>noatime</string>
		<string>/</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>

Save it to your Desktop as com.lnx2mac.noatime.plist (If using TextEdit, don't forget to format it as 'Plain Text').

Edit: Attached the com.lnx2mac.noatime.plist text file... com.lnx2mac.noatime.plistJust save it to your Desktop and proceed...

In a terminal type the following commands:
$ sudo chown root:wheel ~/Desktop/com.lnx2mac.noatime.plist
$ sudo mv ~/Desktop/com.lnx2mac.noatime.plist /Library/LaunchDaemons/
$ sudo launchctl load /Library/LaunchDaemons/com.lnx2mac.noatime.plist
$ sudo mount | grep ' / '

You should see something like:
/dev/disk0s2 on / (hfs, local, journaled, noatime)

Enjoy !
Lnx2Mac
 

Attachments

  • com.lnx2mac.noatime.plist
    450 bytes · Views: 249
I think TimeMachine only looks at modification dates but I might be wrong.

Anyway, it's always a good thing to speed things up. ;)

EDIT: If I wanted to get rid of noatime again, would it be sufficient to just delete the file so it isn't loaded at boot time anymore?
 
flatfoot said:
I think TimeMachine only looks at modification dates but I might be wrong.
For seeking what to backup, that's true.
However, when it has to backup, it accesses the files, implying an atime modification.
This can have severe impact when backing up lots of small files.

flatfoot said:
EDIT: If I wanted to get rid of noatime again, would it be sufficient to just delete the file so it isn't loaded at boot time anymore?
Yes, the "clean uninstall" sequence would be:
$ sudo launchctl unload /Library/LaunchDaemons/com.lnx2mac.noatime.plist
$ sudo rm /Library/LaunchDaemons/com.lnx2mac.noatime.plist
$ sudo mount -uv /

Enjoy !
Lnx2Mac
 
Lnx2Mac said:
flatfoot said:
I think TimeMachine only looks at modification dates but I might be wrong.
For seeking what to backup, that's true.
However, when it has to backup, it accesses the files, implying an atime modification.
This can have severe impact when backing up lots of small files.

Ah, now I get what you were referring to, thx.

Thanks also for the clean uninstall procedure.
 
Status
Not open for further replies.
Back
Top