View Single Post
Old 07-28-2009, 04:49 AM  
Emil
Confirmed User
 
Emil's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 5,657
Tutorial - Increase Your Server/HDD Performance With "noatime" Dramatically!

I just found this Tutorial in some forum. I thought it might be good for high-traffic sites like thumb-TGPs/MGPs that are accessing thousands of small files every minute.
Anyone tried this with a good result?

Quote:
Requirements:

* Linux and Unix like OS (Ubuntu, Debian, etc)
* SSH


Most people when they try to optimize their servers they always say tweak mysql, install APC, Xcache, or something similar but most people forget about optimizing the HDD. Forums often cause high I/O. You usually have to upgrade your hdd to 10k rpm+ but with noatime, you might not need to do that.

My I/O was around 1500-2000 blocks/a sec. With noatime modification I was able to reduce it to under 500. That's atleast a 300% improvement if I do my math correctly. I remember reading a blog, someone with raid 0, gained 900% in improvements when they changed to noatime.

What's noatime?
Quote:
Linux has a special mount option for file systems called noatime. If this option is set for a file system in /etc/fstab, then reading accesses will no longer cause the atime information (last access time - don't mix this up with the last modified time - if a file is changed, the modification date will still be set) that is associated with a file to be updated (in reverse this means that if noatime is not set, each read access will also result in a write operation). Therefore, using noatime can lead to significant performance gains.
Warnings
I'm a noob. However I did on my server and it worked. Also if you google noatime, you will a lot of threads on it and how it improves I/O. Use at your own risk. However I don't think there's any risk.

Step One.
pico /etc/fstab (or whatever you use "nano", "vi" etc)

Step Two.
Next add "noatime" into the file. I added noatime to 4 mounts. My /home /dir /var and /usr. For me those 4 usually cause the most I/O. Most people's fstab should look like mine below except without the "noatime" line in there. I did read somewhere that, you should not add noatime to /proc and /boot. The 4 I listed should be good.



Step Three.
Reboot your sytem or remount (forgot the commands but i think it is "mount -a -o remount" , like I said I'm a noob)

That's about it. Check out the this graph of someone's performance boost (don't mind the title of his blog, he's being sarcastic). Lower is better.



After I added noatime, like I said I got atleast a 300% performance boost from I/O My server was crashing a lot too before. I posted a thread about it here. It seems now with noatime, it does not crash. My server currently does 60gb's a day off files that are mostly under 10kb. I have one large forum with 1.8 million posts and growing and threads that have 50,000 replies. Also this is one server. Also I like to add, no php cache or memcache installed on it. I have some scripts that does not work with php caching so I removed them. However if you do have them, it should work find with them on.

Original Thread: http://www.vbulletin.com/forum/showthread.php?t=299593
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.)
(Signup with ONLY your Email and Password. You can also refer people and get even more.)
Emil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote