Dedicated server disc I/O performance tuning
Follow the I/O path from the OS, down to the volume level, down to the individual disc, for a world of adventure...
- Optimise the web application!
- Reduce the amount of logging done
- Use indexes to access data blocks rather than bulk scans (i.e fewer read requests)
- Cluster hot data blocks together (i.e fewer disc head seeks)
- Add RAM:
- Avoids disc reads by caching more web pages;
- Increases the percentage used for dirty buffers so it helps conglomerate writes as well;
- Reduces the amount of virtual memory swapping performed.
Play with the OS I/O scheduler
- Use a battery backed write cache for:
- Applications that perform an intensive number of writes to a single location. This will reduce the number of writes that physically hit the disc.
- Transaction processing on an ACID database. This will hide the write latency.
- Split the work load over different physical volumes. For example, have separate volumes for small database, log files, user data, etc.
- Or put the FS journal on another disc
- Try increasing the number of spindles:
RAID 0 will have the best read/write performance (BUT NO DATA SAFETY);
- RAID 10 is the next best;
- RAID 1 characteristics:
- Write performance is slightly less than a single disc;
- Linear read performance only good with good OS readahead;
- Read performance otherwise can scale as requests split over drives;
- RAID 5 characteristics:
- Decent read performance;
- Write performance is only good when writing entire strides (i.e. bulk data writes);
- Database performance will suck;
- RAID 5 when degraded will totally suck
- RAID 6 great when reliability is everything.
- Ensure that you have sufficient bus bandwidth to the discs:
- PCI-E or PCI-X
- Point to Point (SAS, SATA) will be better than a shared bus (SCSI LVD, IDE)
This whitepaper contains slightly strange information about this.
- Two IDE devices on the same cable will suck
- Increase the individual disc speed
- Higher the RPM the better
If data safety does not matter:
- Turn on the disc write-back caches