- Add MAX_CONCURRENT_AGENTS (default: 3) to limit concurrent agents - Implement acquire_agent_slot() and release_agent_slot() with flock - Wrap cmd_start, cmd_continue, and cmd_delegate with slot management - cmd_delegate holds slot until background task completes (fire-and-forget + blocking) - Add basic concurrency tests to test suite
1.2 KiB
1.2 KiB
Parallel Capacity Test Report
Generated: 2026-03-31 03:53:45
Summary
| Agents | Duration | Success | Failed | Timeout | Avg Response | Peak Mem (MB) | Mem/Agent | Cost Score |
|---|---|---|---|---|---|---|---|---|
| 1 | 7.0s | 1 | 0 | 0 | 6.3s | 2547MB | 363.6MB | 2.55 |
| 2 | 13.0s | 2 | 0 | 0 | 9.2s | 2889MB | 350.0MB | 9.11 |
| 3 | 8.0s | 3 | 0 | 0 | 6.3s | 3233MB | 340.4MB | 8.19 |
| 5 | 12.0s | 5 | 0 | 0 | 6.7s | 3912MB | 340.3MB | 20.49 |
| 8 | 62.5s | 0 | 0 | 8 | 60.0s | 4033MB | 223.4MB | 111.69 |
Cost Analysis
| Metric | Value |
|---|---|
| Baseline Memory | 2183.3 MB |
| Avg Memory per Agent | 323.5 MB |
| Memory Limit | 1024 MB |
| Estimated Max Capacity | 3 agents |
Key Findings
Optimal Configuration
- 5 agents achieved perfect success rate
- Average response time: 6.7s
- Peak CPU: 0.0%
- Peak Memory: 3911.8MB (0.0%)
- Memory per agent: 340.3MB
- Cost score: 20.49
Recommendations
- Recommended max agents: 5 for stable operation
- Monitor closely: 5+ agents
- Implement circuit breaker when failure rate exceeds threshold