llama-server Kept Crashing Overnight on a 6GB Laptop: System RAM, Not the Model
Stunning-Sherbet1853 · reddit · 2026-10-14
While building a Windows local agent on Ollama (llama.cpp), the author ran the same overnight task kit on a 24GB desktop, 8GB laptop, and 6GB laptop — the 6GB machine crashed three times in one night. Two culprits:
1. llama.cpp's prompt cache
- llama-server keeps prompt cache in system RAM, not VRAM; default limit is 8GB, and one 40K-token state is 1.3GB
- On a 24GB-RAM laptop the runner grew to 12GB; the author now sets --cache-ram relative to system RAM (4GB on the 24GB machine)
2. Their own agent process leaking
- 18GB leaked after 12 hours on the 8GB laptop: network responses kept after browser tabs closed, plus a Windows component definition that only matched the dev PC
- Found by counting live objects by type and diffing two snapshots 10 minutes apart
Before/after (same task, same model)
- 8GB laptop: 3,280→5,434MB in 101 min before; 2,699→2,809MB in 91 min after
- 6GB laptop: zero crashes over 5 hours after fixes (runner leveled at 9GB)
Takeaway: when a local LLM looks unstable on a small GPU, check who's using system RAM before changing model size or quantization — VRAM estimates don't include any of this.
More from coding & agent
- 7 lessons from building a personalized AI gift site in one hour, with $0 hosting — jamesbrooksco · 2026-10-15
- Google's ADK brings one agent framework to Python, Go, TypeScript, Java and Kotlin — rseroter · 2026-10-15
- AI agent flags a bizarre '71 >= 71' error while a server pool balloons by 1.4TB — haydendevs · 2026-10-15
- Invideo launches an MCP for editing videos directly via Claude or ChatGPT — azed_ai · 2026-10-15
- Connecting Grok to ROS via OpenClaw and AgenticROS for robotics missions — chrismatthieu · 2026-10-15
- Automating bug report fixes: a Bot triages DMs into a Cursor project — msfeldstein · 2026-10-15