Databases Reference
In-Depth Information
You can also tune the filesystem's read-ahead behavior, because it might be redundant.
For example, InnoDB does its own read-ahead prediction. Disabling or limiting read-
ahead is especially beneficial on Solaris's UFS. Using O_DIRECT automatically disables
read-ahead.
Some filesystems don't support features you might need. For example, support for
direct I/O might be important if you're using the O_DIRECT flush method for InnoDB.
Also, some filesystems handle a large number of underlying drives better than others;
XFS is often much better at this than ext3, for instance. Finally, if you plan to use LVM
snapshots for initializing replicas or taking backups, you should verify that your chosen
filesystem and LVM version work well together.
Table 9-4 summarizes the characteristics of some common filesystems.
Table 9-4. Common filesystem characteristics
Filesystem
Operating system
Journaling
Large directories
ext2
GNU/Linux
No
No
ext3
GNU/Linux
Optional
Optional/partial
ext4
GNU/Linux
Yes
Yes
HFS Plus
Mac OS
Optional
Yes
JFS
GNU/Linux
Yes
No
NTFS
Windows
Yes
Yes
ReiserFS
GNU/Linux
Yes
Yes
UFS (Solaris)
Solaris
Yes
Tunable
UFS (FreeBSD)
FreeBSD
No
Optional/partial
UFS2
FreeBSD
No
Optional/partial
XFS
GNU/Linux
Yes
Yes
ZFS
Solaris, FreeBSD
Yes
Yes
We usually recommend that our customers use the XFS filesystem. The ext3 filesystem
just has too many serious limitations, such as its single mutex per inode, and bad be-
havior such as flushing all dirty blocks in the whole filesystem on fsync() instead of
just one file's dirty blocks. The ext4 filesystem is too new for many people to feel com-
fortable running it in production, although it seems to be gaining popularity gradually.
Choosing a Disk Queue Scheduler
On GNU/Linux, the queue scheduler determines the order in which requests to a block
device are actually sent to the underlying device. The default is Completely Fair Queue-
ing, or cfq . It's okay for casual use on laptops and desktops, where it helps prevent
I/O starvation, but it's terrible for servers. It causes very poor response times under the
 
Search WWH ::




Custom Search