/boot/grub/menu.lst
#[...]
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,1)
kernel /vmlinuz-2.6.22-14-generic root=/dev/mapper/vg-starlight ro rootflags=data=writeback,nobh,commit=100 splash usbcore.autosuspend=1
initrd /initrd.img-2.6.22-14-generic
quiet
/etc/fstab
#[...]
/dev/mapper/swap none swap sw 0 0
/dev/sda2 /boot ext3 noatime,nobh,data=writeback,commit=100 1 2
/dev/mapper/vg-starlight / ext3 noatime,nobh,data=writeback,commit=100 0 1
/dev/mapper/home /home ext3 noatime,nobh,data=writeback,commit=100 0 2
/dev/mapper/tmp /tmp ext3 noatime,nobh,data=writeback,commit=100 0 0
In this way you can tune the I/O performance of ext3 partitions by
- disabling file access time logging (noatime)
- increasing the commit interval which is responsible for writing data on the HDD (commit) to 100 seconds
- not attaching buffer_heads to file pagecache (nobh)
- not preserving data ordering; so data may be written into the main file system after its metadata has been committed to the journal which is the highest throughput option (data=writeback)
Due to LVM and encryption (accomplished by cryptsetup) I operate in my /etc/fstab with mapped devices. But these mapped devices can be normal block devices (like /dev/hda2, /dev/sda1 etc.) as well. Finally you should not forget to add the corresponding parameters during the system boot-up by passing them to the kernel in /boot/grub/menu.lst.
Note:
You also may be interested in how to tune ext4 for performance or how to use a swap file instead of a swap partition.
Very well written, yo! This the 3rd Patterns and Paradigms article I have read today, and I am pleased to see such complete and concise explanations...without all the bs. Pleased to see; OHIO, US.
ReplyDelete