Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

Module churn

Module churn 

Source
Expand description

Fragmentation under churn: how a pool behaves when variable-length runs come and go.

Measured on the host with the synthetic workload of the churn_table test (256-page pool, runs of 2 to 40 pages uniformly, 4000 allocations per seed with random victims freed until each fits, averaged over seeds 1 to 8; this is a stress shape, not a game trace):

policyblocked by fragmentationmean free-space fragmentationmean pool use
first-fit1846 of 4000558 permille811 permille
best-fit1732 of 4000520 permille823 permille
first-fit + compaction0107 permille946 permille
best-fit + compaction0103 permille946 permille

Placement policy matters little; compaction (about 450 000 pages moved per 4000 allocations here) is what turns scattered free pages back into usable ones. That is why the engine compacts movable categories before it evicts, and why pinned and in-flight runs, which cannot move, are the cost.

Structs§

ChurnConfig
A churn experiment.
ChurnReport
What a churn run found.

Functions§

churn_report
Run the experiment. Deterministic for a given configuration.