Snynology 1019+ / Plex 1.23.1.4528 - 4K - Horrible Buffering

Server is buffering horribly when playing 4K movies. I have tested this with movies that I have watched on older Plex versions in the past and buffering is occurring on these movies as well. Buffering is not occurring on any 1080P movies at bandwidth ±27mbps. I thought it may be the the new Dream Machine Pro, but I disabled all IPS and firewalls with the same result. This does not appear to be a Synology memory or CPU issue as neither peak above 35%.

Server Version#: 1.23.1.4528

Player Version#: Iphone latest, Windows 10 latest, Samsung TV latest

Ubiquiti Dream Machine Pro Speed Test - 935.7 up and 714.7 down, latency 15ms

Ubiquiti Dream Machine Pro - With firewall and IPS enabled and all disabled as well

Synology 1019+ - Latest DSM

Quality:

  • Auto Adjust - on or off
  • Internet Streaming - Maximum, tried down to 20 Mbps, 1080P, 2 Mbps 720P

Transcoder:
-Make my CPU hurt
-Transcoder default throttle buffer 60 and tried 120 and 240

Background transcoding x264 preset

  • Very Fast and tried Fast

Enable HDR tone mapping - on and tried off.

Maximum simultaneous video transcode - 3 (but only one at a time)

Dashboard

  • Bandwidth Maximum - 46 Mbps
  • CPU maximum 33%
  • Ram
    - Plex 3%
    - System 22%

Movie Playing:

  • Wonderwoman 1984
  • Data rate 40107 kbps
  • Total Bitrate 40747 kbps
  • Frame Rate 23.98
  • Audio bitrate 639 kbps
  • Audio Channels 6
  • Audio sample rate 48.000 kHz
  • MP4

Logs below

Subtitles?

If subtitles are being burned (either forced or requested by the player), the J3455 CPU in the DS1019+ will never keep up.

Subtitles are the bane of every Synology NAS running PMS.

1 Like

Nope.. Nothing to do with subtitles.

I’m also wondering why it’s trying to transcode 4K HVEC to 4K HVEC. I tried maximum and then lowered it as state above.

I also noted that when playing on my local network (WiFi) I had issues as did my directly attached devices (Ethernet), but when playing via internet (ATT), I had no issues. Which is very strange behavior. My speeds are higher on local than through internet. I am guessing it is streaming at a higher rate local (WiFi and Ethernet) than down sampling for a lower stream via internet (ATT). However, the CPU, RAM and Bandwidth on Plex and Synology did not show much difference. Nor did they show CPU or RAM spikes above 60% over multiple tests on ATT, WiFi, or Ethernet connected devices. Samsung TV, Win10 client, and iPhone.



Thanks.

Now do one more diagostic step please.

  1. Settings - Server - Trranscoder - Show Advanced

  2. Turn HDR tonemapping OFF

  3. SAVE

  4. Retest

Same results with HDR tone mapping Off.

20 Mbps 1080P.
Automatically Adjust Quality
Make My CPU Hurt
Transcoder default throttle buffer: 60
Background transcoding x264 preset: Very Fast
Use hardware acceleration when available: On
Use hardware-accelerated video encoding: On
Maximum simultaneous video transcode: 3

If you notice from the first cap yesterday, that was on my iPhone. This was from my Windows machine over WiFi.




This is with
Use hardware acceleration when available: Off
Use hardware-accelerated video encoding: Off

I have also just noticed that when changing from
Maximum to 20 Mbps 1080P
and from
20 Mbps to 12 Mbps 1080P

I see no change in CPU utilization or Bandwidth. Wouldn’t one expect to see bandwidth lower to reflect the new Mbps?

I also just tried turning off Automatically adjust quality (Beta) at 12 Mbps 1080P, but with no change in stream results.

It’s still buffering. I know that my wife and I have watched this video about 6-8 months ago now with no issues. So I can rule out file issues.

It appears that there are multiple transcoder instances and multiple Plex Media Servier instances running in the background processes. Could this cause buffer over runs or tie up CPU threads?






After stopping my plex stream I see that almost 1.4 gigs frees up in memory from before when the movie was running above, see above screen shot.

  1. CPU loading looks good
  2. Multiple PMS threads (not processes) showing in that table is normal
  3. 10.5% CPU shows me it’s multiplexing and moving data. A little higher than normal but still within limits.
  4. Memory usage jumping up during a transcoding activity is not uncommon however, in this case, coupled with the I/O Wait being so high,

Time for a silly question (which isn’t all that silly).

What is the network MTU set for ? (Control Panel - Network )

It also would help if I could have a set of DEBUG logs (ZIP file) which capture this. I won’t be trying to guess. I’d be able to see exactly what’s happening.

@ChuckPa

Google Fiber - 1 Gbps

Dream Machine Pro Wan Interface to the Internet - 1 Gbps, Full duplex

Plex Port 1 - 1 Gbps, Full duplex, MTU 1500
Plex Port 2 - 1 Gbps, Full duplex, MTU 1500

