MPS issue job003700

TitleMemory returned to operating system too eagerly
Assigned userRichard Brooksby
DescriptionProfiling the MPS (see job003371 and job003674) shows that the MPS is spending a significant fraction of its runtime in mmap and munmap.
AnalysisThe MPS has a hysteresis mechanism (the "spare committed memory") but it was being purged at the end of each collection. When collections were rare, this didn't matter all that much, but these days we are seeing garbage collection frequencies of tens of times a second and the overhead is now significant.

Returning memory to the operating system over-eagerly has the following bad consequences:
1. the system call overhead;
2. it thrashes the operating system's backing store allocator;
3. it modifies the operating systems' page table unnecessarily, and so thrashes the TLB;
4. mapping memory requires the operating system to zero it (for security reasons) which would be unnecessary if the memory was retained and re-used.
How foundmanual_test
EvidenceSee description.
Created byGareth Rees
Created on2014-03-17 13:48:54
Last modified byGareth Rees
Last modified on2014-03-17 13:49:12
History2014-03-17 GDR Created.


Change Effect Date User Description
184359 closed 2014-02-17 17:05:37 Richard Brooksby Merging spare-ring branch into master, from //