Monday, November 06, 2006

Debian Hard Disk Spindown

This article Debian hdd spindown - Kurobox Central has an interesting note on how to spin down the hard drive in Debian. When will Linux be as easy to use as Windows?

Install hdparam: apt-get install hdparm

Hard drive info: hdparm -i /dev/hda

Hard drive performance: hdparm -tT /dev/hda

Here's my 7 years old Toshiba Satellite2755 laptop Debian Server 6GB hard drive performance:

Timing cached reads: 62 MB in 2.01 seconds = 30.86 MB/sec
Timing buffered disk reads: 40 MB in 3.07 seconds = 13.01 MB/sec

Set spin down to 35 seconds: hdparm -S7 /dev/hda

To turn on spin down at 35 seconds by default, edit /etc/hdparm.conf:

/dev/hda {
mult_sect_io = 16
write_cache = off
dma = on
spindown_time = 120
}

Run to add hdparm setting to run control 2 (with shutdown running at reboot, shutdown, and single-user mode):

update-rc.d -f hdparm remove
update-rc.d hdparm start 19 2 . stop 19 0 1 6 .

Add to /etc/init.d/sysklogd so SYSKLOGD doesn't log MARK to /var/log/messages every 20 minutes and force the hard drive to turn on

SYSLOGD="-m 0"

2 comments:

Anonymous said...

I think it's better to leave the last command in /etd/default/syslogd

SYSLOGD="-m 0"

Anonymous said...

You won't probably need the timestamp, so it's safe to disable it.