| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Composition.MemoryPlan.Transient
Contents
Description
The transient memory budget: the live data metadata requests may hold at once, carved from what the collector can hold without strain.
A busy copying collector keeps about four times its live data, plus the nursery, so the live target is a quarter of the heap ceiling less the nursery. The idle process and the retained tenants come off the target first, and what remains is the budget the meter starts from. The sampler may raise it until charges and the live data it measures outside them reach a third of that heap, two thirds of the point where copying overflows.
Synopsis
- transientBudget :: Maybe Int -> Int -> Int -> Int -> TransientBudget
- renderTransientBudget :: TransientBudget -> Text
- brakeBounds :: TransientBudget -> BrakeBounds
- liveTargetBytes :: Int -> Int -> Int -> Int
- liveCacheShareBytes :: Int -> Int -> Int -> Int
- idleLiveFloorBytes :: Int
- transientFloorBytes :: Int
- noCeilingTransientBytes :: Int
- liveCacheSharePercent :: Int
- meterStepBytes :: Int
Documentation
transientBudget :: Maybe Int -> Int -> Int -> Int -> TransientBudget Source #
Resolve the budget from the heap ceiling, the capability count, the allocation area and the other tenants' bytes. With no ceiling the budget is a large constant the brake alone moves.
renderTransientBudget :: TransientBudget -> Text Source #
The boot line for the budget, with the arithmetic an operator needs to check it.
brakeBounds :: TransientBudget -> BrakeBounds Source #
The fixed bounds the sampler's brake steers the budget within.
liveTargetBytes :: Int -> Int -> Int -> Int Source #
The live target L for a heap ceiling: a quarter of the heap the nursery leaves.
liveCacheShareBytes :: Int -> Int -> Int -> Int Source #
The retained cache's share of the live target, so the cache alone cannot push the heap past it.
The starting constants
idleLiveFloorBytes :: Int Source #
The live data of a booted, idle process. The load test measures about 3 MiB, and the sampler's live correction takes any excess off the budget at run time.
transientFloorBytes :: Int Source #
The smallest budget, so a small pod still moves more than one request's entry step.
noCeilingTransientBytes :: Int Source #
The budget with no heap ceiling. Nothing bounds the heap, so only the GC brake moves it.
liveCacheSharePercent :: Int Source #
The share of the live target the retained cache may hold.
meterStepBytes :: Int Source #
The entry step and the unit a read pays in: one STM transaction per step.