[KDE 3.1.1] kded.exe incessantly browses thru file systemwhenidling - high cpu usage for nothing

David Fraser davidf at sjsoft.com
Wed Sep 3 12:55:57 CEST 2003


Ralf Habacker wrote:

>Hi,
>
>
>  
>
>>The first symptom was a high CPU usage of ~30% when KDE just sat on
>>the screen idling. Looking into that, I found out piece by piece:
>>
>>	1) AntiVir Guard consumed ~10% kded.exe the rest; Antivir
>>could be turned off. Its statistics showed...
>>	2) a constant flurry of file accesses in the
>>c:\cygwin\opt\kde3 tree.
>>    
>>
>
>thanks you for pointing it out.
>
>  
>
>>You can find a series of 2500 entries at my website (about 2
>>complete cycles):
>>http://straw.gmxhome.de/samples/kde-cygwin/kde-filemon1.log.txt
>>
>>********************************
>>
>>
>>AFAICT the same subtrees are re-visited endlessly at top speed<g>
>>consuming ~20% of CPU power (1GHz P-III) :-<<
>>
>>    
>>
>
>kded scans directories for new or changed files.
>You can get more informations if you do an strace on an running kded.exe.
>Try the following sequence (you need an installed grep and gawk) :
>
>strace  --pid=`ps -ea | grep kded | gawk '{print $1 }'`| gawk '$6 ~
>/^[a-zA-Z0-9:]+$/ { print $0 }'
>
>On my system I got the following repeated output
>
> 1019 1416425 [main] kded 2328 lstat64: entering
>  929 1425820 [main] kded 2328 lstat64: entering
>  916 1435174 [main] kded 2328 lstat64: entering
> 3573 1451222 [main] kded 2328 ioctl: fd 4, cmd 4004667F
>  135 1451538 [main] kded 2328 ioctl: returning 0
>  739 1953313 [main] kded 2328 lstat64: entering
>  745 1962823 [main] kded 2328 lstat64: entering
>  728 1971543 [main] kded 2328 lstat64: entering
> 1062 1980927 [main] kded 2328 lstat64: entering
>  790 1989464 [main] kded 2328 lstat64: entering
>  754 1998708 [main] kded 2328 lstat64: entering
> 1323 2008086 [main] kded 2328 lstat64: entering
>  612 2019817 [main] kded 2328 lstat64: entering
>  913 2028319 [main] kded 2328 lstat64: entering
>  974 2037425 [main] kded 2328 lstat64: entering
>
>If you get a different output, please let me know.
>
>Ralf
>
>_______________________________________________
>kde-cygwin mailing list
>kde-cygwin at mail.kde.org
>http://mail.kde.org/mailman/listinfo/kde-cygwin
>
>  
>
Just for interest I went browsing the KDE source. This seems to be done 
in the KDirWatch class declared here:
http://lxr.kde.org/source//kdelibs/kio/kio/kdirwatch.h
and defined here:
http://lxr.kde.org/source//kdelibs/kio/kio/kdirwatch.cpp

The comments in the header explain how it works. Presumably since FAM is 
not available it does the polling option; there's meant to be a 
POLL_INTERVAL that defines how often to do that, so either this is not 
working or it needs to be increased

David





More information about the kde-cygwin mailing list