All of lore.kernel.org
 help / color / mirror / Atom feed
From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Is it possible to use a local drive to cache an NFS share
Date: Mon, 3 Sep 2012 17:26:02 +0200	[thread overview]
Message-ID: <20120903152601.GA2309@grml> (raw)
In-Reply-To: <5044A9FD.5010401@gmail.com>

Hi!

On 23:00 Mon 03 Sep     , Graeme Russ wrote:
> Hi All,
> 
> I am mounting /home over NFS which is great, but it really kills compile
> times. So I have a local HDD which I have copied all my source code over
> from which I do my coding and compiling.
> 
> What I would love to do is use the local drive to cache /home. Specifically
> one user directory under /home - only one machine will ever be modifying
> the contents of this directory.

NFS is not really made for caching. Its design idea was mainly that the server
should be stateless. There is basically no way to get a notification whether a
file was changed remotely without either polling or running an external
daemon. There are 2 network file systems which support client caching: codafs
and andrewfs. However, they are rather complex to setup and I guess nobody is
really using them.

If nobody else changes the files you should be fine. But I still would not
recommend doing this, because this is basically a time bomb which might go off
after you forget what you are doing now. Also there should not be that much
performance difference for your worklead unless either your network or your
nas is very slow.

After a quick search I have found this project (not sure what it does exactly):
http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FileSystems#mcachefs

> Or should I just use rsync?

How do you want to sync it back?

> On a side note - I moved my source code from a 1TB HDD on a 3Gb/s SATA port
> to an Intel 510 series 250GB SSD on a 6Gb/s SATA port. But I didn't see an
> appreciable increase in compile speed.

This does not suprise me. Compiling mostly stresses the cpu(s).

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com

  reply	other threads:[~2012-09-03 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 13:00 Is it possible to use a local drive to cache an NFS share Graeme Russ
2012-09-03 15:26 ` michi1 at michaelblizek.twilightparadox.com [this message]
2012-09-03 15:27 ` Mulyadi Santosa
2012-09-04  5:14   ` michi1 at michaelblizek.twilightparadox.com
2012-09-03 19:51 ` Rajat Sharma

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=20120903152601.GA2309@grml \
    --to=michi1@michaelblizek.twilightparadox.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.