VPS Plex Server with Cache not performing well


#49

OK, i’ll try switching to read only


#50

I spun up a new test VPS at another provider. Using Rclone Cache it’s streaming 30+Mbit media files with no problems. Smooth playback, 6-7 second starts.

Nice to see Rlcone Cache working the way it should on a VPS.

This test VPS has significantly lower specs than my SSDnodes VPS but its handling it like a champ. I don’t know whats happening with the SSDnodes VPS. Their tech support made adjustments like switching from intel1000 to VirtIO network adapters but it didn’t make a difference to streaming quality.


#51

@jasanson which VPS did you go with?

In my testing. ChicagoVPS would pull stuff down from Usenet at 70-80MB/s, SSDNode 30-40MB/s, but on the rclone to google drive copy feature, ChicagoVPS would do often times me 1-2MB/s and SSDNodes would be 12-15MB/s. I thought in the end this is all just TLS traffic. Who really knows what type of bandwidth shaping might be going on.


#52

Hi everyone,

I look after engineering at SSD Nodes and deal with Level 3 support tickets. I am the ‘Daniel’ quoted by @mjmayer in the support ticket response above.

We have become aware that at least two of our customers have questions about the performance of Plex within their VPSes hosted on our service. I can see from this thread that sometimes there can be some confusion about what is going on ‘under the hood’ at a VPS provider. So I thought that I would join this discussion so we can answer your questions directly and, hopefully, help figure things out faster.

I was concerned that @jasanson was streaming content from a VPS located in Dallas up into Canada. So I have just set up a test server in our Montreal data center which will have a much better network path. We will see how that test goes.

We are not currently accepting new orders for the Montreal data center because we considered that we were full in that location. The “full” server that @jasanson’s test VM is on currently has 40% idle CPU (of 72 2.8GHz cores), 30% of 1TB RAM available and is only using 20% of 10Gbps network bandwidth. I don’t think those stats support the suggestion, earlier in this threat, that we ‘oversell’ our servers.

Please let me know if there is anything I can do to help our customers look into these Plex issues.

Daniel.


#53

@jasanson’s network performance improved once we changed the network card from an emulated Intel e1000 to virtio. (Our new VMs are deployed with virtio NICs and we are steadily upgrading the older VMs).

root@ssdnodes-server1:/# speedtest --server 11207
Download: 2494.31 Mbit/s
Upload: 390.09 Mbit/s

root@ssdnodes-server1:/# speedtest --server 11207
Download: 1774.79 Mbit/s
Upload: 341.76 Mbit/s

root@ssdnodes-server1:/# speedtest --server 11207
Download: 600.55 Mbit/s
Upload: 317.80 Mbit/s

root@ssdnodes-server1:/# speedtest --server 11207
Download: 2828.50 Mbit/s
Upload: 258.18 Mbit/s

root@ssdnodes-server1:/# speedtest --server 11207
Download: 1791.12 Mbit/s
Upload: 256.31 Mbit/s

Please note that using speedtest without manually selecting the correct server will often give inaccurate results. Server 11207 is located in Dallas, as is the VM under test.

@jasanson’s test server in Montreal has been set up. The speedtest results from that VPS are:

root@test-judesanson-plex:/# python3 speedtest.py --server 6689
Download: 827.04 Mbit/s
Upload: 739.22 Mbit/s

Once Plex has been installed we will monitor testing and see what we can find out.

Daniel.


#54

CPU usage is a very common problem when customers run Plex in a VPS where CPU capacity is shared (as it is on our service, like most VPS providers).

Transcoding consumes a lot of CPU and if you are going to watch a movie that CPU will be used for a long period of time. If your VPS plan has shared rather than dedicated cores (i.e. most of them) then you don’t get to use all your cores all the time. This is a common misconception. You can burst your CPU usage to use 100% of all of your cores for a short period but on a non-dedicated plan you can’t do that constantly.

If you need to transcode movies or stream to a lot of people then you need a VPS with dedicated cores or a dedicated server. The pricing would change accordingly, of course.

Daniel.


#55

I’ve been digging through the Plex Logs and I’m seeing a good amount errors that seem to correspond with stuttering playback

Apr 14, 2018 08:41:39.490 [0x7f782c7fa700] ERROR - Throttle: timed out trying to read chunk 8
Apr 14, 2018 08:49:44.313 [0x7f782c7fa700] ERROR - Throttle: timed out trying to read chunk 87
Apr 14, 2018 08:52:43.056 [0x7f783afff700] ERROR - Throttle: timed out trying to read chunk 1
Apr 14, 2018 08:57:20.035 [0x7f7833fff700] ERROR - Throttle: timed out trying to read chunk 23
Apr 14, 2018 08:57:31.386 [0x7f783afff700] ERROR - Throttle: timed out trying to read chunk 26
Apr 14, 2018 08:57:51.032 [0x7f7828bfd700] ERROR - Throttle: timed out trying to read chunk 26
Apr 14, 2018 08:58:32.705 [0x7f783afff700] ERROR - Throttle: timed out trying to read chunk 1

Theses errors are related to the movie data not being available for the plex transcoder. Determining which link in the chain is the culprit is hard. There is the google drive api, rclone, docker, fuse, plex, network contention, and CPU contention. I’ll keep poking as time allows.

It seems that Library Scanning within plex can have a negative impact on playback. Which is probably why rclone implemented the plex integration. Which I have had disabled for several weeks.


#56

@daniel-ssdnodes thanks for joining in the conversation and for discussing these issues with us.

I’ll spin up Rclone Cache and Plex on the test server later today see how it goes.

Thanks


#57

I setup the new test Plex server at the SSDnodes Montreal location.

