Re: tuning/turning off disc caching?

From: Andrew Morton (akpm@zip.com.au)
Date: Thu Sep 05 2002 - 14:02:59 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:26 EST