Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

kde 100% CPU utilization - sound, networking, latency issues

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
dufeu
l33t
l33t
User avatar
Posts: 927
Joined: Fri Aug 30, 2002 2:59 pm
Location: US-FL-EST

kde 100% CPU utilization - sound, networking, latency issues

  • Quote

Post by dufeu » Wed Apr 20, 2011 5:07 pm

I've been trying to track down causes of kde 100% utilization issues:

Code: Select all

top - 10:59:03 up 1 day,  3:05,  8 users,  load average: 2.00, 2.06, 2.05
Tasks: 230 total,   1 running, 229 sleeping,   0 stopped,   0 zombie
Cpu(s): 48.2%us, 16.0%sy,  0.0%ni, 35.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8181288k total,  8107060k used,    74228k free,   688940k buffers
Swap:  4112636k total,        0k used,  4112636k free,  3841696k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                         
 3514 root      20   0  616m  31m  20m S  100  0.4  49:14.53 knotify4                                        
 3505 root      20   0  414m  26m  18m S  100  0.3  49:16.05 kded4
To that end, I've googled and searched the forums for clues.

Representative links:

Gentoo forums
In 'KDE 4.6' discussion thread (page 7)
kded4 hangs in pthread_cond_wait ()

KDE bugzilla
220047 - kded4 continually uses 100% of one CPU core
268038 - kded4 eating 100% cpu - ntrack related
253606 - knotify4 and "kdeinit: kded4" each consume close to 100% CPU after KDE startup until they are killed

When I read the various posts here, and including arch linux forums, kubuntu forums, kde bugzilla etc, it's apparent that the "problem" is .. let us say 'complex'.

Let's start with the fact that people are reporting widely different problems which can generally be attributed to some kind of 'latency'. i.e. stuttering sound, dropped connections (of all sorts), disk slow downs, periodic performance slowdowns. They then look for solutions which directly address their immediate problems without realizing that 100% cpu utilization introduces latencies. They try a suggested solution, reboot and everything seems fine .. until the problem crops up someplace else.

Let's move on to some of the other impacts.

For example, there is the issue of PCs unexpectedly shutting down. What's happening is that a single CPU core will be pegged at 100% utilization resulting in higher temperatures for that core to the point where your PC shuts down. The fact the PC protects itself is great. That there isn't any notice and there aren't usually any clues why is .. not so great. I suspect that these unexpected shutdowns are dependent on kernel version, kernel settings and number of cores when one of these 100% CPU utilization threads get invoked. Here is an example of 'top' on a 4 CPU core system with the '1' option on {to force display of all cores utilization}.

Code: Select all

top - 11:37:39 up 1 day,  3:44,  8 users,  load average: 2.00, 2.01, 2.05
Tasks: 225 total,   1 running, 224 sleeping,   0 stopped,   0 zombie
Cpu0  : 72.4%us, 27.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  : 15.7%us,  2.0%sy,  0.0%ni, 82.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 16.9%us,  3.3%sy,  0.0%ni, 79.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  : 69.4%us, 30.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8181288k total,  8116704k used,    64584k free,   691908k buffers
Swap:  4112636k total,        0k used,  4112636k free,  3798560k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                         
 3505 root      20   0  414m  26m  18m S  100  0.3  87:51.97 kded4                                           
 3514 root      20   0  616m  31m  20m S  100  0.4  87:50.84 knotify4
In this particular case, the kernel {2.6.38.2} isn't allowing a single core to be pegged at 100% but, instead, has forced the load to be spread somewhat around to the other cores. This will help prevent a single core from over heating. A kernel which permits pegging a single core or a 2 core processor would be more likely to overheat and shut down.

I have a two core PC which was shutting down unexpectedly. Now that I've upgraded it's kernel from {2.6.36.x} to {2.6.38.2}, it too is no longer overheating.

Based on my readings and personal observations, other areas impacted may be graphics behavior and X windows. Video playback in particular is subject to problems caused by latencies regardless of cause.

On all of my systems, I can guarantee invocation of kded4 100% CPU usage. Such invocation looks to require several circumstances before it happens.
  1. Either kded4 or knotify4 must be involved some way.
  2. There must be some error associated with the 'trigger'.
