2002-09-05 17:31:35

by Kianusch Sayah Karadji

[permalink] [raw]
Subject: tuning/turning off disc caching?

Hi!

Is there a way tuning (down) or turning off the disc caching in Linux for
certain devices?

What I do is writing data via dd or mkisofs directly to a DVD-RAM
(/dev/srX). The kernel sees the DVD-RAM as a hard-disc. It works fine.
The Problem is that during the write operation (which takes some time for
4,7GB data). The system slows down extremely and all the memory is used
for caching.

Please include me as CC, since I'm not on the list.

Regards
K. Sayah Karadji


2002-09-05 19:00:34

by Andrew Morton

[permalink] [raw]
Subject: Re: tuning/turning off disc caching?

Kianusch Sayah Karadji wrote:
>
> Hi!
>
> Is there a way tuning (down) or turning off the disc caching in Linux for
> certain devices?
>
> What I do is writing data via dd or mkisofs directly to a DVD-RAM
> (/dev/srX). The kernel sees the DVD-RAM as a hard-disc. It works fine.
> The Problem is that during the write operation (which takes some time for
> 4,7GB data). The system slows down extremely and all the memory is used
> for caching.
>

There are no very good solutions to this at present. The following should
help:

- Drastically decrease the dirty memory thresholds in /proc/sys/vm/bdflush

- Make the writing application run fsync(fd) every few megabytes.

- Run /bin/sync once per second.