NicolasConstant / sengi

Mastodon & Pleroma Multi-account Desktop Client
https://nicolasconstant.github.io/sengi/
GNU Affero General Public License v3.0
524 stars 34 forks source link

Sengi using too much CPU #570

Open PhMemmel opened 1 year ago

PhMemmel commented 1 year ago

I installed sengi on latest Ubuntu 22 and discovered that sengi is using between 80% and 120% CPU constantly without even doing anything or even the window being focused.

This happens in all different setups I tried:

NicolasConstant commented 1 year ago

Hi! Sorry for that.

Can you give me a bit more information to help me find the source of the issue? What is your hardware (CPU/GPU/RAM)? How many accounts/timelines do you have loaded up in Sengi and what kind of content seems to be there (text only, images, gifs, videos, etc)?

PhMemmel commented 1 year ago

Thank you for your fast response, I will try to provide what you asked for: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 32GB RAM It's dual graphics: 1) onboard: Intel Corporation HD Graphics 530 (rev 06) 2) NVIDIA Corporation GM107M [GeForce GTX 950M] (rev a2)

I just did a ps auxw when running sengi from snap, maybe the parameters will help you.

MYUSER        4993  0.7  0.3 4675008 128848 ?      Sl   14:45   0:01 /opt/Sengi/sengi
MYUSER        5169  0.0  0.1 212164 45588 ?        S    14:45   0:00 /opt/Sengi/sengi --type=zygote --no-zygote-sandbox
MYUSER        5171  0.0  0.1 212164 45784 ?        S    14:45   0:00 /opt/Sengi/sengi --type=zygote
MYUSER        5182  0.0  0.0 212164  7844 ?        S    14:45   0:00 /opt/Sengi/sengi --type=zygote
MYUSER        5365 13.2  0.3 620868 127452 ?       Sl   14:45   0:30 /opt/Sengi/sengi --type=gpu-process --field-trial-handle=12894598731949095784,14923472996393130595,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --gpu-preferences=MAAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAQAAAAAAAAAAAAAAAAAAAACAAAAAAAAAA= --shared-files
MYUSER        5402  0.2  0.2 287640 66156 ?        Sl   14:45   0:00 /opt/Sengi/sengi --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=12894598731949095784,14923472996393130595,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --lang=de --service-sandbox-type=network --shared-files=v8_snapshot_data:100
MYUSER        5443 96.2  1.1 5033940 381520 ?      Sl   14:45   3:42 /opt/Sengi/sengi --type=renderer --force-color-profile=srgb --field-trial-handle=12894598731949095784,14923472996393130595,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --lang=de --app-path=/opt/Sengi/resources/app.asar --no-sandbox --no-zygote --background-color=#131925 --enable-websql --disable-electron-site-instance-overrides --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=4 --no-v8-untrusted-code-mitigations --shared-files=v8_snapshot_data:100

This is the output when having the home timeline plus 4 additional timelines for four hashtags open. CPU load about 90 to 120% percent all sengi processes together. If I remove all timelines, it drops to about 30%. After adding Home plus another 2 again load goes back to 80 to 120%. Only pics and text, no videos or gifs visible.

All the time only one account was active.

Let me know if I can help you out with even more information.

NicolasConstant commented 1 year ago

Thanks! If its even occurring without any timeline, and without heavy content like video, it's a bit strange.

Can you check in the console (Ctrl+Shift+I) if you can see any weird message?

PhMemmel commented 1 year ago

I played around a little bit more and switched to dedicated graphics mode only, so now the whole desktop is running on the dedicated nvidia card with latest proprietary drivers.

Starting sengi now fails completely with [5062:0421/091620.434799:FATAL:gpu_data_manager_impl_private.cc(442)] GPU process isn't usable. Goodbye. and memory dump unless I start it with --no-sandbox. In this mode CPU usage still is as high as before, the terminal from what I started sengi says [6548:0421/091720.145100:ERROR:gl_utils.cc(316)] [.RendererMainThread-0xb623173d300] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete..

Sengi console (Ctrl+Shift+I) is empty, no errors, warnings whatsoever.

PhMemmel commented 1 year ago

Installed latest version from snap, CPU usage is now much lower, still about 30% when idling, but in general definitely better.