Update on new Downloads feature

… after roughly 8 months’ uptime I just did a server reboot and now the CPU load is significantly higher than before as the server is transcoding TV episodes.

Your server and iOS longs don’t line up? Is your iPad in a different location than your server? Your server logs shows your iPad starting a Download at ~ 6am, but there is no matching Download in your iOS logs at that time.

Now that the server has been running for roughly an hour, the CPU load is back down to roughly 20% even though there are still multiple transcodes active.

Here are two new log files that were exported seconds apart.

PlexDebugInfo-8.5-3006 (2022-07-07 09.17.40 +0200).zip (3.0 MB)
Plex Media Server Logs_2022-07-07_09-17-54.zip (3.9 MB)

Looks like you restarted your server around 8 am local time. This time is within your butler schedule so it kicked off a bunch of background activities. My guess is one or more of these butler tasks was running causing the higher than expected cpu usage. It then finished/stopped and the load came back down.

Hi!

Ok… so the mystery is still why the transcodes don’t utilize more CPU power as it is obviously available. also, and this baffles me to no end: The transcoding only happens when my iPad is on and plex is running. I would have thought that the transcoding can happen in the background (on the server/RPi4) and then the transcoded content can be downloaded when the plex client (iPad) comes online…

All in all, this needs to be fixed… it’s been broken for a looong time. When can we expect a usable download function? A workaround could be the option to skip transcoding (at the user’s “risk”, the risk being that the item may not play…)…

Best regards,
Andrew

This is correct. Downloads is controlled entirely by the client app and transcodes are done on demand just like when streaming, except it can transfer faster since it isn’t based on watching the video. If you have a slow server like a Pi, I can see how that would be worse than if it transcoded ahead of time.

Downloads can lower it’s priority so if there are other things going on with PMS or your computer in general, it runs slower. A Pi already runs fairly slow so if it moves to the background, that could be really slow. Try changing your butler time so it’s not active when you are downloading. See if that is faster.

Thanks for getting back to me so quickly.

Streaming works fine - even at high bitrates. No problem at all. You just stated that download should be faster, but they are not; they are glacial. The server is never working hard. This is visible both in the PMS Dashboard and bei running (e.g.) htop on the Pi. It’s usually below 20%.

What is the butler and where to I tell it what to do?

I just started a stream (Quality: 28 Mbps, 1080p HD) and the server load went to ~40%. I regularly have multiple streams going (e.g. me on an iPad, someone else using an AppleTV) - never had any issues. I don’t think the Pi is the bottleneck.

The downloads feature still seems to be broken… no?

… edit: here’s a screenshot of the bandwidth and CPU load… the peaks in the CPU load correspond nicely to each time another chunk of video is sent out…:

… so the actual transcoding (if any is taking place) isn’t causing much CPU load…

1 Like

The Butler is the nickname for “Scheduled Tasks” You’ll find this on the left side of your Server settings. You can set when this runs. You cannot turn this off, it needs at least 1 hour of time.

Doesn’t matter if there is a lot of load, as long as there is some, the Downloads will become a background task and slow down. Please try when there is absolutely nothing going on with your server other than the Download. If it’s still slow, provide me new logs so I can check what’s going on.

So, if I set butler’s the start and stop times to 0:00 it will run all the time?

Her are the updated log files. The server isn’t doing anything except for transcoding and downloading episodes.
PlexDebugInfo-8.5-3006 (2022-07-09 12.13.15 +0200).zip (4.1 MB)
Plex Media Server Logs_2022-07-09_12-13-56.zip (4.4 MB)

Ok… again, I’m surely a bit of a noob with all of this, although I’ve been using Plex for something like twelve years. I used to host it on a Mac Mini (2010) - when that croaked, I switched to hosting on a Raspberry Pi4. The first time issues cropped up was when the new Downloads feature was introduced (and, for a while now, the constant iOS app crashes, but that’s a different discussion-thread).

However, I just made a slight “breakthrough”. If I go to the download settings in my iPad and set everything to “Original”, episodes download in no time flat. I probably should have thought of this before… sorry. The reason I would like to transcode the files for downloading to the iPad is so as not to consume as much storage space and have a larger ‘on-the-go’ library.

