|
Tuesday, 03 May 2005 |
Today I learned about the magic of chattr +A. While reading a brief history of the evolution of the servers that support kernel.org I came accross this bit, "the only fancy thing being done is that all filesystems are mounted noatime meaning that the system doesn't have to make writes to the filesystem for files which are simply being read, 'that cut the load average in half.'"
In half?!?! Googling for noatime turned up this article at linux.com. Turns out this feature of the filesystem can be set by file, directory, or for the entire filesystem. Every time a file is accessed the last accessed date for the file gets updated, meaning every read operation must be followed by a write operation. The amount of data being written is trivial, but with applications that access a lot of files a lot of times the overhead adds up.
I decided to dive in and disabled the last accessed feature on the spool directories of a couple SMTP gateways that each process about 15,000 messages a day. The load (as reported by uptime) dropped like a rock. The results we similar to what was reported for kernel.org, load dropped by half from around 5 to around 2.5.
Think of all the CPUs in all the computers in the world wasting cycles writing unecessary last access information. Entropy wins again.
Powered by AkoComment 2.0! and SecurityImage 3.0.4 |