Subject: Re: Limiting disk I/O?
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Lars Heidieker <lars@heidieker.de>
List: netbsd-users
Date: 12/03/2007 13:46:31
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 2 Dec 2007, at 22:58, Eric Haszlakiewicz wrote:

> On Sun, Dec 02, 2007 at 06:34:40PM +0200, Jukka Marin wrote:
>> If I could limit the softdep flush to always keep some 10% of disk =20=

>> I/O
>> available, the machine would not stop completely during the flush =20
>> operation.
>>
>> while (something_to_be_flushed) {
>>   if (systat_disk_%busy >=3D 90) {
>>     sleep_before_next_flush(a_bit);
>>   }
>>   flush_some_data();
>> };
>
> except what you really need is more like:
>
> while (something_to_be_flushed) {
>   if (systat_disk_%busy >=3D 90) {
> 	temporarily_let_new_io_bypass_softdep()
>   }
>   else
>     turn_off_bypass()
>   flush_some_data();
> };
>
> eric
>


I have my doubts that this will work without breaking the semantics =20
of softdep, which promises that after a crash
only certain inconsistencies exists (eg block still marked used but =20
free...).
At least it would add a lot of complexity.
What might be an option is to limited the rate write ops can hit the =20
queue when the queue length is big,
just delaying write ops slightly when a lot of them are outstanding.
But all this means a algorithmic pre-selection of what the io-=20
scheduler is suposed to do.

Or the syncer has to kick in earlier, this will slowdown the case =20
where everything fits into the cache and
can be flushed later but will prevent big delays and I doubt it has a =20=

negative impact on overall performance,
where there aren't just short burst of io that fit into the cache =20
with enough pauses to get flushed in between.
(I think this is what the patch essentially did)

- --

Viele Gr=FC=DFe,
Lars Heidieker

lars@heidieker.de
http://paradoxon.info

- ------------------------------------

Mystische Erkl=E4rungen.
Die mystischen Erkl=E4rungen gelten f=FCr tief;
die Wahrheit ist, dass sie noch nicht einmal oberfl=E4chlich sind.
      -- Friedrich Nietzsche



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHU/qncxuYqjT7GRYRApeMAKDgLKZcEz+t1WXUfXBdu0UIJUi3uQCfbti5
UJgYllieSuCsDjQJ0gACBzQ=3D
=3DMV/0
-----END PGP SIGNATURE-----