Dream Machine Pro Port 1 to Plex Port 1 - 1 Gbps, Full duplex

Dream Machine Pro Port 2 to Plex Port 2 - 1 Gbps, Full duplex

Samsung TV directly connected to Dream Machine Pro 100 , Full duplex

WiFi - Win10 - Ookla Speed Test 121.58 Up, 487.23 Down (and I’m on a Webex Meeting now)

How can I send you logs?

I would also like you to install iperf3 on the Syno.

Next, install it for your computer.
WIndows client or Linux client (apt-get install iperf3)

With the server running on the Synology, this will verify the exact wire speed between client & Synology.
This is what 10 GbE LAN looks like, testing both directions.
You should see 940-ish Mbps for a gigabit connection.

chuck@lizum ~.512]$ iperf3 -c 192.168.0.21
Connecting to host 192.168.0.21, port 5201
[  5] local 192.168.0.13 port 40698 connected to 192.168.0.21 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.09 GBytes  9.40 Gbits/sec    0   1.41 MBytes       
[  5]   1.00-2.00   sec  1.10 GBytes  9.42 Gbits/sec    0   1.48 MBytes       
[  5]   2.00-3.00   sec  1.10 GBytes  9.41 Gbits/sec    0   1.48 MBytes       
[  5]   3.00-4.00   sec  1.09 GBytes  9.41 Gbits/sec    0   1.48 MBytes       
[  5]   4.00-5.00   sec  1.10 GBytes  9.42 Gbits/sec    0   1.48 MBytes       
[  5]   5.00-6.00   sec  1.10 GBytes  9.42 Gbits/sec    0   1.48 MBytes       
[  5]   6.00-7.00   sec  1.10 GBytes  9.42 Gbits/sec    0   1.64 MBytes       
[  5]   7.00-8.00   sec  1.09 GBytes  9.41 Gbits/sec    0   1.64 MBytes       
[  5]   8.00-9.00   sec  1.10 GBytes  9.42 Gbits/sec    0   1.64 MBytes       
[  5]   9.00-10.00  sec  1.09 GBytes  9.41 Gbits/sec    0   1.64 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  11.0 GBytes  9.41 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  11.0 GBytes  9.41 Gbits/sec                  receiver

iperf Done.
[chuck@lizum ~.513]$ iperf3 -c 192.168.0.21 -R
Connecting to host 192.168.0.21, port 5201
Reverse mode, remote host 192.168.0.21 is sending
[  5] local 192.168.0.13 port 40702 connected to 192.168.0.21 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.07 GBytes  9.21 Gbits/sec                  
[  5]   1.00-2.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   2.00-3.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   3.00-4.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   4.00-5.00   sec  1.09 GBytes  9.40 Gbits/sec                  
[  5]   5.00-6.00   sec  1.09 GBytes  9.40 Gbits/sec                  
[  5]   6.00-7.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   7.00-8.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   8.00-9.00   sec  1.09 GBytes  9.39 Gbits/sec                  
[  5]   9.00-10.00  sec  1.09 GBytes  9.38 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  10.9 GBytes  9.39 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  10.9 GBytes  9.39 Gbits/sec                  receiver

iperf Done.
[chuck@lizum ~.514]$ 

I am looking in this direction because of the multiple articles which instruct to enable Flow Control on UDM Pro systems. Enabling it has often resulted in 500+ Mbps LAN improvement. (Common sympton is WAN perf tests are normal).

Ref: One of several:

https://community.ui.com/questions/Unifi-Dream-Machine-Pro-Possible-Bug-Flow-Control/3b7b5c97-b7fd-4a00-a8a9-28601901e1c0

Plex Logs enclosed as requested. Minus the PII of course.

I did note these in the logs and I also noted a ton of reoccurring authentication requests.

Summary

May 24, 2021 12:18:34.224 [0x7f5aebef7b38] DEBUG - NAT: UPnP, found device <http://SYNOLOGY PORT 1 HERE:5000/ssdp/desc-DSM-eth0.xml> with private address <SYNOLOGY PORT 1 HERE>
May 24, 2021 12:18:34.224 [0x7f5aebef7b38] DEBUG - NAT: UPnP, not an IGD: <http://SYNOLOGY PORT 1 HERE:5000/ssdp/desc-DSM-eth0.xml>.

May 24, 2021 12:18:34.475 [0x7f5aebef7b38] DEBUG - HTTP requesting GET https://PUBLIC IP HERE.ca858e0aef324343a9276543e42bed37.plex.direct:32400/identity
May 24, 2021 12:18:37.476 [0x7f5aebef7b38] ERROR - Error issuing curl_easy_perform(handle): 28
May 24, 2021 12:18:37.476 [0x7f5aebef7b38] DEBUG - HTTP simulating 408 after curl timeout

May 24, 2021 12:18:34.224 [0x7f5aebef7b38] DEBUG - NAT: UPnP, getPublicIP didn’t find usable IGD.
May 24, 2021 12:18:34.474 [0x7f5aebef7b38] DEBUG - NAT: PMP::getPublicIP, Received public IP from router: PUBLIC IP HERE

