claude-subagents skill: add concurrency guidance for container memory cap
This commit is contained in:
parent
275962b8c9
commit
a962fae348
1 changed files with 11 additions and 0 deletions
|
|
@ -96,6 +96,17 @@ running at once instead of handing the whole thing to one.
|
||||||
same as the one-subagent case, just N background bash tasks instead of
|
same as the one-subagent case, just N background bash tasks instead of
|
||||||
one. Check on them as a batch, not by polling each individually in a
|
one. Check on them as a batch, not by polling each individually in a
|
||||||
loop.
|
loop.
|
||||||
|
- **Mind the container's memory cap before picking N.** Your whole
|
||||||
|
container shares one `MemoryMax` (a few GB by default) with every
|
||||||
|
subagent you spawn *and* your own process. A `claude` process plus its
|
||||||
|
MCP servers can hold several hundred MB to ~1GB depending on the task;
|
||||||
|
spawning a dozen at once on a small container doesn't just slow
|
||||||
|
things down, it can OOM the whole container — taking your own
|
||||||
|
in-flight turn down with it, not just the subagents. Rule of thumb:
|
||||||
|
**2-4 concurrent workers** on a default-sized container; check
|
||||||
|
`free -h` (or ask whoever owns the container's config for its
|
||||||
|
`MemoryMax`) before going higher, and chunk a bigger batch into
|
||||||
|
successive waves of that size rather than firing everything at once.
|
||||||
- **You own the merge.** Once all N report done, review + verify each
|
- **You own the merge.** Once all N report done, review + verify each
|
||||||
worker's slice (same "don't trust the self-report blind" rule as
|
worker's slice (same "don't trust the self-report blind" rule as
|
||||||
below), then combine — for a git-based split, that's you merging N
|
below), then combine — for a git-based split, that's you merging N
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue