fragmentation-aware-packing
Agent skill frombenchflow-ai/skillsbench
Choose placements that preserve useful residual capacity. Use for bin packing, GPU sharing, accelerator placement, and multi-resource scheduling where stranded capacity hurts future fit.
How to install fragmentation-aware-packing
install fragmentation-aware-packing
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench# or add only this skill to Claude Code: copy the folder
tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing/
# into
~/.claude/skills/fragmentation-aware-packing/ (all projects)
.claude/skills/fragmentation-aware-packing/ (one project)
tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing/SKILL.md
Apache-2.0Full file1# Fragmentation-Aware Packing23Use this skill when several feasible placements exist and the choice affects future capacity.45## Core Idea67A placement is not good just because it fits. Good placements preserve useful residual capacity. With fractional GPUs, this often means packing small compatible jobs together while preserving whole or scarce GPU slots. The same idea applies to any slots, bins, or resources with discrete capacities.89## Marginal Fragmentation1011For each feasible placement, compute a local before/after estimate:12131. Measure current free capacity by resource type and slot.142. Copy the target machine or bin state.153. Compute `fragmentation_before`.164. Apply the candidate placement.175. Compute `fragmentation_after`.186. Set `marginal_fragmentation = fragmentation_after - fragmentation_before`.1920```text21best = None2223for placement in feasible_placements:24 target_before = copy(target_state)25 fragmentation_before = estimate_fragmentation(target_before, workload_types)26 target_after = apply(placement, target_before)27 fragmentation_after = estimate_fragmentation(target_after, workload_types)28 marginal_fragmentation = fragmentation_after - fragmentation_before29 score = weighted_action_score(30 marginal_fragmentation=marginal_fragmentation,31 other_component_deltas=estimate_other_deltas(placement)32 )33 best = lower_score(best, placement, score)3435choose best36```37…
Excerpt shown under the repository's Apache-2.0 license.