May 24, 2021 17:50:35.016 [0x7f5aeacffb38] DEBUG - [Transcode] Streaming Resource: Calculated bandwidth of 41089kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 30000kbps
May 24, 2021 17:50:35.016 [0x7f5aeacffb38] DEBUG - [Transcode] Streaming Resource: Determining preferred transcode encoders through transcode only decision.
May 24, 2021 17:50:35.017 [0x7f5aeacffb38] DEBUG - [Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi
May 24, 2021 17:50:35.017 [0x7f5aeacffb38] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi

May 24, 2021 17:50:35.512 [0x7f5aead22b38] WARN - SLOW QUERY: It took 210.000000 ms to retrieve 24 items.
May 24, 2021 17:50:36.724 [0x7f5aeaae9b38] WARN - QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
May 24, 2021 17:50:36.724 [0x7f5aeaae9b38] WARN - QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.

May 24, 2021 17:50:36.847 [0x7f5aeb4bfb38] ERROR - Unknown metadata type: folder

May 24, 2021 10:21:18.898 [0x7f5aeaec7b38] ERROR - SQLITE3:0x80000001, 28, double-quoted string literal: “2021-05-17 10:21:17”
May 24, 2021 10:21:18.898 [0x7f5aeadd6b38] ERROR - SQLITE3:0x80000001, 28, double-quoted string literal: “2021-04-24 10:21:17”

Plex LOGS.zip (244.1 KB)

Laptop via WiFi to NAS - IPerf3
I would think this is more than enough to handle the 40 Mbps at 4K.

I also verified that “Flow Control” is turned off on the Dream Machine

[ 4] 0.00-1.02 sec 256 KBytes 2.07 Mbits/sec
[ 4] 1.02-2.00 sec 14.9 MBytes 126 Mbits/sec
[ 4] 2.00-3.00 sec 26.2 MBytes 220 Mbits/sec
[ 4] 3.00-4.00 sec 38.2 MBytes 321 Mbits/sec
[ 4] 4.00-5.00 sec 37.2 MBytes 313 Mbits/sec
[ 4] 5.00-6.00 sec 35.2 MBytes 296 Mbits/sec
[ 4] 6.00-7.00 sec 25.0 MBytes 209 Mbits/sec
[ 4] 7.00-8.00 sec 31.8 MBytes 267 Mbits/sec
[ 4] 8.00-9.00 sec 37.6 MBytes 316 Mbits/sec
[ 4] 9.00-10.00 sec 38.1 MBytes 320 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 285 MBytes 239 Mbits/sec sender
[ 4] 0.00-10.00 sec 285 MBytes 239 Mbits/sec receiver

I am asserting, per other Unify users – you want it on.

Have you tested with both ON and OFF ?

The link you sent me was about “disabling” flow control. I turn it on though. I am thinking that “Flow Control” is just marking QOS for RTSP though. And since it’s just me and the wife here streaming, my network is not over burdened with file transfer traffic.

https://community.ui.com/questions/Unifi-Dream-Machine-Pro-Possible-Bug-Flow-Control/3b7b5c97-b7fd-4a00-a8a9-28601901e1c0

Then began changing the settings on my computer network card. I disabled Flow Control, because my computer is about 10 feet away and has a full duplex connection, and BAM speeds are now where they should be.

Immediately speeds increased by about 500 Megs. I was completely stumped. Tried it on 2 more computers, worked like a champ! For some reason, the ports on my DMP go Crazy when Flow Control is active, when it’s off, no problems at all. Speeds are back to normal.

yup… My IPerf is worse with Flow Control On.

[ 4] 0.00-1.00 sec 256 KBytes 2.09 Mbits/sec
[ 4] 1.00-2.02 sec 2.62 MBytes 21.7 Mbits/sec
[ 4] 2.02-3.00 sec 14.0 MBytes 119 Mbits/sec
[ 4] 3.00-4.00 sec 32.4 MBytes 271 Mbits/sec
[ 4] 4.00-5.00 sec 32.2 MBytes 271 Mbits/sec
[ 4] 5.00-6.00 sec 30.6 MBytes 257 Mbits/sec
[ 4] 6.00-7.00 sec 24.2 MBytes 203 Mbits/sec
[ 4] 7.00-8.00 sec 23.5 MBytes 197 Mbits/sec
[ 4] 8.00-9.00 sec 25.1 MBytes 211 Mbits/sec
[ 4] 9.00-10.00 sec 33.1 MBytes 278 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 218 MBytes 183 Mbits/sec sender
[ 4] 0.00-10.00 sec 218 MBytes 183 Mbits/sec receiver

Ok… My apologies, I wrote incorrectly. (I’m working on a flow control issue here with the ixl driver and 2.5 Gbps)

How does it behave if you use wired and not wifi ?

Same issue on my Samsung 4K TV which is direct wired at 100 Mbps Full Duplex

The server is wired or wifi ?

Plex → Wired → DMP → Wired → Samsung