Closed Bug 1071411 Opened 10 years ago Closed 3 years ago

[e10s] Performance is terrible when CPU is under heavy load: experiment with boosting priority of content process

Categories

(Core :: DOM: Content Processes, defect, P3)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1522879
Tracking Status
e10s + ---

People

(Reporter: billm, Assigned: billm)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

STR:
1. Run something in the background that maxes out all CPUs.
2. Go to nytimes.com and try to scroll.

AR:
Tons of jank.

ER:
Scrolling is pretty smooth. This is what happens without e10s.

I know that Linux tries to give a higher priority to "interactive" processes. I'm guessing that the content process is not being marked as interactive. I suspect we might have a similar problem on Mac and Windows too.
Blocks: e10s-perf
Bill: is this bug a separate issue than the "general sluggishness" bug 1058859? Is this bug specifically about process priorities because the OS thinks the chrome process is "interactive", not the content process?
Flags: needinfo?(wmccloskey)
Yes, the purpose of this bug is to fix the process prioritization issue. We don't yet know what the cause of bug 1058859 is.
Flags: needinfo?(wmccloskey)
for testing on windows prior to thursday's triage.
Flags: needinfo?(jmathies)
Summary: [e10s] Performance is terrible when CPU is under heavy load → [e10s] Performance is terrible when CPU is under heavy load: experiment with boosting priority of content process
I ran into this (or something similar). Site is http://swainsworld.ghost.io/ebola/. I'm running Nightly 35.0a1 (2014-09-26) on a 64-bit 4 GHz 8 core AMD system with Fedora Linux 21 alpha. Scrolling was painfully slow with e10s enabled, so I looked at 'top' to see what was up. There was a process at the top called "Web Content" using 3 percent of one CPU. Remember, this is a 4 GHz 8 core machine and was mostly idle. So I restarted Nightly with e10s disabled and scrolling magically went back to normal.

There's not a lot of JavaScript on that site as far as I can tell. There's a Disqus commenting box and a few social media sharing buttons and some jQuery. The images are all 2D and on Amazon S3. I honestly don't know what takes 3% of a 4 GHz core to render / scroll that site. Are there some CPU/GPU decisions for 2D images in about:config I can play with?

If you want I can hunt down some JavaScript-heavy (Leaflet.js or D3) websites that might expose this further.
Performance isn't great on win under heavy cpu load. I see a lot of jank scrolling.

I took a preliminary look into process priority adjustment, afaict we set the content process for PROCESS_PRIORITY_FOREGROUND when we spawn it and never adjust after that. Here's the module - 

http://mxr.mozilla.org/mozilla-central/source/dom/ipc/ProcessPriorityManager.cpp
Flags: needinfo?(jmathies)
The same thing in W8.1-64bit too
I read a bit more about the Linux scheduler. You get more CPU if you haven't used much so far, which is supposed to prioritize interactive apps. So the problem there may actually be bug 1067135, which is that the content process eats CPU constantly.
Keywords: perf
Priority: -- → P3
Assignee: nobody → wmccloskey
Will this ever be looked at again? I run into something similar when streaming a video and downloading at the same time. The download will dominate the video stream. I have to open a separate browser to stream in when downloading big files in Nightly.

Andrew, can we resolve this ancient e10s bug as fixed by your process priority manager work for Fission?

Flags: needinfo?(continuation)

Well, my bug didn't really do anything to help this. I just fixed the regression from moving to Fission. But I think it is reasonable to dupe this to an existing bug on getting the priority manager working on Linux, given that the bug is talking about Linux.

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