MPS issue job003674

TitleHysteresis overwhelmed by allocation
Statusclosed
Priorityessential
Assigned userRichard Brooksby
OrganizationRavenbrook
DescriptionProfiling "djbench mvt" on Mac OS X shows 5% of time is spent in mmap/munmap, even though djbench is just churning allocation rapidly. Increasing ARENA_INIT_SPARE_COMMIT_LIMIT in config.h from 10MiB to 100MiB cures this.
AnalysisThe VM arena implements some hysteresis on VMMap by retaining "spare" (free but mapped) pages. The MPS implements a tuning interface for this with mps_arena_spare_commit_limit_set() but it's in terms of a fixed size, as is the default, currently 10MiB. This doesn't scale.

The hysteresis should be expressed as a proportion or overhead, so that it can scale up with MPS memory usage. In addition, it's possible that there ought to be more hysteresis when pages are being turned over rapidly, perhaps by having some kind of half-life on the spare pages, so that periods of rapid churn don't overwhelm even that.

GDR 2014-02-03: this was previously reported as job003371.

GDR 2014-03-17: see also job003700.
How foundmanual_test
EvidenceSee description for repro.
Created byRichard Brooksby
Created on2014-01-31 12:53:24
Last modified byGareth Rees
Last modified on2018-08-13 13:55:48
History2014-01-31 RB Created.
2014-02-03 GDR Cross-reference job003371.
2014-03-17 GDR Cross-reference job003700.

Fixes

Change Effect Date User Description
194962 closed 2018-08-13 13:55:47 Gareth Rees Merge branch/2016-03-04/spare-fraction into the master sources.
184359 open 2014-02-17 17:05:37 Richard Brooksby Merging spare-ring branch into master, from //info.ravenbrook.com/project/mps/branch/2014-01-25/spare-ring/...