Closed Bug 1812267 Opened 1 year ago Closed 1 year ago

Parallel marking performs worse on some non-parallelizable workloads

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When running microbenchmarks I've found that parallel marking performs worse than single threaded marking for some non-parallelisable workloads, and the performance gets even worse when more than two threads are used.

For example, marking a single array of 2000000 strings takes ~15% longer with two threads and ~80% longer with four threads.

Such cases are unlikely to dominate marking time in the browser but are still a concern.

Assignee: nobody → jcoppeard
Severity: -- → N/A
Priority: -- → P3

Currently non-parallelizable workloads can perform worse with parallel marking
enabled, particularly with more than two threads. This is because we end up
stealing very frequently when there is no advantage to doing so and this
interrupts marking progress.

I tested several approaches to fixing this but the one that worked best was
simply to disallow stealing from very small stacks.

Depends on D167783

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e4ed68012454
Don't allow parallel marking to steal from very small stacks r=sfink
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: