Skip to main content

TrafficSurgeScenario

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.

A service sized for normal_rate that receives surge_rate; latency in each regime.

Notes

Equation: The calculation members below define surge_factor.

Assumptions: normal_rate is positive and both rates count comparable requests.

Excludes: A latency prediction from the surge ratio alone.

References

Derivation: A service sized for normal_rate that receives surge_rate; latency in each regime. Each member records the corresponding algebra or named physics function.

Examples

Evaluate the named configuration and display a modeled result.

>>> from mlsysim import Scenarios
>>> case = Scenarios.RecommenderTrafficSurge
>>> value = case.surge_factor
>>> print(f"{value:.3g}")
10

Attributes

Name Description
normal_latency
normal_rate
surge_factor Surge arrival rate divided by normal arrival rate, dimensionless.
surge_latency
surge_rate

normal_rate

Type: Quantity.

Declared default: required.

surge_rate

Type: Quantity.

Declared default: required.

normal_latency

Type: Quantity.

Declared default: required.

surge_latency

Type: Quantity.

Declared default: required.

surge_factor

engine.scenario_types.TrafficSurgeScenario.surge_factor

Surge arrival rate divided by normal arrival rate, dimensionless.

Equation: (surge_rate / normal_rate).to('').magnitude.

Back to top