Plex using limited bandwidth when streaming high bitrate content

Server Version#: 1.18.9.2571
Player Version#: 4.26.1 (Plex Media Player)

When trying to stream high bitrate content, Plex uses very limited bandwidth and buffers a lot.

For my test, I’ve tried streaming a 53Mbps file. It is 4k, H264, Level 5.1, no HDR or anything. I was running into this issue on my LG TV, which was able to use direct play on all the components.

For more extensive testing, I switched to my PC. I used Plex Media Player, so it was also direct playing:


It kept buffering and buffering. I know the screenshot shows it’s only at 3 seconds, but it was not just loading initially. I was reproducing the issue and kept it ‘playing’ in the background while I documented the rest. The buffering persisted.

While it was buffering, I did a speedtest on both the server:

As well as the client:

I ran nethogs on the server as well:

It just doesn’t seem to be outputting more, even though there is plenty of bandwidth available.

It is not a CPU limitation (uptime low as I had just performed a reboot to rule this out):

Testing the hard drives’ read speeds by pulling the same file:

Remote access page:

Relay support is on, but I’m connected directly (+ it’s still not consistently reaching 2mbps), so this does not seem to be the cause. I can also play other content, for example at 10Mbps, just fine.

Transcoding this file down to 20Mbps also increases the bandwidth Plex is using, and playback is near perfect. I don’t want to transcode content where I don’t need to however. Especially not in this case, as it uses 8c/16t unnecessarily, and provides me with lesser quality.

I feel like I’ve checked / tried / tested everything (which is why I’m here, creating this post), however, I’m here for help, so if anyone has any suggestions or would like more information, I am more than happy to play around with settings / provide more information.

What’s the mtr between the two? Latency can kill the best of throughput.

another test you can run is iperf3.

One is the server and then one is the client. It will show precisely what can be transfrerred.

Here is using iperf3 between my desktop and NAS. You can do the same host->host.
The -R option checks the reverse direction.

[chuck@lizum WIZARD_FILES.573]$ iperf3 -c 192.168.0.21
Connecting to host 192.168.0.21, port 5201
[  5] local 192.168.0.13 port 35914 connected to 192.168.0.21 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.10 GBytes  9.41 Gbits/sec    0   1.87 MBytes       
[  5]   1.00-2.00   sec  1.10 GBytes  9.42 Gbits/sec    0   2.40 MBytes       
[  5]   2.00-3.00   sec  1.10 GBytes  9.42 Gbits/sec    0   2.53 MBytes       
[  5]   3.00-4.00   sec  1.10 GBytes  9.41 Gbits/sec    0   2.65 MBytes       
[  5]   4.00-5.00   sec  1.09 GBytes  9.39 Gbits/sec    0   2.79 MBytes       
[  5]   5.00-6.00   sec  1.09 GBytes  9.41 Gbits/sec    0   2.79 MBytes       
[  5]   6.00-7.00   sec  1.07 GBytes  9.23 Gbits/sec    0   2.79 MBytes       
[  5]   7.00-8.00   sec  1.10 GBytes  9.42 Gbits/sec    0   2.79 MBytes       
[  5]   8.00-9.00   sec  1.10 GBytes  9.42 Gbits/sec    0   2.79 MBytes       
[  5]   9.00-10.00  sec  1.09 GBytes  9.39 Gbits/sec    0   2.79 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 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 WIZARD_FILES.574]$ 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 35922 connected to 192.168.0.21 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.08 GBytes  9.30 Gbits/sec                  
[  5]   1.00-2.00   sec  1.06 GBytes  9.08 Gbits/sec                  
[  5]   2.00-3.00   sec  1.02 GBytes  8.79 Gbits/sec                  
[  5]   3.00-4.00   sec  1.05 GBytes  9.02 Gbits/sec                  
[  5]   4.00-5.00   sec  1.01 GBytes  8.68 Gbits/sec                  
[  5]   5.00-6.00   sec  1005 MBytes  8.43 Gbits/sec                  
[  5]   6.00-7.00   sec  1002 MBytes  8.41 Gbits/sec                  
[  5]   7.00-8.00   sec  1.08 GBytes  9.32 Gbits/sec                  
[  5]   8.00-9.00   sec  1.08 GBytes  9.27 Gbits/sec                  
[  5]   9.00-10.00  sec  1.10 GBytes  9.41 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  10.4 GBytes  8.97 Gbits/sec   72             sender
[  5]   0.00-10.00  sec  10.4 GBytes  8.97 Gbits/sec                  receiver

iperf Done.
[chuck@lizum WIZARD_FILES.575]$ 

