From owner-freebsd-hackers@freebsd.org Sun Sep 11 17:07:16 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F501BD6148 for ; Sun, 11 Sep 2016 17:07:16 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (mailhost.m5p.com [IPv6:2001:418:3fd::f7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CE8AE61 for ; Sun, 11 Sep 2016 17:07:15 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from [10.100.0.31] (haymarket.m5p.com [10.100.0.31]) by mailhost.m5p.com (8.14.5/8.14.5) with ESMTP id u8BH795p028474 for ; Sun, 11 Sep 2016 13:07:14 -0400 (EDT) (envelope-from george+freebsd@m5p.com) Subject: Re: Laptop disk spindown To: freebsd-hackers@freebsd.org References: <50125b8f-f24d-6b78-f474-7e97017302e3@m5p.com> <57D58E82.4020605@grosbein.net> From: George Mitchell Message-ID: Date: Sun, 11 Sep 2016 13:07:09 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <57D58E82.4020605@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.73 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mailhost.m5p.com [10.100.0.247]); Sun, 11 Sep 2016 13:07:14 -0400 (EDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 17:07:16 -0000 Thank you! -- George On 09/11/16 13:04, Eugene Grosbein wrote: > 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 > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"