Difference between revisions of "Performance tuning the LinkStation hard drive"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Permanent Change)
 
(One intermediate revision by one user not shown)
Line 6: Line 6:
 
</small></font>''<br>
 
</small></font>''<br>
  
 +
OpenLink uses hdparm to set the drive's spindown time during boot, but does not change any of the other drive parameters. Since the default parameters are conservative there is room for improvement. However, the "best" parameters depend on the make and model of the drive. Typically common tuning parameters for hdparm are passed around without actually knowing if they work or what they are good for. This article uses a such a particular set, which might or might not improve the LS' performance.
  
1. Open up the hdparm startup script and modify the performance settings:
+
== Getting a Performance Indication ==
  
vi /etc/rc.d/init.d/hdparm
+
Ensure the Linkstation is idle. Then run
  
2. Add the following settings:
+
/sbin/hdparm -tT /dev/hda
  
hdparm -q<ref>tells hdparm to change the settings quietly.</ref> -m16<ref>m16 sets the number of sectors to use for IDE block mode (multicount).</ref> -c1<ref>c1 sets I/O support to 32-bit (from 16-bit).</ref> -u1<ref>u1 enables unmasking of interrupts.</ref> -S250<ref>S250 sets a spindown time of 5 hours.</ref> /dev/hda
+
multiple times before changing a parameter. Then change a parameter and run the command again multiple times. If you are lucky you see better (larger) values, and your data is not garbled.  
  
3. Test your old performance settings:
+
== Permanent Change ==
  
hdparm -tT /dev/hda
+
1. Open up the hdparm startup script and modify the performance settings:
  
4. Reboot your LinkStation and retest your performance settings.
+
vi /etc/rc.d/init.d/hdparm
  
5. These particular settings may not always improve performance - try different settings.
+
2. Provide the following settings:
  
 +
/sbin/hdparm -q<ref>tells hdparm to change the settings quietly.</ref> -m16<ref>m16 sets the number of sectors to use for IDE block mode (multicount).</ref> -c1<ref>c1 sets I/O support to 32-bit (from 16-bit).</ref> -d1<ref>d1 turns DMA usage on.</ref> -u1<ref>u1 enables unmasking of interrupts.</ref> -S250<ref>S250 sets a spindown time of 5 hours. Spindown might never happen as long as daemons like syslogd need to write to the disk in regular intervals.</ref> /dev/hda
 +
 +
3. These particular settings may not always improve performance - try different settings.
 +
 +
== Footnotes ==
 
<references/>
 
<references/>
  
 
[[Category:General]]
 
[[Category:General]]
 
[[Category:Howto]]
 
[[Category:Howto]]
 
+
[[Category:OpenLink]]
 
[[Category:Hardware]]
 
[[Category:Hardware]]

Latest revision as of 12:47, 4 March 2007

This article Based on work by frontalot and nix. Originally by frontalot. at Linkstationwiki.org

OpenLink uses hdparm to set the drive's spindown time during boot, but does not change any of the other drive parameters. Since the default parameters are conservative there is room for improvement. However, the "best" parameters depend on the make and model of the drive. Typically common tuning parameters for hdparm are passed around without actually knowing if they work or what they are good for. This article uses a such a particular set, which might or might not improve the LS' performance.

Getting a Performance Indication

Ensure the Linkstation is idle. Then run

/sbin/hdparm -tT /dev/hda

multiple times before changing a parameter. Then change a parameter and run the command again multiple times. If you are lucky you see better (larger) values, and your data is not garbled.

Permanent Change

1. Open up the hdparm startup script and modify the performance settings:

vi /etc/rc.d/init.d/hdparm

2. Provide the following settings:

/sbin/hdparm -q[1] -m16[2] -c1[3] -d1[4] -u1[5] -S250[6] /dev/hda

3. These particular settings may not always improve performance - try different settings.

Footnotes

  1. tells hdparm to change the settings quietly.
  2. m16 sets the number of sectors to use for IDE block mode (multicount).
  3. c1 sets I/O support to 32-bit (from 16-bit).
  4. d1 turns DMA usage on.
  5. u1 enables unmasking of interrupts.
  6. S250 sets a spindown time of 5 hours. Spindown might never happen as long as daemons like syslogd need to write to the disk in regular intervals.