Closed Bug 1277120 Opened 8 years ago Closed 6 years ago

high cpu usage while downloading files or stream data

Categories

(Core :: Networking, defect, P3)

46 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: u572625, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: power, stale-bug, Whiteboard: [necko-backlog] [Power])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160502172042

Steps to reproduce:

downloading files or streaming data


Actual results:

Cpu usage is very high in compare to other browsers
especially under linux but also under windows
Severity: normal → major
Keywords: power
OS: Unspecified → All
Hardware: Unspecified → All
Priority: -- → P1
Did you test with a fresh profile?
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(jonnyshome.frutti)
sure i did
Flags: needinfo?(jonnyshome.frutti)
timse201 - a lot of times this kind of issue is more specific to a particular site or url than you think. Can you please provide details on where you see this? That will remove the risk of it just being closed as worksforme when we test something different.

also, please define very high. Is it totally consuming a CPU core during the transfer or is it just higher than your baseline? They point at different issues. Again, thank you.

Daniel, can you do a sanity test and re-triage based on what you see?
Flags: needinfo?(daniel)
Whiteboard: [necko-active]
win 10, intel 4970k and a intel i218 nic, internet speed is 50mbit:
cashkurs.com: 8-10% cpu usage from firefox - only downloading video (video stoped manualy and uses html5)
youtube: same range if video data is downloading in the background - if not its down to 1-2%

downloading different files from different platforms i get 9-10%
(looks like 4 cpu cores are used)



results with ubuntu 16.04 are more or less the same but the range is 11-12% (all 4 theoretical cpu cores are used)
intel 4500u and a intel 7260 wlan adapter, internet speed is 50mbit
thanks for the update. looks like a possible optimization rather than busy wait - good to know.
Flags: needinfo?(daniel)
Whiteboard: [necko-active] → [necko-backlog]
Blocks: 1038527
Blocks: 971269
Whiteboard: [necko-backlog] → [necko-backlog] [Power:meta]
Whiteboard: [necko-backlog] [Power:meta] → [necko-backlog] [Power]
(In reply to timse201 from comment #0)
> downloading files or streaming data

Is this issue reproducible when you're using the downloader and not displaying the file in any way?
dont know what you exactly mean but:
if i dont display or open the download manager i have 9-10% cpu usage
if i open it cpu usage is 1% higher than i dont open the download manager (gpu acceleration is active under windows)
if i choose open with in the download dialog - no difference to just downloading it
did some additional testings after ff48 seems to reduce the cpu usage a little bit 

file testet http://releases.ubuntu.com/16.04.1/ because large file and constant download rate
50mbits

edge no august update
constant 2% (normaly ~1,24 1,28 with some spikes to 1,8ghz)

firefox 48
consistant 13,14% (4hgz)

nightly 20160802030437
consistant 13,14% (4hgz)

tested on http://www.heise.de/download/product/ubuntu-22040/download
cpu usage dropped to 3% with spikes to 5 and 6%

on ff47 it doesend matter where the file came from

cashkurs now at 16-17%

so are there some server related settings how files are send out that gets firefox to generate higher cpu usage?
limited my internet connection
seems like the cpu usage increases rapidly with a download speed higher than 17-20mbits

since ff48 i also have problems with videos that are fully downloaded in the beginning. often while it downloads with 50mbits the video stucks
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3
After some further testings i think it is caused by tls

an first improvement was made by bug 868948
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.