Closed Bug 1706639 Opened 4 years ago Closed 4 years ago

Thunderbird uses much CPU while idle, NOT fixed by increasing mail.db.idle_limit

Categories

(MailNews Core :: General, defect)

Unspecified
Windows
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ariel, Unassigned)

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

I am a long time Thunderbird user, on 78.9.1 32-bit release channel when I started describing this issue, running on Windows 10 20H2 (Version 10.0.19042.928) with a Core i7-based computer with 64 GB of memory.
My inbox contains over 100,000 messages, but only approx. 20 folders.

Noticed for quite a while that Thunderbird would consistently take between 13% - 18% CPU while idle, as reported by Task Manager.

Today I followed the instructions in https://github.com/thunderbird-conversations/thunderbird-conversations/wiki/Profiling-Conversation's-Performance (although the "Publish" button mentioned there seems to have meanwhile been replaced with "Upload Local Profile" button, and then an "Upload" button, but that is not the reason I post this bug). Note I did not do anything within Thunderbird while creating this profile. The profile created while running idle can be found here: https://share.firefox.dev/3eiE92Y

After creating and publishing this profile, I followed the instructions in http://rainbow.chard.org/2013/02/19/thunderbird-high-cpu/ to change mail.db.idle_limit. It was set to 300,000 and I changed it to 30,000,000 (added two zeros). It did not make any difference.

I then restarted with Add-ons disabled, whereupon Thunderbird crashed. I submitted the crash report as requested by the popup (since this bug was still being edited, I unfortunately did not yet have a bug number to reference in the crash report). After the automatic restart, I again did a restart with Add-ons disabled (this time I got the expected "Running in Safe mode" message), but Thunderbird continued to use 13%-18% CPU while idle, thereby seemingly indicating that this issue isn't related to any Add-ons (and also not somehow related to the crash).

I then noticed there was an upgrade available, so I quit Thunderbird, restarted it, upgraded to 78.10.0, and restarted again.

After this upgrade, Thunderbird seems to behave and take very little CPU while idle: 0% with short spikes to 1%. I created another profile which can be found here: https://share.firefox.dev/3sCHa3s. Note that this was still with the setting mail.db.idle_limit set to 30,000,000.

Finally, I changed mail.db.idle_limit back to the default of 300,000. This did not seem to make a difference: Thunderbird still used 0% with reasonable "spikes" to 1%.

In accordance with what was written in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1305207: when changes to mail.db.idle_limit do not seem to change Thunderbird's behavior, to post a new bug, I am therefore posting this as a new bug to document this issue, even though it may seem that 78.10.0 resolved it.

Am happy to help test to try and figure out what causes/caused this issue.

Actual results:

While idle, Thunderbird continues to use 13%-18% CPU.

Expected results:

I would expect Thunderbird to use less than 1% CPU while idle, perhaps with some quick spikes.

Thanks. The new instructions are at https://support.mozilla.org/en-US/kb/profiling-thunderbird-performance

Yours is the second in the last few days where the profile doesn't appear to have useful information, i.e. the activity appears to be outside of Thunderbird - whether it's antivirus or hardware is TBD.

Please Start Windows' safe mode with networking enabled

... and get your performance profile from that point.

Also, please post your crash ID.

Flags: needinfo?(ariel)
Keywords: perf
OS: Unspecified → Windows

Thanks very much Wayne!

I am sorry to hear the profile doesn't appear to have useful information.
For what it is worth: I am running BitDefender as antivirus. Quite willing to temporarily uninstall it and use something else. BUT: I'd first need to have a reliable way to reproduce the issue.

Regarding restarting in Windows Safe Mode: I assume you want me to try and reproduce the issue under Safe Mode? That would require me to first downgrade Thunderbird back to 78.9.1 (as I wrote in the bug report, I upgraded to 78.10.0 and now the issue no longer occurs). Can I do that by uninstalling Thunderbird and then re-installing the older version, without losing the configuration?

The Crash ID/link to the crash report is: https://crash-stats.mozilla.org/report/index/f4aaffda-74dc-4fa1-b82c-7a7890210421

Thanks again,

Ariel

Flags: needinfo?(ariel)

No need to uninstall Bitdefender.
Windows safe mode is a much better test and far preferable

(In reply to Ariel Hershler from comment #2)

...
The Crash ID/link to the crash report is: https://crash-stats.mozilla.org/report/index/f4aaffda-74dc-4fa1-b82c-7a7890210421

Your crash is Bug 1638638 - Crash in [@ shutdownhang | RtlAcquireSRWLockExclusive | mozilla::detail::MutexImpl::lock | mozilla::detail::RunnableFunction<T>::Run]

But your previous crash was 24 weeks, 6 days ago, so clearly you don't crash often.

Thanks very much Wayne! Indeed, in general I am quite impressed and happy with the stability of Thunderbird.

I've downgraded to 78.9.1 and am now trying to reproduce the issue, without success so far.

(In reply to Ariel Hershler from comment #5)

Thanks very much Wayne! Indeed, in general I am quite impressed and happy with the stability of Thunderbird.

I've downgraded to 78.9.1 and am now trying to reproduce the issue, without success so far.

Thanks for the update.
Let's close WFM and if the problem reproduces in the future we can reopen this bug

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.