I know it may seem counter-intuitive, but try setting an “Internet upload speed” under Settings -> Remote Access (in your case it looks like around 86 Mbps would be appropriate). A value of zero sets no limit and Plex may be trying to burst above what you actually have available. Plex will only try to use 80% of the limit you set here so as not to saturate your connection; use that information as you will (set above your actual bandwidth to have Plex use more of what’s available).

I was thinking the same thing, and I have actually tried that. I set it to 70 (unaware Plex would only try to use 80%) and this didn’t seem to have any effect.

Here’s an output of MTR:

mtr

I currently do not have access to my PfSense web interface on the Plex side, so can’t open a port to test iperf remotely. I’ve installed iperf3 through PfSense shell and ran it in server mode on the WAN interface, but (perhaps as expected) the connection merely timed out when connecting from the client pc, so I’m afraid I can’t test that.

Is there any way you can open port 5201 on either side? You only need one.

I’ve opened 5201 on my client side and ran some iperfs. There is definitely something wrong there…

Downloading from server:

root@xxxx:~# iperf3 -c clientside.ip
Connecting to host clientside.ip, port 5201
[  4] local 192.168.1.131 port 47322 connected to clientside.ip port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  3.91 MBytes  32.8 Mbits/sec   69    132 KBytes       
[  4]   1.00-2.00   sec  3.60 MBytes  30.2 Mbits/sec    0    149 KBytes       
[  4]   2.00-3.00   sec  2.79 MBytes  23.4 Mbits/sec   32   58.4 KBytes       
[  4]   3.00-4.00   sec  1.55 MBytes  13.0 Mbits/sec    1   54.6 KBytes       
[  4]   4.00-5.00   sec  1.61 MBytes  13.5 Mbits/sec    0   72.4 KBytes       
[  4]   5.00-6.00   sec  1.86 MBytes  15.6 Mbits/sec    3   64.7 KBytes       
[  4]   6.00-7.00   sec  1.86 MBytes  15.6 Mbits/sec    0   81.2 KBytes       
[  4]   7.00-8.00   sec  1.49 MBytes  12.5 Mbits/sec    9   50.8 KBytes       
[  4]   8.00-9.00   sec  1.24 MBytes  10.4 Mbits/sec    1   49.5 KBytes       
[  4]   9.00-10.00  sec  1.49 MBytes  12.5 Mbits/sec    0   67.3 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  21.4 MBytes  17.9 Mbits/sec  115             sender
[  4]   0.00-10.00  sec  20.2 MBytes  17.0 Mbits/sec                  receiver

iperf Done.

Uploading to server:

root@xxxx:~# iperf3 -c clientside.ip -R
Connecting to host clientside.ip, port 5201
Reverse mode, remote host clientside.ip is sending
[  4] local 192.168.1.131 port 47326 connected to clientside.ip port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  2.41 MBytes  20.2 Mbits/sec                  
[  4]   1.00-2.00   sec  3.00 MBytes  25.1 Mbits/sec                  
[  4]   2.00-3.00   sec  2.24 MBytes  18.8 Mbits/sec                  
[  4]   3.00-4.00   sec  1.18 MBytes  9.88 Mbits/sec                  
[  4]   4.00-5.00   sec  1.28 MBytes  10.7 Mbits/sec                  
[  4]   5.00-6.00   sec  1.56 MBytes  13.1 Mbits/sec                  
[  4]   6.00-7.00   sec  1.86 MBytes  15.6 Mbits/sec                  
[  4]   7.00-8.00   sec  2.14 MBytes  17.9 Mbits/sec                  
[  4]   8.00-9.00   sec  2.40 MBytes  20.2 Mbits/sec                  
[  4]   9.00-10.00  sec  2.44 MBytes  20.4 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  20.8 MBytes  17.4 Mbits/sec                  sender
[  4]   0.00-10.00  sec  20.6 MBytes  17.3 Mbits/sec                  receiver

iperf Done.

Some tests start out with higher bandwidth, in the 50 Mbits/sec, but they all quickly drop… Really not sure where the issue lies…

Just tested iperf3 to my client side again, this time from a different physical location (not from the Plex server), downloading from client side:

