Table of Contents

Class ResourceMonitorThrottle

Namespace
Qavren.Edge.Ingestion.Onnx
Assembly
Qavren.Edge.Ingestion.Onnx.dll

IIngestionThrottle over SP2's Read() (spec 10.2). The table below is evaluated top to bottom, first match wins, and every halving is clamped to MinBatchSize:

LastPressure == Criticalpause, memory:critical
AvailableMemoryBytes < 48 MiBpause, memory:floor
Thermal == Criticalpause, thermal:critical
Thermal == Seriousbatch / 2, delay 250 ms, thermal:serious
LastPressure == Moderatebatch / 2, memory:moderate
AvailableMemoryBytes < 96 MiBbatch / 2, memory:warn
IsLowPowerMode == truebatch = min(batch, 4), delay 100 ms, power:low
otherwiseproceed at the configured batch
public sealed class ResourceMonitorThrottle : IIngestionThrottle
Inheritance
ResourceMonitorThrottle
Implements
Inherited Members

Remarks

Unknown and a null memory reading are NO SIGNAL, which is proceed - never "fine" and never a pause. That mirrors EdgeResourceSnapshot's own contract, where every nullable member means unknown. The batch is derived from ConfiguredBatchSize, not from the current one: the runner already applies the lifecycle observer's shrink and takes the smaller of the two, so a throttle that halved the already-halved value would collapse to the floor on the second call. Evaluate(IngestionThrottleContext) never blocks; Read() is a one-second cached read.

Constructors

ResourceMonitorThrottle(IEdgeResourceMonitor, ResourceMonitorThrottleOptions?)

Creates the throttle.

Properties

Name

Appears in diagnostics as throttle.

Methods

Evaluate(IngestionThrottleContext)

Called before each document and before each write window. Must not block.