linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Linux filesystem caching discussion list <linux-cachefs@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, "Lever,
	Charles" <Charles.Lever@netapp.com>,
	SteveD@redhat.com
Subject: Re: [Linux-cachefs] Re: NFS Patch for FSCache
Date: Mon, 16 May 2005 13:47:53 +0100	[thread overview]
Message-ID: <12357.1116247673@redhat.com> (raw)
In-Reply-To: <20050514020838.GQ999@kalmia.hozed.org>

Troy Benjegerdes <hozer@hozed.org> wrote:

> I would like to suggest that cache culling be driven by a userspace
> daeomon, with LRU usage being used as a fallback approach if the
> userspace app doesn't respond fast enough. Or at the least provide a way
> to load modules to provide different culling algorithms.

I suppose that shouldn't be too hard; the problem that I can see is deciding
how much space to reserve in an inode slot for culling decision data. For
instance, with the LRU approach, I just keep a 32-bit atime per inode which I
update any time I match that inode.

However, I can see ways in which the culling heuristic might be weighted:

 (*) Favour culling of large files over small ones or small over large.

 (*) Mark files for preferential retention, perhaps by source.

> If the server is responding and delivering files faster than we can
> write them to local disk and cull space, should we really be caching at
> all? Is it even appropriate for the kernel to make that decision?

That's a very tricky question, and it's most likely when the network + server
retrieval speeds are better than the disk retrieval speeds, in which case you
shouldn't be using a cache, except for the cases of where you want to be able
to live without the server for some reason or other; and there the cache is
being used to enhance reliability, not speed.

However, we do need to control turnover on the cache. If the rate is greater
than we can sustain, there needs to be a way to suspend caching on certain
files, but what the heuristic for that should be, I'm not sure.

CacheFS on one very large file nets me something like a 700% performance
increase[*] on an old dual-PPro machine with a warm cache on a 7200rpm HDD vs a
100Mbps network link to the server. The file is larger than the machine's
memory. I believe Steve Dickson doesn't really see any advantage of using the
cache with a 1Gbps network link to his server.

David

  parent reply	other threads:[~2005-05-16 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 22:43 [Linux-cachefs] Re: NFS Patch for FSCache Lever, Charles
2005-05-13 11:17 ` David Howells
2005-05-14  2:08   ` Troy Benjegerdes
2005-05-16 12:47   ` David Howells [this message]
2005-05-17 21:42     ` David Masover
2005-05-18 10:28     ` [Linux-cachefs] " David Howells
2005-05-19  2:18       ` Troy Benjegerdes
2005-05-19  6:48         ` David Masover
  -- strict thread matches above, loose matches on Subject: below --
2005-05-10 18:43 Steve Dickson
2005-05-09 10:31 ` Steve Dickson
2005-05-09 21:19   ` Andrew Morton
2005-05-10 19:12     ` [Linux-cachefs] " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12357.1116247673@redhat.com \
    --to=dhowells@redhat.com \
    --cc=Charles.Lever@netapp.com \
    --cc=SteveD@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).