Skip to content

zwodev/fusecache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fusecache

About

fusecache is a simple application that syncs two directories over a potentially slow internet connection. It is based on libfuse. It has seperate read and write caches. The read cache is only filled on demand. The write cache is synced back using rsync. Bandwidth limits can be set individually for up- and downstream channels.

This software has been developed for use with the render management software Royal Render.

WARNING: This tool is currently WIP and should not be used in production yet.

Clone Repository

git clone https://github.com/zwodev/fusecache.git

Install Dependencies

sudo apt install libfuse3-3 libfuse3-dev pkgconf build-essential

Compiling

g++ -Wall fusecache.c CacheManager.cpp `pkg-config fuse3 --cflags --libs` -o fusecache

Directory Structure

fusecache creates 3 sub-directories when run the first time:

./mnt

This is where libfuse mounts the virtual filesystem. Can be shared using SMB, NFS, etc.

./orig

This is where you can mount your source directory. This could be located on your local SMB server for example.

./cache

This directory contains the read and write file caches.

Usage

./fusecache -ulimit 2.4 -dlimit 5.7

You can specify limits to prevent bandwidth exhaustion:

  • -ulimit (upload bandwidth limit in MB/sec)
  • -dlimit (specifies the download bandwidth limit MB/sec)

Setup with SMB

Configure install-fusecache-smb.sh

chmod +x script/install-fusecache-smb.sh
nano scripts/install-fusecache-smb.sh

# Adjust variables at the top of the script file

# Configuration - Set defaults here
ENABLE_FUSECACHE_AUTOSTART=true
user="<user>"
pass="<pass>"
orig_share="//<host>/<share>"
orig_path="<orig_path>"
mnt_path="<mnt_path>"
upload_limit="<upload_limit_in_mb_per_sec>"
download_limit="<download_limit_in_mb_per_sec>"

Run install-fusecache-smb.sh

sudo ./script/install-fusecache-smb.sh

Run precache script

./precache.sh <path>

About

Simple file caching for cloud rendering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published