I’m having two issues that I think can be solved with one solution.
1: PLEX remote access doesn’t let you use jumbo packets on the local network and it’'s really slowing down the rest of my small network having MTU set to 1500.
2: The PLEX server is currently running on my DS1515+ and it pins the CPU when more then two friends connect remotely.
Does anyone here have a similar setup with a Synology NAS setup and/or a Ubiquiti router? I’m not sure if, or how to create a separate VLAN that has a different MTU.
I think your issues are distinct but aggravated when present at the same time.
It’s my understanding Jumbo packet mismatch problems is a function of ethernet and TCP/IP in general, not Plex (very visible with file sharing (SMB or NFS) which are usually TCP/IP), that misaligned packet sizes can slow down any system which isn’t capable of handling the mismatched sizes (a function of the driver). The packets, due to their different sizes, now are forced to fragment. This occurs because the packet’s transmission is first attempted at the higher (Jumbo) MTU size but failure (failed delivery) causes both retransmission and the now-necessary fragmentation to complete transmission (from the TCP layer above). What should have been a single packet has now turned into the original jumbo packet + the delay + retransmission at a viable packet size. The delay is the most visible part of that process.
Think of the snowball effect:
TCP hands the data block to IP.
IP looks at the MTU (the size of the packet) which is a ‘Jumbo’ size
The packet is transmitted at that size
The client doesn’t get the whole packet, either signalling error at the IP layer or completely dropping the packet (varies)
IP backs off to attempt to resolve. MTU size is but not retained (key point). The original packet is now sent again as a fragmented series of packets.
If this doesn’t resolve in the time TCP has allowed, it takes action because it guarantees delivery. The process begins again. (snowballing)
Eventually it does work out… WAY longer than expected.
The application sitting on top (Plex in this case) had to wait much longer to get its data than would have been normally required.
there are 4 layers involved. Application (Plex), Transmission control (TCP), Internet (IP), and the physical Ethernet (with the Jumbo MTU)
I hope that makes sense?
Now, to the point of your DS1515+ CPU being pinned (maxed out?), if video transcoding is involved, this will happen every time. The Atom C2538 CPU isn’t strong enough to process much video (if any) in real time. Yes, it can do audio but not video.
Things which will directly impact invocation of video transcoding are: 1. Change in resolution (1080p -> 720p) 2. Bitate change from original to anything less than original and 3. Changing encoding (H.265 source ) to a client which can only play H.264.
All that having been said, I cannot speak to your router. I have a managed switch and can speak to getting the MTU right and running PMS on it with multiple network adapters active using VLANs.
As long as you keep in mind that PMS will ‘bond’ to the first adapter it finds (not the first defined) which has a valid external gateway (this is DSM’s routing tables in action) you will be able to predict and manage it. PMS doesn’t do too well with multiple addresses on Synology because Synology doesn’t do too well with it themselves. (As a test, ping the IP of one adapter and look at the MAC address the reply comes from. It’s not always the one you expect. I’ve caught it sending packets for 192.168.1.x out the ethernet adapter for 192.168.0.x which should not happen.)
I hope this is of help and someone with specific experience on those routers can help further.
That model of NAS has an Atom CPU in it. Looking that model up for it’s passmark score it’s got about 2300 passmarks. (http://www.cpubenchmark.net/cpu.php?cpu=Intel+Atom+C2550+%40+2.40GHz) This can handle one streaming session with transcoding of a 8Mbps 1080p stream and that’s about it.
To put it into a car reference, you have a VW bug and you’re asking it to perform at NASCAR levels of performance. It just hasn’t got the engine to do the job. Both cars have 4 wheels, an engine, transmission and suspension, but similarities end there. Your NAS has memory CPU and storage, but as it’s a low end NAS what you want to do with it is beyond its capabilities. If you want to use the NAS as a PMS machine it’s time to look at a few things.
Let’s start with the containers and codecs you are storing. Minimize the transcoding requirements as much as possible, to maximize your streaming capabilities with that unit.
MP4 containers with H264 Video codec and AAC stereo are the most Direct Play friendly. There are several ways to convert your existing media over. I have info on a set of scripts in my signature that you can edit to make work within your Synology OS. Since it uses basically the same Linux I have with my Asustor NAS it shouldn’t be that difficult to make work on yours.
You are also going to need to look at bitrates. If your media is all high bitrate stuff, your upload speed might not be able to handle more than a single stream. And if you set speed limits, the CPU can’t handle the transcoding down to fit your limits. This means you either have to stop remote sharing, create an OM (Optimize Media) version that fits your speed limits or upgrade to a PMS machine with a real CPU in it.
The NAS you have now can work for you. In fact it’s got 10 times the CPU of the first NAS I used with PMS. I made that work by maximizing the Direct Playing on it. Transcoding was, for all intents and purposes, not an option on a unit with 200 passmarks. And that NAS worked well for me for about a year. I just had to learn how to set up my media, and start keeping more than one version of the media for remote streaming.
First, thanks for the reply’s, you guys know your stuff.
I should have been more specific in the original post, I understand why I’m having the issues, just not sure the best way to get around them.
I was originaly thinking that I could segregate my network into two VLANs, stand up a new server for external streaming , no encoding is needed for the LAN so the NAS PMS would continue to work fine for it. And then have each VLAN connected to the NAS on a different nic and subnet, but ChuckPa you raise a good point.
I wasn’t aware of that limitation for the NAS version of Plex, that could cause some serious issues. (beyond just figuring out how to actually set it all up)
Would it be better to just build a standalone server, running only one PMS, and live with the slower internal transfer rates? I was hoping to take advantage of the extra Gb nic’s on the synology but I’m not even sure if I could or how that would work.
Basically I don’t want the quality of my media watching experience to suffer if I have two or three people streaming something over the wan.
Mike,
I’m assuming it’s the “@cayars scripts modified” link that you said I should look into?
I’ll definitely check into that, it would be nice to re-encode some of my library into something more manageable.
“Live with the slower internal transfer rates” ?? If you’re referring to playing regular MTU packet size (1500) vs Jumbo? Best experience says to leave it at the default unless everything including everything going out to your ISP also is at that MTU. I don’t think ISP’s let you play with LAN MTU so that idea might get nipped right there. Generally, it’s not worth the headache. Jumbo packets are intended for really long haul lines (transcontinental-style on a single hop). None of us have that so why fuss?
Bonding multiple adapters together is easy. You “Create” a ‘802.11ad’ aggregate adapter… not the redundant one.
It looks like this when done. (I have eth0 + eth1 as bond0 giving 2 Gb/s) the others are normal 1GbE.
Thanks ChuckPa! I’ll give that a try.
When I have the local intranet set to jumbo frames I can move large files at 90-110Mb/s sustained, as soon as I drop the MTU to 1500 it bounces all over the place, 20-110Mb/s, averaging closer to 60.
I just bought the Plex Pass, so never used the WAN streaming features before and became accustom to it.
NFS V4
Rsize (read size) = 1Meg
Wsize (write size) = 1Meg
async (asyncronous operations). (Normally NFS makes you wait for one transaction to complete before the next can begin)
I sustain 117 MB/sec with packet sizes of 1500 and NFS Read & Write size (at the server) set at 16 KB (default is 8 KB).
Put these 3 together and you’ll never need to play with MTU. The only slowdown you get is when the NAS can’t keep up (which happens when writing to it… it’ll drop to 75-80 at times for the software RAID)
I can ssh into my NAS and navigate to /etc/fstab, but how do I edit it?
Been years since I’ve had to do anything in Linux.
2. I’ve found and enabled NFSv4 support in the GUI, but under advanced settings the highest R/W packet size I can select is 32KB and I don’t see an async option Is there another way to edit this, or am I looking in the wrong place.
UPDATE- Set to 16KB as shown in the screen shot. Found async options under NFS permissions for the sharded folders. Does this need to to be done for each folder? And the client set to the subnet?
(ie. 192.168.1.0/24, Read/Write, No Mapping, yes, Allowed, Allowed)
Looks like my switch doesn’t support Link Aggregation and from the forums I browsed it never will. Know of any GB switches that do and are reasonably priced?
@aofi@shaw.ca said:
4. Looks like my switch doesn’t support Link Aggregation and from the forums I browsed it never will. Know of any GB switches that do and are reasonably priced?
The Asus RT-N66u, RT-AC66U or the 68 series can all support Link Aggregation on ports 3/4 running AsusWRT-Merlin builds. Fairly easy to set up, too.
@aofi@shaw.ca said:
Ahh!!! and now for the noob questions:
I can ssh into my NAS and navigate to /etc/fstab, but how do I edit it?
Been years since I’ve had to do anything in Linux.
2. I’ve found and enabled NFSv4 support in the GUI, but under advanced settings the highest R/W packet size I can select is 32KB and I don’t see an async option Is there another way to edit this, or am I looking in the wrong place.
UPDATE- Set to 16KB as shown in the screen shot. Found async options under NFS permissions for the sharded folders. Does this need to to be done for each folder? And the client set to the subnet?
(ie. 192.168.1.0/24, Read/Write, No Mapping, yes, Allowed, Allowed)
Looks like my switch doesn’t support Link Aggregation and from the forums I browsed it never will. Know of any GB switches that do and are reasonably priced?
Thanks again for all the help!
We cannot /etc/fstab on the NAS. It is recreated at each boot. The /etc/fstab I speak of is on your other computer (desktop/workstation/server). That is where you put the mount options. Those options are sent to the NAS to tell it how to create the NFS mount connection. Once created, it applies to the entire share (mount point).
NetGear GS-108T V2 Very reasonable price. I use it. Make sure to get the V2 and not the V1.