Jay Taylor's notes

back to listing index

best plex rclone mount settings · ajkis/scripts Wiki · GitHub

[web search]
Original source (github.com)
Tags: configuration rclone plex github.com
Clipped on: 2020-08-07

Skip to content

best plex rclone mount settings

Ajki edited this page on Apr 16, 2017 · 11 revisions

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 \
--read-only \
--allow-other \
--acd-templink-threshold 0 \
--stats 1s \
--buffer-size 1G \ --timeout 5s \ --contimeout 5s \ -v \
--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 )
unionfs-fuse \
-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.

Clone this wiki locally