Bug 220060

Summary: Improved documentation explaining cachefilesd culling limitations
Product: Red Hat Enterprise Linux 5 Reporter: Jay Turner <jturner>
Component: cachefilesdAssignee: David Howells <dhowells>
Status: CLOSED ERRATA QA Contact: Steve Dickson <steved>
Severity: high Docs Contact:
Priority: high    
Version: 5.1CC: ahecox, coughlan, ddomingo, dhowells, srevivo
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0412 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 16:54:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 436997    
Attachments:
Description Flags
Documentation adjustment to describe cull limitations none

Comment 4 RHEL Program Management 2007-10-19 20:32:16 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Jay Turner 2008-02-08 07:54:15 UTC
I'm pulling this out of NeedInfo.  As currently documented, cachefilesd is
supposed to cull . . . just check the "CACHE CULLING" section of the
cachefilesd.conf man page.  So we either rip all of this out of the man pages
and any other documents containing references to culling or we make the thing cull.

Comment 9 RHEL Program Management 2008-03-11 19:46:26 UTC
This request was previously evaluated by Red Hat Product Management
for inclusion in the current Red Hat Enterprise Linux release, but
Red Hat was unable to resolve it in time.  This request will be
reviewed for a future Red Hat Enterprise Linux release.

Comment 11 Tom Coughlan 2008-03-14 13:57:20 UTC
David,

I think it would be a good idea to try to update the documentation in 5.2 to
describe the culling behavior in more detail, since it does not work the way
people assume it will. 

There is what I have in mind. The current man page says:

"The cache may need culling occasionally to make space.  This involves
discarding  objects  from  the cache  that have been used less recently
than anything else. Culling is based on the access time of data objects.
Empty directories are culled if not in use."

Re-write as follows:

"The cache may need culling occasionally to make space.  This involves
discarding  objects  from  the cache  that are no longer marked as being
in use by the network filesystem. Objects are selected from this group
based on which has the least recent access time. Empty directories are
culled if not in use.

"Note that this culling policy may result in objects remaining in cache
longer than one might expect, because all reference to the file by the
network filesystem must be released before the file is culled. In the
case of NFS, this means that the inode must be freed. This occurs after the last
file closeure, and subesquent memory pressure on the NFS client causes the inode
to be removed."

How does this look? Is there a proactive step the user can take empty the cache? 

Once we come up with something, we'll need to look for other places that need a
simmilar change (README, howto.txt). Then maybe add a release note. If this
looks okay, I can generate a patch for you if that will help you out, and a
release note for review.

Tom

Comment 13 David Howells 2008-03-25 23:14:38 UTC
Tom,

I think your alteration to the docs is a reasonable one.

I think I can probably arrange things so that cachefilesd can force the region 
of the cache backing an active NFS inode to be culled.  The locks are there to 
do that (so that a live cache can be removed).  The code would have to be 
careful, lest there is data in flight from the cache to the NFS pages, but we 
handle that already - again so that a live cache can be removed.


Comment 16 David Howells 2008-03-27 17:14:43 UTC
Created attachment 299362 [details]
Documentation adjustment to describe cull limitations

Comment 22 errata-xmlrpc 2008-05-21 16:54:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0412.html