CPU hog in Windows 10

UNCONFIRMED
Unassigned

Status

Calendar
General
UNCONFIRMED
2 years ago
a year ago

People

(Reporter: Ryan Johnson, Unassigned)

Tracking

(Depends on: 1 bug, {perf})

Lightning 4.0.5.1
x86_64
Windows 10

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

Click on any part of TB to give it focus (e.g. clicking on a not-selected account or trying to type in a message window), then alt-tab away to the task manager and watch what happens. Or, just wait around and let TB start chugging away for no good reason at all.


Actual results:

On my two-core laptop the usage meanders around between 14% (1/3 CPU) and 65% (1 1/3 CPU) for the next 30 or 40 seconds. There are no animations showing, no indication that TB is doing anything, but CPU is super high and typing is super laggy.

A 20-second Cleopatra profile taken during the CPU usage spike shows the following:

100% - Startup::XRE_Main
 -> 54% - NtWaitForMultipleObjects
 -> 41% - Timer::Fire
      -> 35% - nsJSContext::RunCycleCollectorSlice

I don't remember this being a problem before I upgraded from win7 to win10, and it's been a consistent problem ever since the upgrade. 


Expected results:

CPU should only be busy if TB is actually doing something useful.
(Reporter)

Updated

2 years ago
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
(Reporter)

Comment 1

2 years ago
It seems that restarting TB helps a bit: the CPU spikes are less frequent, less intense, and shorter. But after a few hours the problem is back. 

Memory footprint might be part of the issue here, it was nearly 800MB just before I started profiling, compared with only 220MB after restarting.

Comment 2

2 years ago
Need URL for your profile.
Also, does this happen with all addons disabled except profiler?
Flags: needinfo?(scovich)
Keywords: perf
(Reporter)

Comment 3

2 years ago
Unfortunately, I can't seem to find the profile anymore. I restarted TB to disable plugins, and there doesn't seem to be a way to enumerate profiles that were taken in the past. If there's a way to dredge those up let me know.

Meanwhile, I've been running 24h now with all plugins disabled, can't repro. TB has a 210MB RAM footprint. 

I suspect that memory fragmentation and GC issues are the issue here, and the only non-trivial plugin I was running is Lightning (the others were tiny things like key rebinding, disabling click-to-sort on the mail column headers, etc.). I can only go so long without my calendar anyway, so I'll re-enable that one plugin and see if that brings the problem back.
Flags: needinfo?(scovich)

Comment 4

2 years ago
(In reply to Ryan Johnson from comment #3)
> Unfortunately, I can't seem to find the profile anymore. I restarted TB to
> disable plugins, and there doesn't seem to be a way to enumerate profiles
> that were taken in the past. If there's a way to dredge those up let me know.

I'm checking.  but not optimistic.


> I suspect that memory fragmentation and GC issues are the issue here, and
> the only non-trivial plugin I was running is Lightning (the others were tiny
> things like key rebinding, disabling click-to-sort on the mail column
> headers, etc.). I can only go so long without my calendar anyway, so I'll
> re-enable that one plugin and see if that brings the problem back.

thanks. please do
Flags: needinfo?(scovich)
(Reporter)

Comment 5

2 years ago
Heh. I tried to re-enable profiling and was unable to reach my newly profile, but the original one was still there. http://people.mozilla.org/~bgirard/cleopatra/?1457226183126#report=1f858b29d08a38660cadbe6dac6f0db0a12c3ec1

Meanwhile, having Lightning enabled did seem to increase memory usage. After 24h or so it had bumped memory usage to 350MB or so, and there were hints that the CPU hog behavior was returning (albeit still on a smaller scale than what the above profile measured).
Flags: needinfo?(scovich)

Comment 6

2 years ago
50% in cycle collector nsCycleCollector::collectSlice is consistent with high memory usage.

Other calendar memory issues http://mzl.la/1L9BoQq
Component: Untriaged → General
Product: Thunderbird → Calendar
Version: 38 Branch → Lightning 4.0.5.1

Comment 7

2 years ago
Does starting Windows 10 in safe mode help the performance issue?
Flags: needinfo?(scovich)
(Reporter)

Comment 8

2 years ago
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #7)
> Does starting Windows 10 in safe mode help the performance issue?

Sorry, I won't be able to try that. I use this compute for work and the bug takes a day or two of normal computer use to manifest. Nothing happens if it just sits idle for 48 hours over the weekend.
Flags: needinfo?(scovich)

Updated

2 years ago
See Also: → bug 686495

Updated

a year ago
Depends on: 683651
You need to log in before you can comment on or make changes to this bug.