Filesystem Performance

From ConShell
Jump to navigation Jump to search

Mostly random collection of tips related to Linux filesystem performance.

ext3

Check frequency defaults to 180 days & can cause a significant delay in booting... this is unacceptable on a production server. Consider a staggered timing when using multiple partitions.

tune2fs -i 0 /dev/hdxx
tune2fs -i 0 -c 0 /dev/hdxx

So tune2fs -i 0 -c 0 /dev/sdi1


Mount options (fstab)

In general, noatime is a nice easy way to gain performance. ext2 beats ext3 hands down where non-critical data is involved (and you're backing it up anyway right?).

Change last two colums to 0 0 in fstab for all non-critical data mounts, which were 1 1

nfs

See nfs(4)

Client side (mount options)

  • Specify nfs4 as the fstype (*BSD only)
  • For blocksize use rsize=8192,wsize=8192 ... the defaults of 1024 are not optimal.
    • Using rsize=32768,wsize=32768 might even be better
  • For caching, set actimeo=60 or even higher, to force longer cache times on the client (perhaps at the cost of potential data integrity issues?)
  • Use hard,intr option if you don't like having to reboot your box after NFS hangs and other unexpected issues
    • These options should help avoid processes falling into state D Uninterruptible sleep (usually IO) which usually forces a reboot
  • Use tcp to mount the NFS filesystem using the TCP protocol.
    • This is usually the default on newer systems.
    • Using NFS over UDP on high-speed links such as Gigabit can cause silent data corruption, but see the man page if it's a must.
  • use the noatime mount option
  • When possible (but with caution) use async instead of the default sync

Server side

These are good values for /etc/sysconfig/nfs (on SLES, RHEL, Fedora & CentOS)

  • USE_KERNEL_NFSD_NUMBER="8"
  • NFS4_SUPPORT="yes"


iSCSI

See http://www.nexenta.com/corp/index.php?option=com_content&task=view&id=124&Itemid=86

Related