ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.MemoryPlan.Bounds

Description

Default tenant shares, computed bounds, and fallbacks without a heap ceiling.

Synopsis

Shares of the application heap

runtimeReserveShareDiv :: Int Source #

The divisor taking the runtime reserve off the ceiling. The GC and the RTS get a fifth of whatever the pod has.

runtimeReserveFloorBytes :: Int Source #

The smallest runtime reserve, so a tiny pod still leaves the RTS something to breathe with.

cacheSharePercent :: Int Source #

The cache aggregate's share of the application heap, the ceiling less the runtime reserve. The computed shares sum to under 100%, so a plan with no floor and no pin in it fits by construction.

publishSharePercent :: Int Source #

The publish aggregate's share of the application heap, and the computed request cap's.

queueSharePercent :: Int Source #

The memory-queue depth's share of the application heap.

mirrorArtifactSharePercent :: Int Source #

The mirror-artifact tenant's share of the application heap. It is the charged envelope, kept small so the background back-fill never crowds the serve hot path.

Byte floors, caps, and no-ceiling fallbacks

responseBytesFallback :: Int Source #

The metadata ingest ceiling, independent of the heap and CPU controls.

requestBytesFloor :: Int Source #

The smallest computed publish-body cap.

requestBytesCap :: Int Source #

The largest computed publish-body cap.

requestBytesFallback :: Int Source #

The publish-body cap a pod with no heap-ceiling datapoint gets.

cacheBytesFloor :: Int Source #

The floor keeps a pod that can afford one caching a useful working set. The shed ladder may still take the aggregate to zero.

cacheBytesCap :: Int Source #

The maximum computed aggregate for local metadata retention.

cacheBytesFallback :: Int Source #

The cache aggregate a pod with no heap-ceiling datapoint gets.

cacheEntryExpectedBytes :: Int Source #

Shared entry allowance (16 KiB), matching the present-selected base charge. Calibration and cardinality limits: PR #1469.

cacheEntriesFloor :: Int Source #

The smallest computed cache entry bound.

cacheEntriesCap :: Int Source #

The largest computed cache entry bound.

queueDepthFloor :: Int Source #

The depth the queue tenant sheds to, and the floor under any computed depth.

queueDepthCap :: Int Source #

The largest computed memory-queue depth.

queueDepthFallback :: Int Source #

The memory-queue depth a pod with no heap-ceiling datapoint gets.

publishAggregateFallbackRequests :: Int Source #

With no ceiling datapoint the publish aggregate falls back to a few maximum requests' worth of concurrent body room.

mirrorArtifactEnvelopeMultiplier :: Int Source #

The transient envelope one mirrored artifact holds, as a multiple of the buffered tarball B. The tarball, its base64 Text, and the publish document coexist at ~3.7x B, rounded up so the peak fits.

mirrorArtifactBytesCap :: Int Source #

The ceiling the plan clamps the computed artifact cap to, and the no-ceiling fallback. The charged envelope is therefore at most this times mirrorArtifactEnvelopeMultiplier.

Tenant charges

queueCharge :: Bool -> Int -> Int Source #

The bytes a memory-queue depth charges. Zero unless the memory backend runs.

fixedBufferBytes :: QueueTenantDemand -> Int Source #

The enqueue hand-off buffer, charged whatever the backend behind it.

anyMountMirrors :: QueueTenantDemand -> Bool Source #

Whether any mount mirrors, whatever backend carries the jobs. The enqueue buffer rides this.

memoryQueueCharged :: QueueTenantDemand -> Bool Source #

Whether the in-memory queue runs, so its depth charges the heap.