Closed Bug 1095968 Opened 10 years ago Closed 3 years ago

medium CPU while idling?

Categories

(Thunderbird :: General, defect)

31 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: wsmwk, Unassigned)

Details

(Keywords: perf)

couple days ago, on laptop, 36.0a1 (2014-10-26) using 15-20% CPU.
no mail activity afack, nor indexing, nor moving progress bar.

http://people.mozilla.org/~bgirard/cleopatra/?1415376821103#report=ff32a9e58c98eda916e3cf5984e5cf032be754b7
(In reply to Wayne Mery (:wsmwk) from comment #0)
> couple days ago, on laptop, 36.0a1 (2014-10-26) using 15-20% CPU.
> no mail activity afack, nor indexing, nor moving progress bar.

If "check for new messages every NN minutes" is enabled, Tb communicates with server every NN minutes, even when new mail doesn't exist at mail server.
If automatic purge such as "delete mails by Retention setting" is enabled, MsgPurge checks mail folders periodically in order to do automatic purge job, regardless of existence of "mail which should be deleted".
If many mail folders have been opened while Tb is running, MsgDB(.msf file) of the many mail folders are closed while Tb is in idle. This is behavior from Tb 3. From Tb 3, msgDB is closed after threshold of inactivity period.
If PC goes into sleep mode, power supply to network adapter is usually stopped for power saving. This causes "going offline mode, then going back to online mode" when power supply to network adapter card is resumed by wake-up. This kind of events my invoke Tb's excess works for recovery from network failure.

Some simple methods to know "what Tb is doing while idling" :
(a) Use File Access Monitor Tool, and check Tb's file access while Tb is in idle.
      "What files are read/written by Tb" is a good information to know "What Tb is doing".
(b) If Win, NSPR log for ALL:5(or something) and NSPR_LOG_FILE=WinDebug, with DebugView installed/started.
      While Tb is active, stop Capture of DebugView. While Tb is in idle, start Capture of DebugView.
(c) Check difference between "Work Offline mode when you think Tb is in idle" and ""Keep Work Online mode when you think Tb is in idle". Network related activities can be ruled out by "Work Offline mode". If server access is relevant, imap:5, pop3:5 etc. is helpful. If server access is irrelevant, msgDB:5, msgpurge:5 etc. may be helpful.
(In reply to WADA from comment #1)
> (In reply to Wayne Mery (:wsmwk) from comment #0)
> > couple days ago, on laptop, 36.0a1 (2014-10-26) using 15-20% CPU.
> > no mail activity afack, nor indexing, nor moving progress bar.
> 
> If "check for new messages every NN minutes" is enabled, Tb communicates
> with server every NN minutes, even when new mail doesn't exist at mail
> server

This high CPU was consistent over a relatively long period with no incoming messages afaict, so CPU should be near zero.  Also, accounts are set to "Use IDLE".

profiler shows 75% of time spent in mozilla::widget::WinUtils::WaitForMessage(unsigned long).
Of the other 25%, 10% is in JIT.
Profiler lists no activity in POP or imap code.
Flags: needinfo?(vseerror)

Firefox 60.5.3 (latest) on W10 64 bits, plenty of RAM, SSD. AMD FS6300 6 core.
I have a few accounts, they are all set up for retrieving the emails every 5 or 10 minutes so the CPU should be flat. The mail databases have already been compacted.
I can see a permanent 8-10% of CPU used by TB which is by far the highest user. All the other process are flat. File flat, network flat. So just CPU used by TB.
An only extra plugin is a dictionary.
Whatever the selected email from mine, the same CPU.
Thanks

Env: thunderbird 60.8.0 (64 bit) on ubuntu 18.04 LTS - stock version, no additional ppa added. 2 IMAP account gmail, lightning and provider plugins installed.
When idle the process thunderbird takes about 10% of cpu of my 6-cores i7 / SSD / 16GB of ram causing fan to start, pretty much IMHO.
Is there any additional information, such as logs or reports, I can provide to help?

Luca, you'll want to use Thunderbird supplied downloads, not your distro download.

  1. Using Thunderbird 68 or newer - release or beta
  2. Install profiler add-on into thunderbird - get the add-on file from https://github.com/firefox-devtools/Gecko-Profiler-Addon/blob/master/gecko_profiler.xpi?raw=true and in Tools > add-ons click the gear to install add-on from file
  3. Follow instructions at https://profiler.firefox.com/ Also see videos, which are based on Firefox but equally applicable to Thunderbird.
  4. Create a profiler URL and post it here, along with a description of what/how you tested.

And backup your profile before testing.

Flags: needinfo?(vseerror) → needinfo?(luca.moscato)

Luca seems to be gone

If anyone still see this issue please file a new bug report.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(luca.moscato)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.