rclone mount $uRemote $uMP \\ --config $uRCconf \\ --poll-interval 5s \\ --transfers 32 \\ --checksum \\ --uid=${uUID} \\ --gid=${uGID} \\ --umask=002 \\ --allow-other \\ --dir-cache-time 1h \\ --vfs-case-insensitive=false \\ --vfs-cache-mode=full \\ --vfs-cache-max-age=30s \\ --vfs-cache-max-size=20M \\ --vfs-write-back=5s \\ --multi-thread-cutoff=32M \\ --multi-thread-streams=32 \\ --links \\ --verbose \\ --daemon
Sometimes I access the files directly from bash, sometimes thru the web browser. I've noticed that, on bash, it is either not registering that files are added/deleted, or the reaction is heavily delayed. What can it be?
The issue you're experiencing with delayed updates in the mounted filesystem can be caused by several factors related to rclone's caching behavior. Here are some possibilities to explore:
-dir-cache-time: This setting defines how long rclone keeps directory listings in cache. A high value (24h) can lead to delays in seeing new or deleted files. Consider lowering it to a shorter time like 1 hour (1h).-vfs-cache-mode: While full mode caches everything, -vfs-cache-mode=writes might be more efficient for your use case. It caches only written data, reducing delays in refreshing file listings.-vfs-cache-max-age: This controls how long individual files stay cached by rclone. Setting it to a low value (e.g., 30s) can force frequent updates, but also increase I/O operations.-poll-interval: Although set to 0, consider experimenting with slightly higher values (like 10s) to see if it triggers a refresh mechanism. However, keep it low to maintain responsiveness.inotify or udev to enable notifications for your specific OS.Here's how you can try modifying the rclone mount command to address the caching issue:
rclone mount $uRemote $uMP \\ --config $uRCconf \\ --poll-interval 10s \\ # Experiment with slightly higher values --transfers 32 \\ --checksum \\ --uid=${uUID} \\ --gid=${uGID} \\ --umask=002 \\ --allow-other \\ --dir-cache-time 1h \\ # Reduced cache time for directories --vfs-cache-mode writes \\ # Cache only written data --vfs-cache-max-age 30s \\ # Frequent updates for individual files --vfs-cache-max-size 20M \\ --vfs-write-back 5s \\ --multi-thread-cutoff=32M \\ --multi-thread-streams=32 \\ --links \\ --verbose \\ --daemon
Remember to adjust values based on your needs and test the impact on performance. Additionally, consult the rclone documentation for detailed information on each flag: https://rclone.org/commands/rclone_config/.
By tweaking the caching settings and exploring file system notifications, you should be able to reduce the delay in seeing changes reflected in your mounted filesystem.
The changes we discussed to address the delayed updates in your rclone mount might have some impact on network performance, but it depends on the specific settings and your usage scenario. Here's a breakdown:
Potential Increases in Network Traffic: