[Webkit-unassigned] [Bug 184261] [GTK][WPE] Memory pressure monitor doesn't reliable notify all the subprocesses

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 26 06:33:43 PDT 2018


--- Comment #8 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
(In reply to Carlos Garcia Campos from comment #7)
> I think we wanted a very efficient way of communication, assuming that if
> the system memory is growing too fast we need to react as fast as possible.
> Also to ensure that other IPC messages don't affect this one, if we had a
> way to set priorities. But we could try, we never measured anything after
> all.

So I have started to look at this and I have a WIP implementation of this.

But before continuing I wanted to be sure that delivering the events via IPC would not be a regression in terms of time to deliver the event.

So I benchmarked this.

I took a screencast of two webkitgtks running at the same time a stressful benchmark (JetStream) meanwhile the UIProcess delivers each 10 seconds a memory pressure event with both methods (current eventfd and WebKit's IPC).

Then I parsed the output generated, calculated time deltas, and got this numbers:

Current EventFD method (JetStream):

        Total seconds to deliver the 18 events: 30.873742
        Biggest deliver time : 5.472223
        Average of deliver time per event: 1.715208

WebKit IPC method (JetStream):

        Total seconds to deliver the 18 events: 33.386153
        Biggest deliver time : 4.851518
        Average of deliver time per event: 1.854786

If you are further interested, I shared all this data (including the screencast) at https://people.igalia.com/clopez/wkbug/184261/
I repeated this a number of times and the numbers vary a bit, but the difference between methods is more or less the same.

My conclusion is that it seems there is a small difference, and the eventFD method is a bit faster to be delivered. I guess that was already expected.

But the difference is really small, is not something that is going to make a difference in the real world I think.
Likely we can compensate this by tuning further the thresholds on the UIProcess WebPressure Monitor so it starts delivering events sooner.

So, I would continue with this patch to move the UIProcess WebPressure Monitor to use WebKit's IPC to deliver the events unless someone have a different opinion in the light of this data.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180426/a526c0e5/attachment-0001.html>

More information about the webkit-unassigned mailing list