Summary: | [patch] kmix consumes too much CPU while idle | ||
---|---|---|---|
Product: | [Applications] kmix | Reporter: | Nick Hibma <nick> |
Component: | general | Assignee: | Christian Esken <esken> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | avilla, finex, vasilis.tsolis, zanetu |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Nick Hibma
2009-09-02 22:50:16 UTC
I've tried with 250ms. Kmix now uses about 6Mb instead of 12Mb of memory and the sliders are immediatly updated when other apps modify the volume levels. I think 250ms could be a good compromise. Increasing the value didn't free more memory. Maybe you could commit the patch to the reviewboard. Just to second this bug. Kmix seemed to be 600mb! KMix has adaptive polling now. KMix polls with 500ms normally. When changes were detected, it uses 50ms for 5 seconds. After that KMix reverts back to 500ms. SVN commit 1246048 by esken: FEATURE: 206051 Save battery power and CPU cycles by adaptive polling (500ms normally. And 50ms during changes). U mixer_backend.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1246048 SVN commit 1248123 by esken: CCBUGS: 206051 Be extra defensive: Don't accidently start timer when polling not required. M +2 -0 mixer_backend.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1248123 SVN commit 1248126 by esken: CCBUGS: 206051 Be extra defensive: Don't accidently start timer when polling not required. M +2 -0 backends/mixer_backend.cpp M +1 -1 core/mixer.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1248126 I did some extra research with the "powertop" utility, using 4 installed soundcards: Before the path KMix was responsible for 10-20% of all wakeups. After the path KMix was responsible for 0.7 - 3% of all wakeups. I consider this is still too much, even though it would be 1/4 of the measured values for users with only 1 soundcards. I changed the slow-polling from 500ms to 1500ms, which leads to a mesured 0.1% wakeup rate (0,6 wakeups per second). I'll commit this change soon. For the records: Using the ALSA backend, KMix isn't even shown in the "powetop" list, and "top" lists KMix at the very bottom - which means it uses least of all the user processes. SVN commit 1249692 by esken: CCBUGS: 206051 Change polling rate from 500ms to 1500ms. This leads to an acceptable measured (powetpop) wakeup rate of 0,6 wakeups per second for those backends that require polling. M +8 -4 mixer_backend.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1249692 |