Is there a way to turn file caching off ?
A message that is not in the archive (sent off-list or not yet received): [email protected]
It's insignificant. If we assume the caching isn't helping, that means each
'non-recent' page access results in an IO operation. The cost of an IO operation (a millisecond or more) is so much in comparison to the cost of a primary cache miss (less than a microsecond) that avoiding a ferw primary cache misses per IO isn't likely to make any measurable difference.
DS
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Laurent Chavet
Sent: Wednesday, April 18, 2001 1:21 AM
To: David Schwartz
Cc: [email protected]
Subject: Re: Is there a way to turn file caching off ?
Since the speed already drops before even writing to disk, I was thinking that for "large memory" the management of the tree that contain which pages are cached becomes high (since the tree is large and probably doesn't fit in primary cache).
So if you can limit the size of what you cache, you limit the size of the tree -> you limit the time spent in the tree.
(by the way I'm using both 2.4.2 that come with RedHat 7.1 and 2.4.4 pre 3 and see the same thing).
Laurent
Quoted 5 lines · David Schwartz
Is there a way to turn file caching off, or at least limit its size ?
Thanks,
Laurent Chavet
What benefit do you think you would get by limiting its size? All
that
would do is ensure you hit the cache thrashing point sooner.
DS
--
Laurent Chavet
Quoted 3 lines · David Schwartz
[..] If we assume the caching isn't helping [..]
If you know kernel data cache doesn't help your workload at all then you want use O_DIRECT at least to save the CPU. You can run 2.4.4pre3aa3 or apply the rawio-3 patch and then the o_direct-2 patch on top of 2.4.4pre3 if you want O_DIRECT support (it also fixes the O_SYNC wait for locked inode bug noticed by Marcelo).
You will find detailed explanation on the O_DIRECT feature and where to find the patches if you grep for subject O_DIRECT in the l-k list in the messages of this month.
Andrea