Disabling file system caching
Hi,
Is it possible to disable file caching for a given partition or mount?
Or at least to limit it at a certain quantity of memory?
I think of a BIG compilation (several GB of files) and would tell gcc to not cache the compiled files. Thanks
-jec
Quoted 1 line · Jean-Eric Cuendet
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.
Quoted 1 line
Or at least to limit it at a certain quantity of memory?
Not yet. I'm thinking of implementing something like this for the next version of -rmap (reclaim only from the cache if the cache occupies more than a certain fraction of ram).
Quoted 2 lines
I think of a BIG compilation (several GB of files) and would tell gcc to not cache the compiled files.
But what about the .h files ? You will want to cache those.
regards,
Rik
Signature · 3 lines
Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://guru.conectiva.com/ Current spamtrap: <a href=mailto:"[email protected]">[email protected]</a>
Quoted 2 lines
Quoted 1 line
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?
Quoted 7 lines · Folkert van Heusden
Quoted 3 lines
Quoted 1 line
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
Quoted 8 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/