Laptop disk spindown

Eugene Grosbein eugen at grosbein.net
Sun Sep 11 17:04:22 UTC 2016


11.09.2016 23:50, George Mitchell пишет:
> Smartctl reports that my laptop disk has started and stopped
> 101,798 times in 2,027 hours of operation, or roughly once a
> minute.  I imagine that saves wear and tear on the disk, but
> it also makes the laptop seem remarkably sluggish for an A8
> based system.  Isn't there some sysctl that will lengthen the
> idle time before stopping the disk?  I don't see one in the
> ada man page.                                     -- George

Put the following to /usr/local/etc/rc.d/tune-spindown.
Perhaps, we could have more clever and generalized version in base...

#!/bin/sh

# PROVIDE: tune-spindown
# REQUIRE: FILESYSTEMS
# BEFORE: DAEMON
# KEYWORD: nojail

case "$1" in
*start)
         camcontrol standby ada0 -t 300
         # dd if=/dev/ada0 of=/dev/null bs=512 count=1 >/dev/null 2>&1
         ;;
stop)
         camcontrol standby ada0 -t 0
         ;;
esac



More information about the freebsd-hackers mailing list