Aug 192016
 

NFSLinux can be equiped with CacheFS which is developed by David Howells. CacheFS is designed to operate on Network File System mounts and you will need to install the cachefilesd package which contains the CacheFiles userspace management daemon. The cachefilesd daemon manages the cached files and directories that are used by network filesystems such as NFS to perform persistent caching to a local disk.

NFS server /etc/exports

/home/nfs 192.168.1.11(rw,async,no_subtree_check,no_root_squash,no_all_squash)

NFS client /etc/rc.local

modprobe cachefiles

NFS client mount eg

/home/nfs -fstype=nfs,rw,noatime,fsc 192.168.1.10:/home/nfs

CacheFiles /etc/cachefilesd.conf

dir /home/fscache
tag mycache
brun 20%
bcull 14%
bstop 6%
frun 20%
fcull 14%
fstop 6%

CacheFiles on tmpfs – CentOS 6.8 using tmpfs on /mnt/fscache and fscache on /home/fscache eg

#!/bin/sh

mount | grep fscache || mount -t tmpfs -o size=2048m tmpfs /mnt/fscache
ls /mnt/fscache/disk0 || dd if=/dev/zero of=/mnt/fscache/disk0 bs=1M count=2046
sleep 15
ls /mnt/fscache/disk0 && echo 'y' | mkfs.ext4 /mnt/fscache/disk0
mount /mnt/fscache/disk0 /home/fscache -t ext4 -o loop,user_xattr

… YMMV

Source: http://ideazbrainz.blogspot.co.uk/2014/05/to-speed-up-accessing-files-on-nfs.html
Source: https://en.wikipedia.org/wiki/CacheFS

25 total views, 5 views today

© 2011 Indimon Internet Services

Site last updated August 21, 2016 @ 1:58 pm

Return to Top ▲Return to Top ▲