HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_73
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 73 11. The “noatime” attribute Linux has a special mount option for file systems called  noatime that can be added to each line that addresses one file system in the “/etc/fstab” file. If a file system has been mounted with this option, reading accesses to the file system will no longer result in an update to the  atime information associated with the file like we have explained above. The importance of the  noatime setting is that it eliminates the need by the system to make writes to the file system for files, which are simply being read. Since writes can began somewhat expensive, this can result in measurable performance gains. Note that the write time information to a file will continue to be updated anytime the file is written to. In our example bellow, we will set the noatime option to our “/chroot” file system. Edit the fstab file (vi /etc/fstab) and add in the line that refer to “/chroot” file system the noatime option after the defaults option as show bellow: E.I:  /dev/sda7          /chroot          ext2          defaults,noatime          1  2 You must Reboot your system for the change to take effect: [root@deep /]# reboot Then test your results with the flowing command: [root@deep]# cat /proc/mounts /dev/root / ext2 rw 0 0 /proc /proc proc rw 0 0 /dev/sda1 /boot ext2 rw 0 0 /dev/sda8 /cache ext2 rw 0 0 /dev/sda7 /chroot ext2 rw,noatime 0 0 /dev/sda6 /home ext2 rw 0 0 /dev/sda11 /tmp ext2 rw 0 0 /dev/sda5 /usr ext2 rw 0 0 /dev/sda9 /var ext2 rw 0 0 none /dev/pts devpts rw 0 0 If you see something like: /dev/sda7 /chroot ext2 rw,noatime 0 0, congratulation! 12. The swap partition Putting your swap partitions near the beginning of your drive may give you some acceptable improvement. The beginning of the drive is physically located on the outer portion of the cylinder, and the read/write head can cover much more ground per revolution. We typically see partitions placed at the end of the drive work 3MB/s slower using the hdparm -t command. 13. Tuning IDE Hard Disk Performance Performance increases have been reported on massive disk I/O operations by setting the IDE drivers to use DMA, 32-bit transfers and Multiple sector mode. The kernel seems to use more conservative settings unless told otherwise. The magic command to change the setting of your drive is “hdparm”. To enable 32-bit I/O over the PCI buses, use the command: [root@deep /]# /sbin/hdparm -c 1 /dev/hda (or hdb, hdc etc).