T-Crypt/berth

Berth is a lightweight GPU resource manager written in Go. It controls which applications get access to your GPU, when they get it, and how that access is handed off.

What it solves

Programs that need a GPU's memory (like chat models, image pipelines, voice engines, games) often crash each other with out-of-memory (OOM) errors when they load together. Berth stops this by making them take turns – each program leases the card instead of grabbing it, so only one is loaded at a time.

How it works

Berth runs a small daemon (berthd) that acts as a broker. You start each program through berth run (or via the built-in gateway). When a new request arrives, Berth queues it by priority (hold, foreground, interactive, batch). The current holder finishes its current reply or job, then gets unloaded (optionally parked in RAM for fast switching). Berth waits until the GPU driver confirms memory is free, then grants the lease to the next engine. It also tracks who holds the card, reports ectowaways (processes using VRAM without a lease), and provides a web UI and status commands.

Who it’s for

People running multiple AI tools, games, or other GPU-heavy apps on a single machine – especially with one high-end card like an RTX 4090. It’s useful for hobbyists, developers, and anyone who juggles llama-server, ComfyUI, Ollama, vLLM, games, and similar workloads without wanting a cloud setup.

Highlights

  • Priorities – queues requests as foreground, interactive, batch, or hold (top priority) to decide who goes next.
  • Park in RAM – engines like ComfyUI or vLLM can offload to system memory for near-instant switch back.
  • cuda-checkpoint support – engines without built-in offload (e.g., llama.cpp) can use NVIDIA’s checkpoint to park and resume in seconds.
  • Scheduling – book a card for set hours, change priorities, and view a visual week schedule.
  • One gateway API – OpenAI-compatible endpoint that starts engines on demand and streams answers.
  • Stowaway detection – reports any process holding VRAM without a lease (with PID and memory) without killing it.
  • Multi‑GPU and AMD support – handles several cards individually, and experimental AMD RDNA3/4 and Phoenix APUs.
  • Runs on Linux and Windows (experimental) – single Go binary, no cloud account, no extra installs.
  • Alerts and metrics – desktop alerts, webhooks, Prometheus metrics, and CSV/JSON export.
  • Agent integration – berth skill install teaches Claude Code, Codex, and other agents to request the card instead of killing processes.

Related

  • Project
  • Project
  • Project
  • Project