Open Bug 1115139 Opened 10 years ago Updated 1 year ago

Scale free pool minimum size with heap size

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

People

(Reporter: terrence, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

The allocations we make when tenuring are some of the most likely to OOM. We are more likely to OOM when our runtime is close to the memory limit because (1) there is less memory available and (2) that runtime is likely to be allocating heavily. The semi-obvious solution is keep more pre-allocated chunks in the free pool, so that memory is more likely to be available during minor GCs and hopefully make the first OOM happen on a malloc, where we can recover, somewhat.
This will probably work even better if we make the empty chunk pool global as well.
Depends on: 988356
Can we guarantee that at the start of any GC, we have enough memory reserved to finish that GC?
(In reply to demiobenour from comment #2)
> Can we guarantee that at the start of any GC, we have enough memory reserved
> to finish that GC?

For a minor GC we may need to allocate as much heap as the size of the nursery.  We cannot guarantee this short of pre-reserving all this memory (which can by up to 16MiB).  But that just moves the OOM somewhere else and wastes memory when it's not needed.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.