The install on the VPS was as minimal as possible and I’m only using Rclone Cache. The mount is of an encrypted and then decrypted GoogleDrive remote.

The results for playing media are significantly better than from my server at the Dallas location.

Play starts in 5 to 7 seconds and is smooth and without pauses, freezes or other buffer related network issues. Scanning forward works fine and as good as can be expected

Playing two directplay 25Mbit media files at the same time -no problems
Playing a single directplay 40Mbit file - no problems

I don’t know if this is working so much better because of differences in network peering or due to differences in the node. How would we figure that out?


#58

Likely peering differences, I run on a 2vCPU VPS with 2GB RAM and a 100mbit connection but it’s OVH hosted in france (I’m in the uk).

Seems OVHs peering to google datacentres is good as it’s nearly always at the max 100mbit both reading and writing.

Glad to hear you got an improvement though! Virtio over emulated intel is super handy for overheard, I had a lot of softirq use when not using virtio network interfaces.


#59

@jasanson is the test server continuing to perform as expected?

I’m continuing to see issues where movies won’t start streaming or stutter. Then I looked at the network traffic and it seems like rclone isn’t pulling anything down. Restarting services (rclone, plex) seem to temporarily resolve the issues.


#60

So far so good. I am scanning in some more folders to try playing some different material.

Everything that I have tried to play so far has worked great.


#61

@jasanson How has performance been for you? Rclone on ssdnodes has been working well for me when using direct play in plex. Transcoding video has been miserable. A 1920x1080 video (7011 kbps bit rate) won’t play well. It looks CPU bound. top will report the plex transcoding process will use between 200-250% cpu. But with 4 cores, this seems like it still should be ok. Direct stream has been working fine.

Have you had any transcoding issues?

@daniel-ssdnodes When transcoding video I’m seeing steal times in top regularly in the 20-40. Which indicates the node may be oversubscribed.


#62

I typically don’t transcode but on the odd occasion that I’ve tested it recently I find that its performing great. I just ran a five minute test and had no problems. Netdata shows steal as averaging approximately 3 (range of 0 to 6).


#63

In terms of overall performance everything has been working very well.

The server is now located closer to me. The network peering between my location and the server is significantly better and this seems to have had a major positive effect.


#64

@mjmayer You seem to expect to have dedicated use of CPU cores. You don’t.

You have purchased a USD$10/month VPS plan that gives you certain resources - including the ability to use up to your allocated amount of RAM, the ability to use up to a set amount of disk space and shared use of a certain number of CPU cores.

That is the practice in the VPS industry. Plans are shared CPU unless they are specifically stated to provide dedicated cores (and expect to pay for that, cores are expensive). Its the same on Vultr, DO, AWS, etc (some of those offer plans stated to be dedicated CPU, we don’t).

It also has to be said it’s not realistic to expect dedicated use of 2-4 cores on a VPS that costs $10/month.

Lets take Vultr as an example. Today they are offering 4 dedicated cores, 16Gb RAM, 240Gb storage and 20Tb network transfer … for USD$120/month.

So if you would like to be able to transcode whenever you want for as long as you want, that would be a good plan for you. Of course, it will cost you $120/month. Your SSD Nodes plan with similar specs (but shared CPU instead of dedicated) costs you $120 per year.

And, just for comparison, their standard 4 core plan (only 8Gb RAM, 100Gb storage, 4Tb network transfer) costs USD$40/month. That’s shared CPU.

This is probably a good time to point out that your SSD Nodes plan offers more RAM than the equivalent Vultr plan, but costs only a quarter of what they charge.

I haven’t done a market survey to find the cheapest/best dedicated CPU plans for people who want to transcode with Plex. Dedicated CPU is not a market we are in (at present). You may be able to find cheaper dedicated core plans - although if they are very cheap, they most likely aren’t really dedicated core. As I said, cores are expensive.

My point is you can’t buy a very cost-effective shared CPU plan and then complain you can’t use all the CPU anytime you want to.

Plex wasn’t designed to run in a VPS environment. If you want to run it on a shared CPU VPS plan, you can’t expect to transcode. Direct play works very well, as @jasanson says. If you need to transcode, buy dedicated CPU.

Daniel.


#65

I actually paid $119.99 for a year i.e $10 month for a KVM / X-LARGE but according to the SSD Nodes website what I am renting is an $80/month VPS server which is currently on sale at just $8.99/month. https://www.ssdnodes.com So forgive me my scepticism when I hear “What do you expect for $10/month?”. It is sold as an $80/month VPS & I expect it to perform like one otherwise the special offer price means nothing. It’s just another bit of hype like claiming that you get four CPU cores when all you get is the illusion of a four core CPU that never in any testing performs like a true four core CPU.

I thought that I was getting a really special launch deal & compared the offering with other hosts offering a VPS for $80/month. Was this all lies?


#66

That’s marketing my friend. You don’t get $80 a month for $8 a month. It’s a shared VPS and for $8 a month, you are not going to get dedicated performance.

soyoucanstart is $40 a month for a dedicated machine. That’s the cheapest I’ve found locally for me over the years and any other VPS isn’t going to give you dedicated performance.


#67

That’s not marketing. That’s lying. SSD Nodes are claiming that what they offer is an $80/month VPS that if you sign up quick you can get at a bargain price.For them to then come on this forum & say “What do you expect for $10/month” is disingenuous to say the least. Their claims for the value of their products are as wild as their claims for the performance of those products. If SSD NOdes don’t like legitimate customer complaints then they should stop overselling & overhyping their products.


#68

I live near an outlets. There is a store that’s seemingly always 60% off everything in the store.

At $80 a month, I can 2 dedicated machines at soyoucanstart so I’m doubtful that’s there actual price when the sale finishes.

If you want dedicated, you pay more.