Skip to main content

TailEventRateScenario

Serving scenarios · Implementation: mlsysim/engine/scenario_definitions/serving.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

How often an event of probability event_probability per request occurs at request_rate.

Notes

Equation: Expected events per second=request_rate*event_probability.

Assumptions: A constant mean request rate and a probability applicable to each request.

Excludes: Event clustering, confidence intervals, and severity of an event.

References

Derivation: Linearity of expectation gives the mean number of qualifying requests as request count times the per-request event probability. Applying the same product to the request rate gives events per second without assuming independent event timing.

Examples

The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.RecommenderTailEvents
>>> round(scenario.events_per_second, 6)
1000.0

Attributes

Name Description
event_probability
events_per_second Expected event frequency in 1/s: request arrival rate times event probability; this is a mean, not a tail-latency bound.
request_rate

request_rate

Type: Quantity.

Declared default: required.

event_probability

Type: float.

Declared default: required.

events_per_second

engine.scenario_types.TailEventRateScenario.events_per_second

Expected event frequency in 1/s: request arrival rate times event probability; this is a mean, not a tail-latency bound.

Equation: (self.request_rate * self.event_probability).to(‘1/second’).magnitude

Back to top