From owner-freebsd-mobile Wed Jun 7 11:59:16 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 0F63737BC75 for ; Wed, 7 Jun 2000 11:59:06 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from bell.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 7 Jun 2000 19:58:55 +0100 (BST) To: sec@42.org Cc: freebsd-mobile@freebsd.org Subject: Re: spinning down the drive Date: Wed, 07 Jun 2000 19:58:54 +0100 From: Ian Dowse Message-ID: <200006071958.aa73034@salmon.maths.tcd.ie> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Stefan `Sec` Zehl writes: >On 2.2.x Systems you could increase the sync interval. Which I set to 3 >hours. I then typed 'sync' whenever the hard drive spun up after a read. >That way I got a significant longer uptime from my battery. >Unfortunately on 3.0 and greater you can't defer writes that much. In FreeBSD 3.x and newer I've used something along the lines of: echo 'set syncdelay = 600' | gdb -k -wcore /kernel /dev/mem This doesn't have quite the same effect as the old 'kern.update' sysctl, but if you then set up a script such as #!/bin/sh while :; do sleep 600 sync done and run it in the background, the overall effect is similar. The idea is that syncing of buffers is normally spread out evenly over time, with each buffer being delayed no more than 'syncdelay' seconds. With the above script, all buffers get flushed together, so no further (timeout-based) buffer flushing will occur for 'syncdelay' seconds. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message