Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jun 2000 19:58:54 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        sec@42.org
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: spinning down the drive
Message-ID:   <200006071958.aa73034@salmon.maths.tcd.ie>

next in thread | raw e-mail | index | archive | help

Stefan `Sec` Zehl <sec@42.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200006071958.aa73034>