Bug 478974 - plasma-systemmonitor uses ~70% cpu on the overview page with llvmpipe graphics driver
Summary: plasma-systemmonitor uses ~70% cpu on the overview page with llvmpipe graphic...
Status: RESOLVED NOT A BUG
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.91.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-24 20:47 UTC by bjorn3_gh
Modified: 2024-02-01 16:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screenshot of the issue (85.88 KB, image/png)
2023-12-24 20:47 UTC, bjorn3_gh
Details
Hotspot analysis (682.68 KB, image/png)
2023-12-27 14:22 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bjorn3_gh 2023-12-24 20:47:38 UTC
Created attachment 164429 [details]
screenshot of the issue

SUMMARY
The system monitor uses ~70% of the cpu.


STEPS TO REPRODUCE
1. Download KDE Neon unstable 2023-12-24 (neon-unstable-20231224-1120.iso)
2. Run in a qemu vm with 4 cores and 4GB of memory and virtio-gpu graphics and KVM vm hardware acceleration: `qemu-system-x86_64 -cpu max -machine q35,accel=kvm -m 4096 -smp 4 -device virtio-net,netdev=net0 -netdev user,id=net0 "$@" -cdrom ~/Downloads/neon-unstable-20231224-1120.iso -chardev stdio,mux=on,id=char0  -mon chardev=char0,mode=readline -vga virtio`
3. Run the system monitor inside the vm.

OBSERVED RESULT
The system monitor uses ~70% of the cpu.

EXPECTED RESULT
The system monitor uses at most 1-2% of the cpu.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
https://bugs.kde.org/show_bug.cgi?id=475951 seems related, but that talks about cpu usage spikes, while for me it is consistently high cpu usage.
Comment 1 Nicolas Fella 2023-12-27 14:20:59 UTC
This happens when the llvmpipe graphics driver is used
Comment 2 Nicolas Fella 2023-12-27 14:22:46 UTC
Created attachment 164476 [details]
Hotspot analysis
Comment 3 Arjen Hiemstra 2024-02-01 16:44:26 UTC
The charts used by System Monitor use GPU based rendering, which means that LLVMpipe needs to emulate all the shader logic normally done by a GPU. This is pretty heavy for most CPUs, so you end up with a lot of CPU usage. There is not a whole lot we can do about that, as can be seen in the hotspot screenshot most of the time is taken by the LLVMpipe rasterizer.