# Stability Test — Sustained Inference Pressure
Goal: validate that the Llama-7B benchmark can run continuously for 6+ hours
without memory leaks, NUMA drift, thread pool starvation, or compressed-RAM
backend transitions degrading throughput below the 1.6x envelope.
## Methodology
- Run the existing `llama_bench.rs` in a loop, capturing per-cycle token/sec.
- Each cycle = full Llama-7B forward pass (cache stripped between cycles).
- Every N cycles, log: RSS (Resident Set Size), token/sec, p99 latency.
- Pass criteria: token/sec stays within 1.42x envelope (>= 12.0 tok/s)
and RSS does not grow > 30% over baseline after 6h.
## Running
```bash
while true; do
./target/release/examples/llama_bench --no-warmup 2>&1 | tee -a stability.log
```
## Acceptance criteria (honest)
- [ ] 1h sustained run: token/sec degrades < 10% from initial
- [ ] 4h sustained run: RSS growth < 20%
- [ ] 6h sustained run: token/sec still within 1.6x dGPU envelope (11.94 baseline)
- [ ] No panics, mutex deadlocks, or thread starvation