Is it possible to use a local drive to cache an NFS share
michi1 at michaelblizek.twilightparadox.com
michi1 at michaelblizek.twilightparadox.com
Mon Sep 3 11:26:02 EDT 2012
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
More information about the Kernelnewbies
mailing list