ScalabilityLawScenario
Agents scenarios · Implementation: mlsysim/engine/scenario_definitions/agents.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Relative capacity N / (1 + sigma (N - 1) + kappa N (N - 1)) over integer worker counts.
Notes
Equation: The calculation members below define capacity, best_workers, peak_capacity, continuous_peak, retrograde_threshold, first_slower.
Assumptions: Contention and coherency coefficients define the stated USL capacity curve over positive worker counts.
Excludes: Fitting coefficients to measurements or extrapolation guarantees outside the selected range.
References
Derivation: Relative capacity N / (1 + sigma (N - 1) + kappa N (N - 1)) over integer worker counts. 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.RepairPartitionScalability
>>> value = case.best_workers
>>> print(value)
6Attributes
| Name | Description |
|---|---|
| best_workers | Integer count maximizing relative capacity within the search limit. |
| capacity | Relative capacity by integer worker count via calc_universal_scalability_law. |
| coherency | |
| contention | |
| continuous_peak | Continuous optimum via calc_usl_optimal_concurrency, distinct from integer search. |
| first_slower | First enumerated count above one with capacity below baseline, or None if absent. |
| peak_capacity | Largest dimensionless relative capacity among enumerated worker counts. |
| retrograde_threshold | Worker threshold above which USL capacity falls below the one-worker baseline. |
| search_limit |
contention
Type: float.
Declared default: required.
coherency
Type: float.
Declared default: required.
search_limit
Type: int.
Declared default: required.
capacity
engine.scenario_types.ScalabilityLawScenario.capacity
Relative capacity by integer worker count via calc_universal_scalability_law.
Calculation: mlsysim.physics.performance.calc_universal_scalability_law.
best_workers
engine.scenario_types.ScalabilityLawScenario.best_workers
Integer count maximizing relative capacity within the search limit.
Equation: max(c, key=c.get).
peak_capacity
engine.scenario_types.ScalabilityLawScenario.peak_capacity
Largest dimensionless relative capacity among enumerated worker counts.
Equation: capacity[best_workers].
continuous_peak
engine.scenario_types.ScalabilityLawScenario.continuous_peak
Continuous optimum via calc_usl_optimal_concurrency, distinct from integer search.
N* = sqrt((1 - sigma) / kappa).
Calculation: mlsysim.physics.performance.calc_usl_optimal_concurrency.
retrograde_threshold
engine.scenario_types.ScalabilityLawScenario.retrograde_threshold
Worker threshold above which USL capacity falls below the one-worker baseline.
(1 - sigma) / kappa: past it, capacity falls below one worker’s.
Equation: (1 - contention) / coherency.
first_slower
engine.scenario_types.ScalabilityLawScenario.first_slower
First enumerated count above one with capacity below baseline, or None if absent.
The smallest count above one whose capacity is below one worker’s.
Equation: next((n for n, c in capacity.items() if n > 1 and c < 1), None).