wgpu
wgpu copied to clipboard
Very High CPU Usage with wgpu >= 0.20.0
Description There seems to be very high single-core CPU usage in versions of wgpu 0.20.0 and later.
Repro steps
- Run an example that requires regular redraws (for example,
skybox) in any version of wgpu before 0.20.0 and observe CPU usage. - Run the same example in wgpu 0.20.0 or later and observe much higher CPU usage.
Expected vs observed behavior
Attached is a video where I run the skybox example provided in the wgpu repo first with version 0.19.4, and then I run the same example again with wgpu 0.20.2, and then I run them both in the same order once again while keeping a CPU monitor open to observe the effects on CPU usage. Single-core CPU usage spikes to at or near 100% with wgpu 0.20.2 (and later). However, CPU usage with the 'skybox' example for wgpu 0.19.4 and earlier are at near idle levels.
Extra materials
The video I mention is attached below, as well as the first page of the perf reports for the skybox example for both wgpu 0.19.4 and wgpu 0.20.2 in human-readable plaintext format.
High_CPU_wgpu.webm
Perf_Report_wgpu-0.19.4.txt
Perf_Report_wgpu-0.20.2.txt
Platform Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-45-generic (64-bit) Graphics Platform: X11 Processors: 12 × 12th Gen Intel® Core™ i9-12900H Memory: 31.1 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3070 Ti Laptop GPU/PCIe/SSE2 System Version: REV:1.0