Bug 1331861 - [SHA256_Compress] CPU usage goes from ~17% to 80-150% when downloading files
Summary: [SHA256_Compress] CPU usage goes from ~17% to 80-150% when downloading files
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-29 20:42 UTC by Chris Murphy
Modified: 2016-05-02 19:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-02 19:58:53 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1246558 0 None None None 2016-05-02 19:58:53 UTC

Description Chris Murphy 2016-04-29 20:42:25 UTC
Description of problem:

When I click on a file to download, e.g. a Fedora installation image ISO, Firefox CPU load goes from the 10-20% range to 80+% topping out at 150% until the download is finished and then it goes back to 10-20%.

Version-Release number of selected component (if applicable):
firefox-45.0.2-1.fc23.x86_64


How reproducible:
Always, does not appear to be a regression


Steps to Reproduce:
1. Run top
2. Launch Firefox, note CPU usage
3. Start a file download, note CPU usage
4. Wait for it to finish or cancel the download, note CPU usage

Actual results:

Huge increase in CPU consumption only when downloading.

Expected results:

This shouldn't use much more CPU than using curl or wget.

Additional info:

I get the same results with a Mozilla tarball of Firefox.

I'm not sure what information to include to track this down. 'strace -p -ff -o' or maybe attach gdb, but I'm not sure exactly what to do there at all, but if I get some guidance I'll provide what I can.

Comment 1 Martin Stransky 2016-05-02 10:18:17 UTC
Yes, I can reproduce it. It really takes so much CPU.

Comment 2 Martin Stransky 2016-05-02 19:49:33 UTC
Looks like it's eaten by SHA256_Compress() which encrypt IPC communication between child download process and main firefox process. The load may depends on the actual download speed - bigger download volume may produce higher load.

Comment 3 Martin Stransky 2016-05-02 19:58:53 UTC
Let's track it upstream - https://bugzilla.mozilla.org/show_bug.cgi?id=1246558


Note You need to log in before you can comment on or make changes to this bug.