Bug 115331

Summary: kmail taking 60%+ CPU cycle
Product: [Applications] kmail Reporter: Mathieu Jobin <opensource>
Component: IMAPAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bjoern
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: lsof -p `pidof kmail` | grep index
lsof without grep

Description Mathieu Jobin 2005-10-29 18:35:58 UTC
Version:            (using KDE KDE 3.4.92)
Installed from:    Gentoo Packages

I think this is new bug since 3.5, but maybe last few 3.4.x always had same problem. but I definitely remember having this problem at least since 3.5alpha up to now with beta2.

simply, my kmail is always staying on top of my top ;)

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
11518 somekool  16   0 68356  44m  30m R 84.5 11.8 596:32.88 kmail

scanning something at interval but high cpuload almost at all time. you'd say that my instance is running for a long time maybe, but it does start from the start when I login in kdm. also something I quit kmail, but a process is still running, ... high.

that could be related with the fact I have an addressbook stored on a kolab ressource. because I have one. I also have MANY imap/dimap accounts.

I think it's worth investigating before 3.5 release.

thank you.
Comment 1 Andreas Gungl 2005-10-29 22:16:02 UTC
Please try to find out if your KMail is compiled with support for indexlib. 
This could explain the intervall issue, because KMail would work to create 
the full text index.

Also, if index files are corrupted, regeneration takes some time for folders 
containing lots of messages. Can you try to find out which files are 
manipulated by KMail when the load is so high?
Comment 2 Mathieu Jobin 2005-10-30 01:32:37 UTC
I don't have indexlib support, I remember seeing the message at the end of the configure saying dependency not found and I have not found the lib in the gentoo KDE port tree :( I wish, I had indexlib ;)....

if you still think it is scanning for files/folder, how can I tell you more about which files are manipulated ?

Comment 3 Andreas Gungl 2005-10-30 02:03:39 UTC
Try
   lsof -p `pidof kontact` | grep index
or
   lsof -p `pidof kmail` | grep index
to list the files.
Comment 4 Mathieu Jobin 2005-10-31 23:53:10 UTC
Created attachment 13237 [details]
lsof -p `pidof kmail` | grep index
Comment 5 Mathieu Jobin 2005-11-15 06:11:07 UTC
Created attachment 13460 [details]
lsof without grep

ok, here is another one...

kmail is having fun alone on my computer I'm not even using taking I/O and CPU.

i guess kmail should not be running 24/7 but still...


enjoy.
Comment 6 Volker Lukas 2005-11-19 17:17:19 UTC
Since this Bug is in "Unconfirmed" state, I would like to state that I see this issue too.

I use Kmail from KDE 3.5, of the Suse rpms for Suse Linux 9.1, which were released on 2005-11-17. With this version, Kmails responsiveness is bad when there is an IMAP account configured. Switching between mailfolders seems to take longer than with prior KDE version and when checking for new mail, the progress indicator at the bottom right of Kmail shows slow progress. Access to the IMAP account is delayed for a long time (up to minutes) while Kmail shows a screen with the message "Retrieving Folder Contents - Please wait...". The bad responsiveness is accompanied by high CPU usage (Top indicates up to 90% or more). The CPU usage is however not continuously high: After some time of inactivity, i.e. no user intervention and the progress bar is not changing, it drops to "normal" levels. A probably noteworthy moment of very high CPU usage is when terminating Kmail via clicking the close button. After the Window disappeared, Top shows a running Kmail for multiple seconds (more than 15), while indicating over 90% CPU usage.

Contrary to the case with an configured IMAP account, on the same machine running the same Kmail version under a different user account without an IMAP mailbox, responsiveness seems like with older Kmail versions, in conjugation with significantly lower CPU usage. And specially, after closing such an Kmail instance, Top shows Kmail terminates almost immediately.

Comment 7 Imre PĂ©ntek 2005-12-29 17:49:05 UTC
I don't know why, but this bug isn't present in my kmail any more...
Comment 8 Volker Lukas 2006-03-23 13:08:08 UTC
Configuring the IMAP-account to show only subscribed folders (Menu: Settings -> Configure KMail... -> Accounts [Name of IMAP account] -> Modify -> Show only subscribed folders) makes the symptoms go away.