meliodascz89/dsh-resource-guard

Semaphore and memory budget for local models, so image generation, voice synthesis and LLM jobs cannot exhaust RAM together.

Prevents the failure where a local image job starts while a local LLM is already loaded and the machine swaps itself to a halt. Two interfaces: a resourceGuard service other plugins call before starting a local model, and a model-callable dsh_resource tool with status (RAM, reservations, running Ollama models), models (local Ollama models with sizes), reserve label="image job" estGb=6, and release reservationId=rsv-1. The Settings page turns the policy and budget from a config-file edit into a form, and the status snapshot is published read-only so another plugin can read the current pressure without acquiring anything.

Infrastructure & Deployment ★ 0
View on GitHub ↗

Install

dsh plugin --profile web add dsh-resource-guard

The npm line, then two manual steps the README states: add dsh-resource-guard to dsh.profile.bundles and to dependencies in ~/.dsh/profiles/web/package.json, then run dsh plugin --profile web install. Config lives in the resource-guard namespace of the settings document (~/.dsh/settings.yaml) and is editable from a Settings section that also shows a live RAM and reservation overview. The README is bilingual with a Czech translation, so the English page and the code comments are the same source.

Compatibility

A machine running local models — the guard exists because a local LLM, an image job and a voice job on one box will each assume they can have the RAM. Three policies are selectable: auto allows one local model within the configured budget, strict allows one at a time, and off disables guarding. Reservations are explicit acquire()/release() calls, so a plugin that does not participate is not guarded — this is a cooperative budget, not a kernel-level limit, which is the honest scope of the design.

Details

Alternatives

idoall/dsh-lan-guard · MeiXu6693/dsh-remote-signin · NeevCloudAI/dsh-neev-sandbox

More plugins in Infrastructure & Deployment

Browse more in Infrastructure & Deployment

Guides for Infrastructure & Deployment plugins