Storage and Caching in Emby
1. NVMe Cache System with Rclone
1.1 NVMe for Cache
Emby uses a normal NVMe SSD for server cache. This NVMe is faster than a regular SSD and is used for:
- Fast writing of data from storage servers
- Fast reading for streaming
- Temporary storage for transcoding
1.2 Rclone Configuration for NVMe Cache
Rclone is configured with the following key parameters running on NVMe:
--vfs-cache-mode full
--cache-dir "C:\ProgramData\Emby-Server\cache\rclone"
--vfs-cache-max-size 200G
--vfs-cache-max-age 168h1.3 How the Flow Works with NVMe and Rclone
When a user accesses a movie:
- Central server receives the request for the movie
- Rclone reads data from main storage servers
- Data is immediately written to NVMe cache with Rclone parameters
- Streaming starts directly from NVMe cache
- Subsequent accesses are served directly from cache using --vfs-read-chunk-size 512M
1.4 Settings for Maximum Performance on NVMe
--vfs-cache-writes
--buffer-size 8G
--vfs-read-chunk-size 512M
--vfs-read-ahead 64G
--multi-thread-streams 40961.5 Optimizations for Streaming on NVMe
--transfers 8192
--checkers 8192
--vfs-file-buffer-size 8G
--vfs-read-window 1G
--vfs-read-chunks 641.6 Cache Management on NVMe
--cache-chunk-size 256M
--cache-chunk-total-size 200G
--cache-workers 128
--vfs-cache-clean-interval 2m
--vfs-cache-max-usage 95%1.7 Memory and Space Control on NVMe
--vfs-cache-min-free-space 500M
--vfs-cache-max-size-soft-limit 450G
--vfs-cache-max-size-emergency 600G1.8 Advantages of NVMe Cache with Rclone
- Extreme speed: Write/read over 3000 MB/s due to Rclone parameters
- Minimal latency: Almost instant access to data with --vfs-read-mode ultra-fast
- Large capacity: Cache for hundreds of movies simultaneously with --vfs-cache-max-size 200G
- Reliability: Designed for intensive tasks with --cache-workers 128
1.9 NVMe Partitioning with Rclone
NVMe is specially partitioned for:
- Media cache: Movies, series, music in streaming with --vfs-cache-mode full
- Metadata cache: Content information
- Transcoding cache: Temporary files for conversion
- Image cache: Thumbnails and artwork
This combined system ensures users have a perfect streaming experience, regardless of the location of main storage servers, thanks to the optimized Rclone configuration on high-speed NVMe hardware.