GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tutorial - Increase Your Server/HDD Performance With "noatime" Dramatically! (https://gfy.com/showthread.php?t=918409)

Emil 07-28-2009 04:49 AM

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.

http://i40.tinypic.com/a9q0py.jpg

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.

http://i42.tinypic.com/2quhjf6.jpg

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

InternetIsForPorn 07-28-2009 04:56 AM

um... can anyone sum this up in few words?

what does noatime do?

Emil 07-28-2009 05:03 AM

Quote:

Originally Posted by InternetIsForPorn (Post 16114286)
um... can anyone sum this up in few words?

what does noatime do?

Last access time. If noatime is added, it wont write the last access info to the disc.

Machete_ 07-28-2009 05:07 AM

Just make sure you test with your backup software, that it dont use the noatime data.. or you will end up with a fucked backup rutine

tranza 07-28-2009 06:28 AM

Nice boost

Emil 07-28-2009 11:23 AM

Quote:

Originally Posted by KrisH (Post 16114303)
Just make sure you test with your backup software, that it dont use the noatime data.. or you will end up with a fucked backup rutine

Hmmm... Good idea.

rowan 07-28-2009 11:31 AM

I use noatime but I find it hard believing that it could result in a 300% improvement, because of OS-based write caching. If you access a specific file 500 times a second it's not going to write out 500 atime updates... it will write out update every X seconds.

notime 07-28-2009 12:50 PM

Sounds like my nick :)

L0stMind 07-28-2009 02:40 PM

Well the chart that is being pulled is referencing an SSD as opposed to your standard hard drive. Early model SSD's had big problems with write operations, so disabling noatime helped them a lot. I don't think you'd see the same level of improvement with a regular sata/sas drive.

In some situations - like serving a bajillion small files - noatime can increase your performance though.

Janh 07-28-2009 03:03 PM

ever tried nginx for serving small files likes pics or other bin files? one server (just 4gb ram, 1x quad cpu) can easy serve > 300M files per day


All times are GMT -7. The time now is 03:55 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123