* Re: Disabling file system caching
@ 2003-01-20 12:52 Martin Knoblauch
0 siblings, 0 replies; 7+ messages in thread
From: Martin Knoblauch @ 2003-01-20 12:52 UTC (permalink / raw)
To: riel; +Cc: linux-kernel
> Re: Disabling file system caching
>
> From: Rik van Riel (riel@conectiva.com.br)
> Date: Sun Jan 19 2003 - 20:05:00 EST
>
> On Sun, 19 Jan 2003, Jean-Eric Cuendet 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.
>
> > 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).
>
Yes please !!!
Yes please !!!
Yes please !!!
:-)
Having a maximum [and maybe minimum] knob for controlling the cache
would be an extremely useful feature in some situations.
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Disabling file system caching
2003-01-20 19:47 ` Folkert van Heusden
@ 2003-01-20 21:39 ` Nuno Silva
0 siblings, 0 replies; 7+ messages in thread
From: Nuno Silva @ 2003-01-20 21:39 UTC (permalink / raw)
To: Folkert van Heusden
Cc: 'Rik van Riel', 'Jean-Eric Cuendet', linux-kernel
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/
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Disabling file system caching
2003-01-20 1:05 ` Rik van Riel
@ 2003-01-20 19:47 ` Folkert van Heusden
2003-01-20 21:39 ` Nuno Silva
0 siblings, 1 reply; 7+ messages in thread
From: Folkert van Heusden @ 2003-01-20 19:47 UTC (permalink / raw)
To: 'Rik van Riel', 'Jean-Eric Cuendet'; +Cc: linux-kernel
> > 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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Disabling file system caching
2003-01-20 7:47 Balbir
@ 2003-01-20 14:21 ` Jan Hudec
0 siblings, 0 replies; 7+ messages in thread
From: Jan Hudec @ 2003-01-20 14:21 UTC (permalink / raw)
To: Balbir; +Cc: linux-kernel
On Mon, Jan 20, 2003 at 01:17:42PM +0530, Balbir wrote:
> Not sure if posting to the newsgroup linux.kernel sends
> it to the mailing list too.
>
> "Balbir Singh" <balbir_soni@yahoo.com> wrote in message
> news:b0g6q2$lfq$1@tilde.itg.ti.com...
> > "Rik van Riel" <riel@conectiva.com.br> wrote in message
> > news:20030120011009$2d98@gated-at.bofh.it...
> > > On Sun, 19 Jan 2003, Jean-Eric Cuendet 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.
> > >
> > > > 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).
> >
>
> I think that this feature is very important. In an embedded system
> using an NFS root filesystem, we found that the file cache
> would take a lot of memory and all insmods would fail. This is
> especially true when the system boots up and looks for /lib/modules.
>
> I think it should be possible to modify the slab allocator to
> implement a memory pool. We could add a flag which would prevent
> the slab from growing beyond its initial size.
>
> This approach would work only if the cache is allocated by
> using the slab allocator.
No, it's not! And the slab alocator should mercilessly rip the cache
when it needs some pages. In the NFS root case, I would guess it's
a problem of NFS implementation allocating too much kernel memory, since
both cache and user-land pages are riped in favor of kernel allocations.
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Disabling file system caching
@ 2003-01-20 7:47 Balbir
2003-01-20 14:21 ` Jan Hudec
0 siblings, 1 reply; 7+ messages in thread
From: Balbir @ 2003-01-20 7:47 UTC (permalink / raw)
To: linux-kernel
Not sure if posting to the newsgroup linux.kernel sends
it to the mailing list too.
"Balbir Singh" <balbir_soni@yahoo.com> wrote in message
news:b0g6q2$lfq$1@tilde.itg.ti.com...
> "Rik van Riel" <riel@conectiva.com.br> wrote in message
> news:20030120011009$2d98@gated-at.bofh.it...
> > On Sun, 19 Jan 2003, Jean-Eric Cuendet 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.
> >
> > > 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).
>
I think that this feature is very important. In an embedded system
using an NFS root filesystem, we found that the file cache
would take a lot of memory and all insmods would fail. This is
especially true when the system boots up and looks for /lib/modules.
I think it should be possible to modify the slab allocator to
implement a memory pool. We could add a flag which would prevent
the slab from growing beyond its initial size.
This approach would work only if the cache is allocated by
using the slab allocator.
Balbir
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Disabling file system caching
2003-01-19 17:05 Jean-Eric Cuendet
@ 2003-01-20 1:05 ` Rik van Riel
2003-01-20 19:47 ` Folkert van Heusden
0 siblings, 1 reply; 7+ messages in thread
From: Rik van Riel @ 2003-01-20 1:05 UTC (permalink / raw)
To: Jean-Eric Cuendet; +Cc: linux-kernel
On Sun, 19 Jan 2003, Jean-Eric Cuendet 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.
> 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).
> 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
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://guru.conectiva.com/
Current spamtrap: <a href=mailto:"october@surriel.com">october@surriel.com</a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Disabling file system caching
@ 2003-01-19 17:05 Jean-Eric Cuendet
2003-01-20 1:05 ` Rik van Riel
0 siblings, 1 reply; 7+ messages in thread
From: Jean-Eric Cuendet @ 2003-01-19 17:05 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-20 21:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 12:52 Disabling file system caching Martin Knoblauch
-- strict thread matches above, loose matches on Subject: below --
2003-01-20 7:47 Balbir
2003-01-20 14:21 ` Jan Hudec
2003-01-19 17:05 Jean-Eric Cuendet
2003-01-20 1:05 ` Rik van Riel
2003-01-20 19:47 ` Folkert van Heusden
2003-01-20 21:39 ` Nuno Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).