Open Bug 1943810 Opened 11 months ago Updated 11 months ago

(very large array) Parallel marking is not being used in this demo despite 100ms+ marking slices

Categories

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

enhancement

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files, 1 obsolete file)

Attached file index.html (obsolete) —

I have modified the original testcase at https://github.com/cceckman/fiona
I changed the following :

Unmodified: let count = Math.round(canvas.height * canvas.width * load)

Modified: let count = 1000000 *Math.round(canvas.height * canvas.width * load)

Open the attached modified testcase

AR: https://share.firefox.dev/42vJZJe
See that there is no use of background parallel threads to do marking

Attached file fiona-main.zip

Unzip and use this.

Attachment #9461765 - Attachment is obsolete: true

You can reduce the multiplication factor by 10 to test because the current value leads to OOM very quickly.
Alternately, try opening the testcase in a background tab. That seems to slowdown the memory increase.

See Also: → 1943811
Attached file about:support

If you reduce the javascript.options.mem.gc_parallel_marking_threshold_mb = 1 , then we do see some parallel marking. Though the number of thread used is 1, despite me setting it to 8.

https://share.firefox.dev/4h9qcUl

There are two things here.

Firstly the testcase has a few very large arrays. We don't parallelise marking of individual arrays. It might be possible to do this with some extra work but it's not that likely to pay off since I think cases like this are fairly rare for normal web content.

Secondly the fact that we don't use parallel marking for this case with current settings is because the memory threshold is based on GC heap usage which doesn't count the contents of the arrays. We can fix that fairly simply.

After looking at the profiles, we spend more time in GC with parallel marking running. This is because this case doesn't actually parallelise at the moment.

Severity: -- → N/A
Type: defect → enhancement
Priority: -- → P3
Summary: Parallel marking is not being used in this demo despite 100ms+ marking slices → (very large array) Parallel marking is not being used in this demo despite 100ms+ marking slices
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: