[Webkit-unassigned] [Bug 255923] New: [GLib] Choose amount of painting threads depending on available CPU cores

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 25 08:03:07 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=255923

            Bug ID: 255923
           Summary: [GLib] Choose amount of painting threads depending on
                    available CPU cores
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

In bug #253953 we enabled threaded painting by default for the WPE port,
and in bug #251977 for GTK port when using GTK4. Currently we are using
a single thread, but it may be desirable to make the choice a bit smarter
depending on the amount of available CPU cores.

I did some testing on a Raspberry Pi 4 (four cores), and the biggest
improvement was the change from no threading to one painting thread, then
the changes from 1-to-2 threads and 2-to-4 had less of an impact--but still
worth it. I also did some quick testing in an AMD Epyc box with 64 cores
and even with canvas heavy content couldn't notice any difference from
eight cores onwards; but of course in this case the fact that CPU frequency
is much higher probably is making each thread finish its work faster and
there are diminishing returns.

Probably a reasonable default that would not make WebKit hog the CPU
by spawning lots of threads would be to use half the number of available
cores, limiting the minimum to one and the maximum to eight.

-- 
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/20230425/582fdedf/attachment.htm>


More information about the webkit-unassigned mailing list