Tooluck logoTooluck
SKILL.md

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 file
1# Fragmentation-Aware Packing
2
3Use this skill when several feasible placements exist and the choice affects future capacity.
4
5## Core Idea
6
7A 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.
8
9## Marginal Fragmentation
10
11For each feasible placement, compute a local before/after estimate:
12
131. 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`.
19
20```text
21best = None
22
23for 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_before
29 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)
34
35choose best
36```
37…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillsbench

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates