Disk Performance

From ConShell
Jump to navigation Jump to search

Some tips for increasing disk (I/O) performance under various operating systems.

Linux

SSD

Newer technology, SSD are exponentially faster than SATA or SAS

See http://en.wikipedia.org/wiki/IOPS#Performance_characteristics

RAID

If you must use SATA (or better SAS) you can use multiple disks with mirror-striping RAID10 (1+0) for the best performance + fault tolerance.

Read more @ http://linux-raid.osdl.org/index.php/Performance

Scheduler

Use an appropriate scheduler. See Switching IO Schedulers on runtime and I/O scheduling

blockdev

Use blockdev to increase the # of read-ahead pages

blockdev --setra 16384 /dev/sda

Get a report of same

sudo blockdev --report  /dev/sda
RO    RA   SSZ   BSZ   StartSec     Size    Device
rw   256   512  4096          0  488259584  /dev/sda

sdparm/hdparm

Use sdparm to set/get values from SATA drives...

sdparm --get=WCE /dev/sda
sdparm --set=WCE /dev/sda

Use hdparm to set various performance-enhancing values. Note that SATA drives cannot benefit from these see http://linux-ata.org/faq.html Read http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html to learn all about hdparm and how it's default settings are usually non-optimal

Turn on dma

hdparm -d1 /dev/sda

Set IO_support to use 32-bit (usual default is 16-bit)

hdparm -c3 /dev/sda

Set multicount to 16

hdparm -m16 /dev/sda

Set Write cache enabled (this is equivalent to sdparm --set=WCE above which sometimes fails on older drives)

hdparm -W 1 /dev/sda

Finally, see gobs of information about a drive including the values for settings above.

hdparm -I /dev/sda

Other

FreeBSD


Related