System information
164 System Analysis and Tuning Guide
several parallel readers from a SAN and for databases (especially when using “TCQ”
disks). The DEADLINE scheduler has the following tunable parameters:
/sys/block/<device>/queue/iosched/writes_starved
Controls how many reads can be sent to disk before it is possible to send writes.
A value of 3 means, that three read operations are carried out for one write oper-
ation.
/sys/block/<device>/queue/iosched/read_expire
Sets the deadline (current time plus the read_expire value) for read operations in
milliseconds. The default is 500.
/sys/block/<device>/queue/iosched/write_expire
/sys/block/<device>/queue/iosched/read_expire Sets the
deadline (current time plus the read_expire value) for read operations in millisec-
onds. The default is 500.
13.3 I/O Barrier Tuning
Most file systems (XFS, ext3, ext4, reiserfs) send write barriers to disk after fsync or
during transaction commits. Write barriers enforce proper ordering of writes, making
volatile disk write caches safe to use (at some performance penalty). If your disks are
battery-backed in one way or another, disabling barriers may safely improve perfor-
mance.
Sending write barriers can be disabled using the barrier=0 mount option (for ext3,
ext4, and reiserfs), or using the nobarrier mount option (for XFS).
WARNING
Disabling barriers when disks cannot guarantee caches are properly written
in case of power failure can lead to severe file system corruption and data
loss.