On 01/06/2016 15:20, Jonathan Kew wrote:
Does this suggest that we're not sufficiently proactive about firing
memory-pressure notifications, so that we'll free up memory from various
caches, etc? It looks like we regard 128MB of available VM as "low" (see
[1]) on Windows 32-bit, but apparently we're liable to suffer small-OOM
crashes well before we reach that point. That doesn't seem like a
healthy balance.

Those values were set when the AvailableMemoryTracker was introduced 5 years ago [1]. I'd say we should probably revisit them especially in the light of these findings.

That being said in Firefox OS we employed memory-pressure notifications quite successfully to keep processes alive when memory was running low but we didn't rely on a single threshold because it didn't prove very effective. Instead we used a floating trigger which started at a certain level of free memory which once passed would trigger memory-pressure events. Once that happened we'd lower the threshold. If we hit this new threshold we'd fire memory-pressure events again, if not we'd try to raise the threshold again to the higher level. Exponential back-off was used to avoid having the threshold fluctuate too much between the two values.

Something similar could be implemented on Windows. If there's consensus I'm happy to look into it.

 Gabriele

[1] On Windows, fire a memory-pressure event when the amount of available virtual address space or physical memory is low
    https://bugzilla.mozilla.org/show_bug.cgi?id=670967

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to