xxx@yyy:~$ iperf3 -c client.ip
Connecting to host client.ip, port 5201
[  4] local local.ip port 40628 connected to client.ip port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  7.75 MBytes  65.0 Mbits/sec   16   53.3 KBytes
[  4]   1.00-2.00   sec  7.69 MBytes  64.5 Mbits/sec   33   34.3 KBytes
[  4]   2.00-3.00   sec  5.52 MBytes  46.3 Mbits/sec   39   52.1 KBytes
[  4]   3.00-4.00   sec  7.31 MBytes  61.4 Mbits/sec   20   78.7 KBytes
[  4]   4.00-5.00   sec  8.80 MBytes  73.8 Mbits/sec   29   71.1 KBytes
[  4]   5.00-6.00   sec  9.73 MBytes  81.6 Mbits/sec   40   54.6 KBytes
[  4]   6.00-7.00   sec  14.2 MBytes   119 Mbits/sec    0    150 KBytes
[  4]   7.00-8.00   sec  12.8 MBytes   107 Mbits/sec   26   77.4 KBytes
[  4]   8.00-9.00   sec  7.25 MBytes  60.8 Mbits/sec   22   40.6 KBytes
[  4]   9.00-10.00  sec  12.0 MBytes   101 Mbits/sec    6   92.7 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  93.0 MBytes  78.1 Mbits/sec  231             sender
[  4]   0.00-10.00  sec  92.5 MBytes  77.6 Mbits/sec                  receiver

iperf Done.

and uploading from client side:

xxx@yyy:~$ iperf3 -c client.ip -R
Connecting to host client.ip, port 5201
Reverse mode, remote host client.ip is sending
[  4] local local.ip port 40632 connected to client.ip port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  14.4 MBytes   121 Mbits/sec
[  4]   1.00-2.00   sec  14.4 MBytes   121 Mbits/sec
[  4]   2.00-3.00   sec  15.0 MBytes   126 Mbits/sec
[  4]   3.00-4.00   sec  17.6 MBytes   147 Mbits/sec
[  4]   4.00-5.00   sec  16.3 MBytes   137 Mbits/sec
[  4]   5.00-6.00   sec  15.6 MBytes   131 Mbits/sec
[  4]   6.00-7.00   sec  15.7 MBytes   131 Mbits/sec
[  4]   7.00-8.00   sec  16.1 MBytes   135 Mbits/sec
[  4]   8.00-9.00   sec  14.2 MBytes   119 Mbits/sec
[  4]   9.00-10.00  sec  16.7 MBytes   140 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   156 MBytes   131 Mbits/sec                  sender
[  4]   0.00-10.00  sec   156 MBytes   131 Mbits/sec                  receiver

iperf Done.

So it seems the problem is on the Plex location’s network side, although this does indicate that there should be more bandwidth available than what Plex might be ‘detecting’.

You’re showing 131 Mbps in one direction (not bad) but 78 in the other. What should you have?

I assume the iPerf3 host is also the PMS server? Which is at which IP ?

https://www.reddit.com/r/PleX/comments/eoa03e/psa_100_mbps_is_not_enough_to_direct_play_4k/

The problem that I had was that my TV just has a 100Mbit adapter, like most LG’s. Also LG TV’s are notoriously bad with buffering.

The first set of tests I posted are from my Proxmox host (on which Plex lives) to my client side. I’m getting 17Mbps here. The iperf is not hosted on the Plex VM, although I got the same result from there. Bandwidth available at the host should be 100/100, more accurately 93/93 at most. Bandwidth available on the client side should be 300/300, but I’m still working on the set-up, so right now it’s closer to 120/120.

The second set of tests I posted was from a different physical location than the Proxmox host (and Plex) and was just a test to see which side the issue was likely on.

Cool test! I’m not sure how far LG TV’s buffer ahead, but I have had scenarios where I could watch for a couple more minutes after the network went down.

Anyhow, I was performing most of these tests with my PC and Plex Media Player to rule out the TV’s connection and be able to capture statistics more easily.

@marijnv2000

I need to stop you right here, I don’t like to but I must and, unfortunately, you’re not going to like what I have to say.

  1. Proxmox is a hypervisor.
  2. For the same reason I can’t support “VMware” or “ESXI” or “VirtualBox”, I can’t support Proxmox. It’s not the OS.
  3. What I can support is a Ubuntu/Debian/Redhat/Fedora/Centos guest in that hypervisor.
  4. From what I’ve seen, having explored it a bit, they provide more than the typical hypervisor with their specialized containers.
  5. None of that is supported.

If you can make a real VM, put a supported guest OS in there, then we have a point where we can start measuring

I do think however, seeing you’re only getting 17 Mbps throughput should tell you right there.

I say this because I have several VMs. Every one of them has full network wire speed. (10 GbE)

I don’t know what else to tell you but this is where I have to stop for now.

Proxmox is a hypervisor, but not a baremetal one. Proxmox is just running on Debian, that’s where the iperf was run. I understand it’s using a modified kernel however and you don’t support it.
Proxmox does have containers, but that’s not to say I’m using them for Plex.

Plex is running inside a “real VM”, Ubuntu 16.04 LTS.

If you want I can run the iperf test from the guest, although I did, noticed the low speeds, and tried again on the host, to exclude VM specific problems.

I’m only getting 17Mbps as this is remote streaming, I’m in a different country. The second set of iperf tests was also remote, just a different location than the Plex server.

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.