Re: Disabling file system caching

Nuno Silva (nuno.silva@vgertech.com)
Mon, 20 Jan 2003 21:39:30 +0000


Folkert van Heusden wrote:
>>>Is it possible to disable file caching for a given partition or mount?
>>
>>No, if you do that mmap(), read(), write() etc. would be impossible.
>
>
> Hmmm, maybe there's some way to explicitly flush the read/write-cache?
> Ok, sync will do nice for the write-cache, but for the read-one?

AFAIK, you simply can't... I'm trying to do this for several months and
no luck. Linux simply caches everything it can in the read-cache. For
99% of all cases this is very good but, for some situations, this is not
desireable.

For the write cache, you can minimize memory usage playing with
/proc/sys/vm (see Documentation/filesystems/proc.txt).

Regards,
Nuno Silva

>
>
> -
> 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/
>

-
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/