Example: the Weather Station widget is susceptible to this. This widget apparently makes use of knotify4. In my location, I point the widget at NOAA to get the weather information. When there are connection problems {NOAA isn't available for some reason}, then knotify4 can go into an apparent race condition resulting in 100% CPU utilization. Now .. is the problem with the widget? knotify4? ntrack? someplace else?

Example 2: On my main workstation, I have 10 desktops set up. On 6 of the desktops, I open a different web browser each. Each browser has multiple tabs. Opening all these web browsers almost immediately causes both kded4 and knotify4 to go into race condition resulting in 100% CPU utilization threads. I'm trying to track down where the 'triggers' are by opening one browser with one tab at a time. This is difficult because there are so many possible triggers. i.e. is there a problem with an Internet based resource not being available? a flash script problem? graphics driver issue? malicious website? multiple attempts to play sound {due to multiple embedded youtube or flash clips}?

Another related issue I've noticed is that, once started and without being in a 100% CPU utilization condition, neither kded4 nore knotify4 seem never to give up any memory they consume. I'm not yet certain they have memory leak issues. I just haven't observed any reduction in memory consumption. This includes no drop in memory consumption even after executing:

Code: Select all

# sync && echo "3" > /proc/sys/vm/drop_caches
I'd like to see this post made 'sticky' because:
  1. To help people realize that they may need to look a little further than might be immediately apparent at their problems.
  2. As a discussion point to consolidate kded4 and knotify4 issues.
  3. As a focus on finding things that 'work' to alleviate these issues.
For example, I can invoke at will these kded4 and knotify4 100% CPU utilization threads. But once so invoked, I haven't a clue to finding out what they are doing nor to finding out what the actual trigger was. I realize I probably need to set up for kde debugging, but even with the available Gentoo instructions, I still have problems doing this.

In the meantime, what works?
  • Eliminate all widgets requiring Internet access.
  • Open only what you actually need.
  • Keep track of what you have open in order to assist in tracking down problem causes.
  • Turn off functions in packages which need Internet access. {like CDDB for music players}
Some final notes/observations:

I have seen instances where, after logging out of my kde session, the kded4 process keeps running and never stops. Naturally, if you normally shutdown your PC through the kde 'stop' function, this would prevent shutdown from running to completion. Indeed, this condition may possibly cause manual shutdowns to hang.

If you kill one of these 100% CPU utilization processes using 'kill -9', you would be well advised to reboot.

(edit)
Comparative point of reference - This what 'top' looks like with just kde, konqueror {web mode with just gentoo tabs open} and ktorrent {no active torrents} running and with no 100% CPU utilization threads running:

Code: Select all

top - 14:46:14 up 1 day,  6:52,  8 users,  load average: 0.22, 0.62, 1.41
Tasks: 203 total,   1 running, 202 sleeping,   0 stopped,   0 zombie
Cpu0  :  2.3%us,  4.0%sy,  0.0%ni, 93.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.0%sy,  0.0%ni, 98.6%id,  1.4%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8181288k total,   739532k used,  7441756k free,    33628k buffers
Swap:  4112636k total,        0k used,  4112636k free,   161368k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                         
12244 guysuper  20   0  718m  97m  36m S    9  1.2   0:07.19 konqueror                                       
 2143 mysql     20   0  179m  28m 4584 S    0  0.4   0:55.65 mysqld                                          
 2763 root      20   0 40960  776  448 S    0  0.0   0:44.15 udisks-daemon                                   
11968 root      20   0  132m  42m  29m S    0  0.5   0:08.67 X                                               
12098 guysuper  20   0  434m  41m  30m S    0  0.5   0:01.67 kwin                                            
12138 guysuper  20   0  440m  38m  23m S    0  0.5   0:04.04 konsole                                         
12140 guysuper  20   0  678m 149m  37m S    0  1.9   0:04.71 ktorrent                                        
12267 guysuper  20   0 11036 1240  868 R    0  0.0   0:00.03 top
This sample is from the same system, same day as the posted 'tops' earlier in this post. The difference is that the kde session was logged off, the 100% CPU utilization threads manually killed, the kde session logged back on without opening firefox, seamonkey, chrome, opera and midori {i.e. - without opening web browsers except konqueror}.

That's it for now. Good luck!
People whom think M$ is mediocre, don't know the half of it.
Top
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

  • Quote

Post by acarstoiu » Thu Apr 21, 2011 2:46 pm

Can I add, without being too much off-topic, that there's another anomaly in top's output, namely two zombie kwin processes:

Code: Select all

10381 xyzuser  20   0     0    0    0 Z  0.0  0.0   0:00.00 10376 [kwin] <defunct>                                       
10523 xyzuser  20   0     0    0    0 Z  0.0  0.0   0:00.00 10376 [kwin] <defunct>
These show up even when kded4 does not "take ownership" of an alternating CPU core.

:twisted: ...I cannot help telling you that your signature should read "People who think..."
Top
MrZammler
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Tue Jun 24, 2003 7:12 pm
Location: The Island of Crete

  • Quote

Post by MrZammler » Sat May 14, 2011 8:16 am

I'm having the same problem on a clean KDE 4.6.2 install (amd64). kded4 will eat a cpu from time to time. I haven't been able to accurately reproduce, but I think it mostly occurs when I copy files with dolphin.

I've killed all instances, and currently have it on a terminal with:

Code: Select all

strace kded4 --nofork
Waiting to happen again so maybe I can trace the fault.
Top
dmpogo
Advocate
Advocate
Posts: 3717
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Mon May 16, 2011 2:31 am

thanks for the summary. Have problem with kded4 sometimes going into 100% CPU utilization as well. On rather stripped down kde-4.6.2 installation. amd64.
Actually, probably only on my laptop (has 2 desktops with KDE-4.6.2) as well
Top
MrZammler
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Tue Jun 24, 2003 7:12 pm
Location: The Island of Crete

  • Quote

Post by MrZammler » Mon May 16, 2011 8:38 am

Had the problem yesterday. It happened when I plugged and mounted a usb drive. Sadly killing and restarting with --nofork did not reproduce the problem.
Top
anonybosh
Guru
Guru
Posts: 324
Joined: Sun Nov 20, 2005 1:45 am

  • Quote

Post by anonybosh » Thu Aug 18, 2011 2:04 pm

I too have been having this issue for some time- both kded4 and kinit4 running away with the processor. I just kill them off whenever I find them sitting there eating CPU cycles.
Any new insights into this issue?
Top
Matteo Azzali
Retired Dev
Retired Dev
User avatar
Posts: 1133
Joined: Thu Sep 23, 2004 4:25 pm

  • Quote

Post by Matteo Azzali » Fri Aug 19, 2011 8:02 am

I remember having that issue months ago.
Key was that some service was not rebuilt after upgrading a dependancy, I can't remember perfectly what I did but I fixed so:
1) tracked down the offending service disabling them one by one.
2) rebuilt the chain of deps like soprano/akonadi-server (really, these two are nasty) etc.
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Top
Post Reply

7 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic