From owner-freebsd-current@FreeBSD.ORG Tue Feb 5 21:02:25 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485BF16A58E; Tue, 5 Feb 2008 21:02:25 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.bluestop.org (unknown [IPv6:2001:41c8:1:548a::2]) by mx1.freebsd.org (Postfix) with ESMTP id B88DF13C44B; Tue, 5 Feb 2008 21:02:24 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.draftnet (unknown [IPv6:2a01:348:10f:0:219:b9ff:fe54:f04a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTP id E486030392; Tue, 5 Feb 2008 21:02:22 +0000 (GMT) Message-ID: <47A8CEC9.3000308@cran.org.uk> Date: Tue, 05 Feb 2008 21:02:01 +0000 From: Bruce Cran User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 To: Vince Hoffman References: <20080205130210.GQ57756@deviant.kiev.zoral.com.ua> <47A85FA5.9050704@unsane.co.uk> <20080205134510.GR57756@deviant.kiev.zoral.com.ua> <47A88655.3080702@unsane.co.uk> In-Reply-To: <47A88655.3080702@unsane.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , current@freebsd.org, sos@freebsd.org Subject: Re: Load_Cycle_Count and ATA APM X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 21:02:25 -0000 Vince Hoffman wrote: > Kostik Belousov wrote: >> On Tue, Feb 05, 2008 at 01:07:49PM +0000, Vince Hoffman wrote: >>> Kostik Belousov wrote: >>>> I noted that when idle, my laptop HDD increases the Load_Cycle_Count >>>> (193) approx. each ten seconds, as reported by smartctl. Have recently >>>> read about the Ubuntu and APM mode for hard drives, I searched for the >>>> tool to tune APM (that has functionality similar to linux' hdparm -B). >>>> >>>> It seems that FreeBSD does not have a tool ? Am I wrong ? In case I did >>>> not make a mistake, below is the patch that allows to manage APM state >>>> of the hard drive using atacontrol. >>>> >>> /usr/ports/sysutils/ataidle exists and is usable, (I use it on my >>> laptop.) However it seems it could be a sensible thing to have in >>> atacontrol. >> I never looked into it, and I have heard that it has an architectural >> problems. BTW intent of my patch is to have the ability to turn APM off. >> Can ataidle do this ? >> > The manpage says it can with -P 0 > it seems to work for me but the author does say about apm and aam > support that: > "These features are experimental, and should only be used after verify- > ing that the drive works when sent those commands." > > ymmv I guess. > > Vince > As the author of ataidle, I hope it can be made obsolete as soon as possible :) I wrote it back in 2004 to deal with the specific problem of noisy bearings on an ancient PC HDD and, since FreeBSD didn't (and still doesn't) have any other way to change APM and AAM settings, I decided to create a port. If you're using it, I suggest upgrading to the latest version 2.3 from http://www.cran.org.uk/~brucec/software/ataidle-2.3.tar.gz - the version in ports is outdated. The reason for the disclaimer is that I'm very aware that it's a hacky way of changing settings - ideally the kernel should know about ATA power management so it can adjust timeouts etc., while ataidle bypasses it and talks directly to the drive. I did hope to be able to work on a proper solution, but I've not found the time. -- Bruce