-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Permanent CPU load when nothing is happening #4459
Comments
The scenario you mention - how many messages from the server were processed? And then, what happens to CPU usage after a couple minutes? I would expect relatively high CPU usage after startup, as things are being loaded and run for the first time, but then things would settle down. |
I started measuring only after things settled down. So there are no messages received at all, as far as I can see. Even now, 12h later (I had Signal minimized all the time), when I un-minimize it, I get 50% load. |
@RalfJung Can you talk a little more about your hardware, the details of how CPU usage changes? Do you use disappearing messages heavily? Are a lot of messages showing when CPU usage is high? Or does it even happen in an empty conversation? Then, what kind of CPU usage do you see in Chromium? Does it also use a lot of CPU to render a web page? |
Not sure what to say here... cpuinfo says "Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz", I have 4 physical cores and hyperthreading (so 8 logical cores). CPU usage of the signal process changes from basically nothing to 40-50% when I un-minimize Signal.
I don't use disappearing messages at all. The number of messages that show are what fits on my screen (1920x1200px)... around 10 I'd say. I tried various different conversations, and that seems to have no effect. But what I just noticed is that when I scroll down in the conversations list on the left (but leave the active conversation on the right the same), the load goes away. So it seems to have something to do with that list.
I don't use Chromium. But I use vscode, another electron app, and while it sometimes has background load, it is not nearly as high as Signal's. Also the fact that scrolling down makes the load go away IMO demonstrates that this is a Signal issue. |
The more you can narrow down exactly what UI elements are causing this, the more it would help us. I see that you're not using the beta - you could set up a second instance on that same machine via the beta, and do some experiments. It would really help. Thanks! |
I've been seeing this as well. After the Signal app has been open for a while, my computer will often become bogged down with low CPU resources and checking the process manager Signal is taking 100% CPU. I'm running 1.34.5 in Linux on Chrome OS. I have a Core i7 Y-series CPU, plenty powerful for bursts of short loads, but really can't handle sustained heavy CPU loads well. I don't use disappearing messages at all either. My 12" screen can show 5-10 messages in a conversation at once. Seems like most of the time I've seen this happen was after I'd had the app open and received a bunch of messages, mostly in one single conversation, during the day. |
I see it happen even when I restart Signal -- i.e., when there are no new messages and Signal runs in a fresh instance. |
I intermittently see the same behaviour here - 12-15% CPU - with a one-to-one conversation open, with a conversation that has no history, a relatively quiet group of three people, with note to self and with the chat window closed via Ctrl-C. None of the conversations have any recent reactions, animated media or stickers. Kubuntu 20.04 LTS using Signal 1.36.1-beta.2, 2.6GHz Intel Core i5. |
@ProactiveServices if we could get a look at your log, that would help us determine if Signal is doing any work in the background during that time. |
I've also captured a 60s performance profile from the devtools, if that'll be helpful - if so do I need to anonymise any of the data present in it? |
@ProactiveServices My understanding is that the only identifiable information in those kinds of performance traces are the screenshots. They can be really useful to help track things down, of course. But then again we're not interested in relating your log to user action, but inaction. I don't think we need them. Please feel free to send your log to one of us directly, or to support. Thanks! |
I'm getting a constant 5% CPU usage in v1.37.2 on Kubuntu which I found is due to a link preview in one recent message. Clicking on another contact with no messages made it go away but that's temporary. Deleting the message with the link stopped it. There should really be an option to turn off previews. |
@kentchristopher Is there anything else you can tell us about the link preview contents? Was there perhaps an animated gif included? Was it a disappearing message? Anything else out of the ordinary? |
@scottnonnenberg-signal, no animated gif, not a disappearing message - just a URL, this one in case you want to try to replicate. |
Debug log from Signal 1.39.4-beta 1, Kubuntu 20.04.1. The only activity, since it was idle, has been a small number of messages in a V2 group of three members. The problem is recurring multiple times a day, only way to solve it seems to be to frequently close and re-open. |
I seem to always have 5% CPU usage. Even when the application is minimized. Maybe this is related to #4883? Somewhat unrelated: I also have about 600mb of memory usage, which seems extremely high considering I only have about 5 people I talk to on this app. Probably less than 500 messages in total. |
@kaimast a debug log may be of assistance for diagnosis. |
Debug log for the issue in 1.40.0-beta4 |
Lets maybe just wait until Signal has been ported to Electron 11 (or 12). My hope is that some of the performance issues will be resolved then. |
Here's my log on 1.40 https://debuglogs.org/f6158dd159e830e0598e444c15ad6506df5364771c5e8c340f7f4f1631265f8b It seems to be even worse now? About 10-12% CPU usage. |
FWIW I can only reproduce this when animated stickers are on screen. It's pretty clear when you display a sticker sheet and everything starts to slow down in Signal. Happens in Linux/macOS. Using the web dev tools profiler clearly shows that the CPU keeps waking up to loop the animated GIF. If I hide or destroy the HTML element, the CPU goes idle, almost to 0%. Same happens if I switch to a plain text conversation, 20-30% CPU whenever GIFs are in screen. As others have suggested in other reports similar to this one, minimizing Signal drops the CPU use too. I'd argue this is clearly a limitation of whatever the shipped Electron is doing. Maybe it's failing to detect GPU acceleration? Maybe it's built with less than ideal build options? I don't know, but I can confirm positively that GIFs trigger this issue. Similarly, on mobile, stickers algo make Signal crawl, specially if you have many packs installed. My hot take is that GIFs shouldn't loop forever, but stop after X loops (which I have no clue how to measure on pure HTML/JS, but I guess there are npm modules for that?). There are some hacky approaches like using I'd maybe articulate a possible solution as: "Make animated stickers loop only X times, and only play when visible" -- Would something along these lines be considered an acceptable change @scottnonnenberg-signal? See similar: #3997 |
I almost never receive animated stickers or pictures and end up with 20-40% CPU usage after about 15 minutes of use, often with only a handful of text messages received. |
@diegoe Yeah, I think that'd be a fine PR. Do note that with our scroll virtualization, scrolling up and down, or even resizing the window horizontally, would likely reset the timer. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@joshgoebel Many thanks for that investigation - we'll get a fix out soon! |
Does anyone know if this happened? I couldn't find it in the commit history. EDIT: found it: 6b66dad. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still happening every day on 5.63.0-beta.1. |
@ProactiveServices Can you be more specific about what is still happening? |
I get about 2.5% CPU usage even when no chat is selected (signal just shows contact list and "welcome to signal" screen) |
Still the same behaviour as per #4459 (comment) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
it's not that bad as in previous versions but it's still not good. the app is running in the background, nothing happens. CPU usage and memory consumption is IMHO pretty high. the following screenshot shows not a peak but a constant load:
btw: |
I'll put this comment here but maybe I should open a new issue. Signal on windows uses a large amount of CPU/GPU when the window is visible. This CPU usage shows up under Desktop Window Manager, not the Signal exe itself. It also shows a spike in GPU usage. I think this CPU usage is hard to detect via Task Manager. It may bump up Desktop Window Manager a little but it seems to really kill anything that is relying on max resources. I was streaming God of War, which absolutely HAMMERS the cpu/gpu, given it nowhere reaches the framerate cap, whilst streaming it to Twitch, which also uses a lot of resources. The game was about 20fps lower than it should be (50fps when I expected 70fps) and the stream was choppy and unwatchable. I poked around for a while and the second I minimised the Signal window, it shot back up to 70fps and worked perfectly, despite the fps being capped at 80fps which it never reaches, so it's always using max system resources. I use Signal to talk to literally two people, and send/receive maybe 30 messages per day total. I barely use it at all. But some part of it jams my system up. |
FWIW: I use Signal desktop, installed as flatpak, on a Librem5 phone and read "Ctrl+Shift+c will close the current conversation and reduce idle CPU usage significantly". Unfortunately, I cannot easily test if this is true, because there is no menu option to close the conversation, and I do not know how to press "Ctrl+Shift+c" on the keyboard of the Librem5. However, I do know for sure that when I have Signal running, the battery of the phone is way faster empty than when not having Signal desktop running. |
See also issue #5444. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to inactivity. |
Hey, this was marked as stale and then closed... but the issue is still present for me (fixed by closing conversation): 6.26.0, nixOS |
The issue has been around for a long time, I don't think it's unique to signal either, there seems to be an issue with windows when anything is animated on the screen within certain apps. I've seen it in Streamlabs OBS as well - as soon as you cover up the animated part, CPU usage drops massively. In streamlabs case, it was a tiny animated dot showing there was a new option in a menu. Even covering it with another window would fix it. I believe it's related to this. |
This was fixed recently for me (see issue #5444) but I see high CPU usage again starting a few days ago. I observe the same behavior as you describe: when I close all conversations it is virtually 0 but with a conversation open it's about 50% constant usage. |
for me the high cpu load is fixed and not an issue anymore in the "current" snap release.
|
It looks like the snap version is quite outdated though. I am using the version on flathub, which is the most recent release (6.26). |
I can confirm, but this is a new issue. You should probably be watching #6544 instead. There's not much point in discussing it here. |
heavy cpu load after upgrade signal desktop (snap) from v6.20.0 to v6.26.0 in xubuntu 22.04.2 lts: this happens after starting and opening an existing a conversation. cpu usage is low direct after start showing the welcome message. i will revert to v6.20.0 now, because in v6.26.0 the tray icon is still missing. |
We've made a change to improve this in the latest beta - please consider installing it and seeing if it improves CPU usage for you: https://support.signal.org/hc/articles/360007318471-Signal-Beta |
Bug Description
After opening Signal-Desktop, even when nothing is happening in the open conversation (no animation or disappearing message or anything like that), there is a 50% load (meaning 50% of one CPU core) permanently. Only minimizing the window makes that load disappear.
This issue was reported before (#3904), but that one was closed with a fix claimed for v1.33. However, that fix does not seem to help here (and others are reporting the same in that issue).
Steps to Reproduce
Actual Result:
The process manager (
htop
in my case) show 50% CPU load (this is relative to 1 core).Expected Result:
There should not be noticeable load when nothing is happening.
Platform Info
Signal Version:
Operating System: 1.34.5
Linked Device Version: 4.64.5
Link to Debug Log
https://debuglogs.org/436ed8e435336c02cf3c19ab6bd5b7fdbd3bfb3f5738de984fe5ca568b79480b
The text was updated successfully, but these errors were encountered: