How to monitor where Thunderbird uses the CPU

User Help for Mozilla Thunderbird
Post Reply
paolo.gai
Posts: 3
Joined: May 7th, 2019, 1:46 pm

How to monitor where Thunderbird uses the CPU

Post by paolo.gai »

Dear all,

My current Thunderbird e-mail folders sums up to more than 500k e-mails, and I use Lighting with gmail.

It is common to see on Windows 10 my Thunderbird eating up 14 to 20% of the CPU while idle, which is a bit more than one core (my machine is an i7 with 4*2 cores), with no disk and no network reported.

Is there some way to understand what Thunderbird is doing during that CPU time? If there could be some log file or option to trigger in the configuration, to understand where it loops, I could report it to the development team...

Thanks,

Paolo
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to monitor where Thunderbird uses the CPU

Post by tanstaafl »

http://kb.mozillazine.org/Session_logging_for_mail/news

There is built-in support for logging various network protocols (POP3, IMAP, SMTP etc.) and for using the global search database but AFAIK nothing for CPU usage. Firefox has support for about:performance and about:memory but nothing for CPU usage. There is a Thunderbird add-on at https://addons.thunderbird.net/en-US/th ... ut/?src=ss that lets you use the various about: dialogs . https://developer.mozilla.org/en-US/doc ... t_protocol

I suggest you experiment with incrementally disabling (and then restarting Thunderbrid) several features such as "global search/indexing". Are you using a anti-virus scanner with either a proxy or an add-on (i.e. one that "knows" about Thunderbird mail rather than just viewing everything as files)? If you are I suggest you experiment with either uninstalling that software or seeing if the same problem occurs when you run windows in safe mode (which disables optional services such as anti-virus scanning).

https://wiki.mozilla.org/Thunderbird:Te ... e_Problems is a way to diagnose memory leaks but it could also be used to narrow down the culprit for excessive CPU usage. It is laborious though.

Are you using a POP or IMAP account?
paolo.gai
Posts: 3
Joined: May 7th, 2019, 1:46 pm

Re: How to monitor where Thunderbird uses the CPU

Post by paolo.gai »

Thanks for your feedback!

- I'm using 3 POP, and 2 IMAP, plus sync with 10 gmail calendars in Lighting

- I run Thunderbird in safe mode, and the usage of CPU was ok, plus the memory size was half (maybe it is ligthing taking a lot of ram)

- Despite reactivating everything, the issue did not appear again. I'll keep monitoring this, and if I find something i'llr eport it to this post.

Thanks again for all your support!

Regards,

Paolo
wsmwk
Posts: 2831
Joined: December 7th, 2004, 6:52 am
Contact:

Re: How to monitor where Thunderbird uses the CPU

Post by wsmwk »

Most performance issues aren't caught or visible via logging data. Plus, impossible for average user to determine via logging data.

Other methods..

On a macro level, Tools > Activity Manager shows account related activity.

At the code level, the performance profiler gives detailed information. Currently only runs in 67.0b3 (iirc) and current nightly 68.0a1. Instructions:
1. install profiler add-on into thunderbird from https://github.com/firefox-devtools/Gec ... i?raw=true
2. The follow instructions at https://profiler.firefox.com/ (videos BASED ON FIREFOX at https://profiler.firefox.com/docs/#/./videos-intro )
Last edited by wsmwk on May 14th, 2019, 10:18 am, edited 1 time in total.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to monitor where Thunderbird uses the CPU

Post by tanstaafl »

I added the info from the last post to http://kb.mozillazine.org/Performance_-_Thunderbird
wsmwk
Posts: 2831
Joined: December 7th, 2004, 6:52 am
Contact:

Re: How to monitor where Thunderbird uses the CPU

Post by wsmwk »

I forgot to say, that the profiler hasn't worked in several years, so it does not work in version 52 or version 60.
It currently only runs in 67.0b3 (iirc) and current nightly 68.0a1. I tested nightly a couple weeks ago, but have not tested 67.0b3
paolo.gai
Posts: 3
Joined: May 7th, 2019, 1:46 pm

Re: How to monitor where Thunderbird uses the CPU

Post by paolo.gai »

Thanks for all your posts. I have done some tests in the latest weeks, and surprisingly Thunderbird was somehow "quiet".

Then I set the option Tools/Options/Advanced/Network and disk space ---> compress folders if I can save more than 200 Mb.

And Thunderbird restarted full speed. I guess I have really too many e-mails and folders and the system is simply constantly trying to compact them.

I disabled that option, at least for now...
Post Reply