I have a Synology server where all my media is stored. My plexmedia server is running on a Intel Nuc with ubuntu 24.04 lts with a nfs mount to my nas.
Do you know if there are any performance gains by using cachefilesd for the Linux client ?
If my family members are streaming the same TV show, I assume that the cache will work and not stream directly via the nfs mount ? Should give me less harddrive activity on the nas?
There is no performance gain by running any cache between the NUC and the Syno.
If your family members are getting DirectPlay then PMS is reading directly from the NFS mount and sending the file as-is.
Your performance bottleneck, if any, is between NUC and Syno.
Specifically,
One gigabit gives you 1000 Mbps of video capability.
If your internet speeds are in excess of 1 Gbps, and you’re routinely playing more than 1Gbps total, then you need to make the connection between NUC and Syno faster.
A cache would only exist on the NUC. If the NUC can’t get data from the Syno fast enough then there is no point.
Using multiple ethernet adapters will not help here either because of LACP rules (you have a 1 → multple NIC situation and LACP helps in multiple → 1 situations; eg. multiple NUCs connecting to one Syno)
What are the specifics here please ?
How much are you actually pulling from the Syno?
What is the playback (upload) bandwidth being used ?
Max upload?
There are a few settings in the Syno you can tune for improved NFS performance.
Synology only allows read/write block max of 128K.
Settings 32K blocks in the NFS server , with this setting, greatly improves efficiency and ultimately performance.
If you need a “fatter pipe” from NUC ↔ Syno, there are options
I have a 5 Gbps USB adapter which can sustain 2.2 Gbps on my DS1815+
Well dont have a bottle neck , but just google around last night regarding cache for plex and fell over cachefilesd
It sound like a good solution and it was “build” for nfs setups.
Will look into the syno settings you posted . May I ask if you use nfs and what is your fstab mount ?
If I set nfs permissions from the Synology to read only, I dont need to add “ro” to fstab right?
Again thanks for your always great replies, appreciatated.
You can gain from a cache in general only, if the same files are read again and again in rather short succession.
Unless you have children who play e.g. “Frozen” in endless repetition, it is not very likely that you will profit from a cache of your media in any way.
Since media files tend to be rather large-ish, they will typically get ousted from the cache early, in order to make room for newer items.
Also, a cache should in general be faster than the storage medium from which it caches items. This would mean you’d have to put at least a fast SSD into your device to act as cache memory, if your regular media storage is on HDDs.
(To build a cache on the same storage as the original files is an exercise in futility.)
Exporting as RO versus mounting as ro depends on how many clients and the use case.
Exporting the directory as RO is global to all clients who mount that share/directory. Any client which mounts as RW will still get RO behavior.
Server adapters
My servers and clients use netplan (Networkd) with openvswitch instead of the default NetworkManager. This affords me more control over how the adapters are configured.
My server network configuration creates a bonded adapter then adds bridge support for my LXCs. This gives me 20 Gbps to the main switch.
Lastly, my NFS mount at the client is this:
(All media is organized in subdirectories under /vol/media. /vol is the mount point for the RAID 6 storage array)
# Master Media mount
192.168.0.20:/vol/media /glock/media nfs defaults,sec=sys,rw,auto,async,x-systemd.after=network-online.target,nofail,bg 0 0
I organize this way because I have the QNAP as well which is the mirror backup of the main server. I can have both mounted simultaneously when needed.
So no benefits with async versus sync? I see that there are pro and cons on both.
Async seems to be compared to Synology read/write cache. It copies to memory wait for write, so if there is an poweroutage, you could potential lose data .? But have less overhead compared to sync and harddrive activity.
Trying both - dont know if I can see any difference on my small gear ^^
Nice Nuc you have there @ChuckPa . Whats the price tag of the build you have ?
Use of the async option depends on the NFS-server capabilities.
It will not show in the mount status but if the server supports it, it will use it.
Even when you use sync (default), you are still subject to the NFS server machine writing to disk. This is completely independent of NFS. It’s entirely server OS dependent. It doesn’t matter if it’s the NFS-server programs or any other programs running on that machine.
I have an APC BackUPS Pro (BR1500g) with supplemental battery pack.
At my load level, I’m good for at least 60 minutes (it’s currently showing 90) before it shuts down the servers (I use apcupsd on all hosts).
As for the price tag, you probably don’t want to know.
NUC12 > $3000
RTX 2000 - $685
DIY NAS - > $7000 (144 TB HDD raw, 256GB ECC, NIC, and other nice toys)
Networking > $2500 (includes XS724EM switch)