New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage when idling if port mapping is enabled #2589
Comments
Anything in the logs? Could be background tasks, thumbnail image extraction, etc |
CPU usage has been on that level since upgrade, that's a few days now as I was early adopter and helped with testing of 10.5.0. Logs are pretty much empty, no scanning is going on in background.
|
I have the same problem. Since I updated Jellyfin in idle state it consumes 10% of cpu. The time now is 18:49 and the last log is in the startup phase of the container at 18:16, there are no active processes yet, but the processor consumes 10%
|
Same here, my CPU is always between 10-15% even more in idle. I have OpenMediaVault and I am receiving all day al different times warnings that my cpu usage is been too high for too much time. |
Try to UNCHECK the "Networking->Allow remote connections to this Jellyfin Server " option, if you dont need the remote access or done it by nginx. Works for me. |
when the docker image upgrade to 10.5 version. the server has some problem. but at that time, i am already stop plying and close the web client. but the ffmpeg decoding thread still running and using much CPU resource. #system information#
|
Yes, this actually worked. CPU usage when idling went down to >0.2% |
It works for me too, but now I can't connect to my jellyfin anymore outside of my network using domain name. It says "Forbidden". I'm using traefik as my reverse proxy too. Any idea? |
Hmmmm this bug just became extremely interesting. |
So main culprit is the remote connection handling. But I checked Secure connection mode to |
I've was working on documenting the networking options yesterday and I from what I can tell here are the two things that the 'allow remote connections' option controls:
It's possible, that UPnP is causing this, it does some work in the background on a timer. Maybe someone with this issue can try enabling remote access again, then setting |
It's work!!! |
Wow it works.. Disabling |
We really should default "automatic port mapping" to "disable". The concept itself is just so... wrong (not in JF, but in general in UPnP). |
Yeah, I had Jellyfin 10.5.5 doing similar. It would MAX one or sometimes even two cores on my CPU and just hold them there. Just disabling uPnP didn't do it for me, but keeping that off and also disabling all DLNA features did. Jellyfin is now using only about 100MB of Ram, and next to no CPU. So, I would highly recommend giving that a try for anyone that can live without them. Hmm, okay.. I was wrong, after a day or so it is back to maxing out 2 cores of my CPU all the time again. |
Can confirm that I've had this in jellyfin (docker), but my htop indicated the builtin ffmpeg was the one hogging 5-10% cpu constantly, which striked me as weird, because (A) I wasn't using the server at the time and (B) all image extraction / chapter image generation had been disabled. Would have never thought this was UPNP related. Disabling automatic port forwarding made the cpu usage go away. Might be related (though not the same project, of course): Plex at one point had an issue with their builtin UPNP client hammering miniupnpd somewhere in the network, pegging one core at 100% constantly too. |
I have the same exact issue as you, but im unable to fix it by disabling remote conections |
Also disabled all DLNA settings and automatic port mapping, anyone tried anything else? My Pi4 has always one core at 100% constantly when Jellyfin container is running, even if its idling with the ffmpeg process, Its only happening with 10.5.5 |
Have you restarted jellyfin since changing that setting? That was necessary for me to resolve the issue. (JellyFin in Docker) |
I did and it solved the issue momentaneously. After some minutes it starts using one core intensively again. |
I can confirm this as well. Unchecking "Enable automatic port mapping" on the Network settings reduced CPU usage from around 10-15% to essentially 0% |
So now we have some reports that this is the fix and one report that this is only a temporary fix, I wonder if there's some other variable at play here. |
Okay, i can confirm that the only way for me to workaround this is to rollback to 10.4.X Releases... |
Jellyfin 10.5.5 in docker on Ubuntu 20,04 host. I am glad I found this issue. It was bugging me why I was seeing high load on this server the last couple times I was remoted in or using an app hosted on it. I actually just was messing around with different hardware and was dismissed to the new hardware. My server load went from 12-13 to 0.2 when changing Enable automatic port mapping under Networking. Will monitor for changes. |
Is the cpu as the same level? |
Also if you enable debug logging for Mono.Nat or Mono.Nat.Searcher then it should show you if uPNP is the culprit as it now has logging. |
I just upgraded from 10.5.5 to 10.6.0 on Arch Linux. This is an actual install without Docker. CPU was constantly between 10-15% even when idle. I've got the following checked, which I'm 99% sure was the default:
I changed |
See above. The PR's are waiting for review and were not included in 10.6. There's also an additional PR #3529 which filters the SSDP broadcast so should reduce processing. I haven't been able to reproduce this problem at my end. Have you got many SSDP devices on your network? |
I just ran tcpdump to check. I've probably got about 60 IPs assigned on my network. The majority of the port 1900 traffic is between Jellyfin and my HDHomeRun. Broadcasts are basically non-existent, so not much in the way of SSDP broadcasts. |
@NearlCrews - are you able to do custom builds, and would be willing to try PR #3339? As i haven't been able to reproduce this issue, i can't say it's a 100% guaranteed fix - but it does have detailed logging - so should be able to tell us what's happening even if it doesn't fix the issue. |
I can confirm this behaviour as well. |
@BaronGreenback I can spin up a VM and give it a shot later. I don't have an easy way of doing it on my existing build. Let me take a look later today and I'll get back to you. Thanks again! |
Can confirm this as well - Odroid N2 and Jellyfin doing nothing was at ~10% load all the time. Disabling automatic port mapping and it disappeared from top output (v 10.0.6.5.). |
Oh dear lord THANK YOU. |
Seems te issue came back on 10.7.1-1.... |
We haven't made any fixes for it. Are you saying that the issue was gone in 10.7.0? |
Yea, rolling back to 10.7.0 fixed the issue, probably is not dealing with DLNA |
I am also having this issue (on version 10.7.5). Just recently I had to cut the power to the server, because it sat at 400%cpu usage on a ryzen 2700x, and thus became unresponsive to ssh commands. At other times, it was using ~40% idle. Disabling automatic port mapping and restarting seems to have fixed it for now. |
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. |
I believe this issue is still relevant - could replicate using Docker image (0aa773b67433), deactivating DLNA server fixed the issue. |
None of us can replicate it though, so it's unlikely to be fixed |
Version 10.7.7 doesn't seem to have any of this issue for me. I do get
fairly high cpu usage during a media scan, but any other time cpu and
memory are idle now, and not PEGGED at 100% like prior.
Hope this helps,
Harley
…On Mon, Nov 8, 2021 at 3:58 PM Claus Vium ***@***.***> wrote:
None of us can replicate it though, so it's unlikely to be fixed
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2589 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDAAV6S3A3OVA7KEFENMZTULBBYTANCNFSM4LG6ULQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Checked my cpu usage today, around 10% idle, used method provided before : "Networking->Allow remote connections to this Jellyfin Server " option : Uncheck This is already done by nginx, still working. Now idle usage is around 0.01%. One of my lowest service, was the first one before... Curious. Thanks for the tips. |
It would be helpful if you could all provide some more information about your systems (server, router, network etc.). I am still unable to replicate it. |
Beginner here but will try my best : System os : Open Media Vault 5 If you have more question, I will try my best to answer. English is not my main language, I hope I'm understandable. |
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to contact us. |
This issue was closed due to inactivity. |
Describe the bug
Since 10.5.0 jellyfin has higher CPU usage even when not being used.
System (please complete the following information):
To Reproduce
docker stats
https://gfycat.com/gravehelpfulconch
Expected behavior
When jellyfin isn't used, CPU usage should not be that high
Logs
Nothing is logged when CPU has high usage and no client is using jellyfin
The text was updated successfully, but these errors were encountered: