Skip to main content

NodePackingScenario

Optimization scenarios · Implementation: mlsysim/engine/scenario_definitions/optimization.py.

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

Jobs of job_gpus GPUs packed on nodes nodes of gpus_per_node.

A job must sit in one node, so each node runs gpus_per_node // job_gpus jobs and strands the remainder. free_slots (optional) records a fragmented snapshot: free GPUs scattered so that no node is whole.

Notes

Equation: Use the dimensional products, ratios, or selection rules documented on the calculated properties below.

Assumptions: Equal-sized indivisible jobs must fit wholly within identically sized nodes.

Excludes: Cross-node placement, heterogeneous jobs, and fragmentation in other resource dimensions are absent.

References

Derivation: the calculated properties below state their defining arithmetic and units. They are scenario accounting or input-selection rules, not independently measured relationships.

Examples

>>> from mlsysim import Scenarios
>>> case = Scenarios.SixGpuJobsOnDgxH100Nodes
>>> round(case.total_gpus, 4)
512

Attributes

Name Description
free_share Currently free slots as a fraction of fleet accelerator capacity. Equation: free_slots | | [free_slots](#mlsysim.engine.scenario_types.NodePackingScenario.free_slots) | | | [gpus_per_node](#mlsysim.engine.scenario_types.NodePackingScenario.gpus_per_node) | | | [job_gpus](#mlsysim.engine.scenario_types.NodePackingScenario.job_gpus) | | | [nodes](#mlsysim.engine.scenario_types.NodePackingScenario.nodes) | | | [stranded_per_node](#mlsysim.engine.scenario_types.NodePackingScenario.stranded_per_node) | Accelerators left after filling a node with indivisible jobs. Equation: node capacity | | [total_gpus](#mlsysim.engine.scenario_types.NodePackingScenario.total_gpus) | Accelerators physically available across the nodes. Equation:nodes * gpus_per_node. | | [usable_share](#mlsysim.engine.scenario_types.NodePackingScenario.usable_share) | Fraction of each node usable under whole-job packing. Equation:1 - stranded_per_node

nodes

Type: int.

Declared default: required.

gpus_per_node

Type: int.

Declared default: required.

job_gpus

Type: int.

Declared default: required.

free_slots

Type: Optional[int].

Declared default: None.

total_gpus

engine.scenario_types.NodePackingScenario.total_gpus

Accelerators physically available across the nodes. Equation: nodes * gpus_per_node. Units: GPUs; nodes are identically populated.

stranded_per_node

engine.scenario_types.NodePackingScenario.stranded_per_node

Accelerators left after filling a node with indivisible jobs. Equation: node capacity minus whole-job count times GPUs per job. Units: GPUs; jobs cannot span nodes.

usable_share

engine.scenario_types.NodePackingScenario.usable_share

Fraction of each node usable under whole-job packing. Equation: 1 - stranded_per_node / gpus_per_node. Units: dimensionless; identical job sizes are assumed.

free_share

engine.scenario_types.NodePackingScenario.free_share

Currently free slots as a fraction of fleet accelerator capacity. Equation: free_slots / total_gpus. Units: dimensionless; availability alone does not imply a job-sized contiguous placement.

Back to top