TieredCacheScenario
Data scenarios · Implementation: mlsysim/engine/scenario_definitions/data.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A fast tier in front of a slow one: a stated hit rate, or capacity over a uniformly sampled corpus.
Notes
Equation: Compose mlsysim.solvers.TieredCacheModel.
Assumptions: A stated hit fraction overrides capacity inference; otherwise accesses are uniform over nonoverlapping corpus parts.
Excludes: Capacity-derived hit fractions are not clipped here, and eviction policy or locality is not simulated.
References
Derivation: this scenario binds its input fields to the referenced implementation contracts: mlsysim.solvers.TieredCacheModel. The methods below identify any additional arithmetic.
Examples
>>> from mlsysim import Scenarios
>>> case = Scenarios.HotTierCacheExample
>>> round(case.hit, 4)
0.95Attributes
| Name | Description |
|---|---|
| corpus_bytes | Total stored size of the named corpus parts. Equation: sum of corpus_parts.values(). |
| corpus_parts | |
| hit | Supplied hit fraction, or uniform-corpus capacity fraction when absent. Equation: |
| hit_rate | |
| hot_bandwidth | |
| hot_capacity | |
| miss_bandwidth | |
| miss_penalty | |
| result | Evaluate this scenario through mlsysim.solvers.TieredCacheModel.solve. Equation: |
hit_rate
Type: Optional[float].
Declared default: None.
hot_capacity
Type: Optional[Quantity].
Declared default: None.
corpus_parts
Type: Optional[Dict[str, Quantity]].
Declared default: None.
miss_penalty
Type: Optional[float].
Declared default: None.
hot_bandwidth
Type: Optional[Quantity].
Declared default: None.
miss_bandwidth
Type: Optional[Quantity].
Declared default: None.
hit
engine.scenario_types.TieredCacheScenario.hit
Supplied hit fraction, or uniform-corpus capacity fraction when absent. Equation: hit_rate else hot_capacity / corpus_bytes. Units: dimensionless; the capacity estimate assumes uniform access and is not clipped here.
corpus_bytes
engine.scenario_types.TieredCacheScenario.corpus_bytes
Total stored size of the named corpus parts. Equation: sum of corpus_parts.values(). Units: bytes; the parts must be nonoverlapping.
result
engine.scenario_types.TieredCacheScenario.result
Evaluate this scenario through mlsysim.solvers.TieredCacheModel.solve. Equation: pass the stated fields to that implementation; its contract defines the calculation and feasibility tests. Units: each returned field follows the referenced result schema; no independent equation is evaluated by this wrapper.