However, while he RPi4 is certainly not the best platform for transcoding video, if it Plex would utilize the CPU power it does have, I feel transcoding would be possible in a reasonable amount of time. Especially since streaming video (even while transcoding to low bitrates, e.g. when on weak (hotel-)WiFi) works just fine. Even if the transcoding took 1:1 to play time or was ‘only’ twice as fast as the time it would take to watch the episode, that would be fine. But it takes literally days for a single episode.

Can we investigate why this is the case? Or am I confusing something regarding converted streams and conversion for downloads?

Thanks for all your help!

Best regards,
Andrew

Looks like you are downloading multiple things at once. From a quick glance it looked like there were 6 active transcodes. Keep in mind that to transcode a file, PMS has to save the data to disk before it transfers it. In this case it’s reading and writing 6 files at a time. You are using the sd card for storage, right? These are not very fast and also are horrible at multiple read/write processes at the same time. This may not be your fault. PMS will transcode multiple files under 1 job so we may be hurting ourselves with that. Can you try just downloading 1 video.

Sorry for the delayed response - I’m currently travelling.

As you indicated, I have no influence over how plex handles the transcoding - I merely configure the show to download the next 3 (or 5) unplayed episodes.

The RPi4 uses an SSD as a harddrive, not the usual SD card. The media files are on a NAS connected through a wired network. As mentioned, streaming (multiple items) in real-time hasn’t been a problem.

I just checked and saw that at some point I moved the “Transcoder temporary directory” to the NAS in the hopes that this would improve things, but it didn’t. Also, I see that there is a setting for “Maximum simultaneous video transcode” which I have set to 1.

Here are some new log files:
Plex Media Server Logs_2022-07-13_05-05-27.zip (3.8 MB)
PlexDebugInfo-8.5-3006 (2022-07-13 05.05.24 +0200).zip (4.5 MB)

Here’s a screenshot of the transcoder settings (with the temp location set to a local folder):

… and a screenshot from htop showing something like 13 “Plex Transcoder” threads all churning away at the same media file (which I could see by scrolling to the right, couldn’t capture it in the screenshot):

I’ve never seen more “Plex Transcoder” threads in htop which makes me think that the setting to only transcode one file at a time was being respected. However clicking on the “Activity” icon (with the orange circle swooping around it) always shows a list of all the files currently being processed (currently one transcode and one download (same episode)).

Do you have an explanation why streaming works fine (real time or better) but transcoding takes such a long time?

Best regards,
Andrew

That setting is for streaming. Downloads is different. It can do 2 transcodes at a time. Transcoding is a multi-thread process so seeing multiple threads is expected even with just 1 file being transcoded. The main difference between streaming and downloading is that downloading has a lower priority. My guess is that Downloads thinks your computer is busy so it’s working slower than expected. I haven’t looked at your new logs yet. I’ll get back to you after I do.

Hi, if i download in original quality all works fine (IOS 15 and IpadOS15) but if I try to convert to low quality and low space :wink: the download failed (if the file is greater than 2GB). My workaround is optimize movie and download the previously optimized version… (adding it in other library because the download button cannot recognized the two versions…)

very sad, pay for plexpass, for application… and a basic and payed feature doesn’t work as expected…

1 Like

@kaladark Do you have hardware encoding enabled on your server? If so, turn that off and see if that fixes downloads. We have a fix for this coming out in the future but this will confirm if you have the issue I am thinking of.

I tried with hw encoding and without hardware emcoding with the same result :frowning: If i encoded a lot and the fina result is above 2GB there are no problem, but if tne encoded file is greater it fails.

On the plex server logs i see the percentage of download and stop randomly :frowning:

Do you mean below 2GB?

Sorry :wink: yes, file below 2GB download ok, aboce 2GB failed

Can you send me the log where the percentage stops?


The limit ob 2GB it’s aproximated… on my test all the files smaller than 2GB are ok but maybe it will be greater…

Server Version 1.27.2.5929 (Windows 11 and MacOS, tested with two servers with sam result)
Client version 8.5 IOS 15 and IPADOS 16 beta