Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
best plex rclone mount settings
Tested with Ubuntu 16.04 LTS server.
Rclone version rclone v1.35-129+
This is the summery of original topic I made on rclone forum: https://forum.rclone.org/t/best-mount-settings-for-streaming-plex/ . Thanks to all contributors for their participation and testing.
rclone mount settings
rclone mount \
--acd-templink-threshold 0 \
--stats 1s \
--buffer-size 1G \
--timeout 5s \
--contimeout 5s \
--log-file=/path to/logfile.log \
$REMOTE: $MOUNTPOINT &
Note: buffer-size is per file requested eg 10 streams will eat 10GB of your ram so set it accordingly. The bigger buffer just means users will be able to seek a bit further without buffering. ( The default rclone buffer is 16M )
unionfs mount settings ( if you use it )
-o cow,allow_other,direct_io,auto_cache,sync_read \
/path to/local=RW:/path to/remote-mount=RO $UNIONFS-MOUNT-POINT
Plex Server Transcoder settings
Segmented transcoder timeout: 120
Transcoder temporary directory: /dev/shm
Transcoder default throttle buffer: 600
Note: /dev/shm is 50% of your server ram and we want to avoid HDD I/O's. Last time i tested 15 concurrent transcoding sessions took 12GB of ram, but it depends of source media, Transcoder default throttle buffer and Transcoder quality setting.
Plex Server Library Settings
Empty Trash automatically after every scan: Disable In case you have any kind of problems with your mount eg it gets disconnected Plex will delete all meta data and movie info essentially you will start from scratch if you leave this enabled.
Plex Database Optimization
If you have big library (and especially if plex.db is not on SSD) its worth expanding default cache size in plex database.
With this changes the DB pages will be put into RAM to improve performance.
To change it follow this procedure (terminal):
1. apt update && apt install sqlite
2. sudo service plexmediaserver stop
3. sqlite3 -header -line "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "PRAGMA default_cache_size = 1000000"
4. sudo service plexmediaserver start
Note: The default cache size depends how big your library is, but default sqlite page size is 2000.( 1 million pages in cache would take around 1.5GB of ram)
You can check your current page count with:
sqlite3 -header -line "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "PRAGMA page_count"
Will keep this page updated with latest finds for best possible optimization.