Performance Tip: Lock Local Model VRAM/RAM with LimitMEMLOCK=infinity
If your local model fits inside your combined VRAM and RAM, you can keep the model provider's memory resident by adding LimitMEMLOCK=infinity under the [Service] header of the systemd unit for your provider. The kernel then stops paging model weights out to disk, which is where most of the slowdowns come from once a model is loaded.
The unit file
Posted in r/openclaw as a working example for LM Studio (edit the paths and usernames to match your install):
[Unit] Description=LM Studio Server RequiresMountsFor=/home[Service] LimitMEMLOCK=infinity Type=oneshot RemainAfterExit=yes User=******** Environment="HOME=/home/" ExecStartPre=/home//.lmstudio/bin/lms daemon up ExecStartPre=/home//.lmstudio/bin/lms load text-embedding-bge-large-en-v1.5 --yes ExecStartPre=/home//.lmstudio/bin/lms load qwen3.6-35b-a3b-uncensored-hauhaucs-aggressive --yes ExecStart=/home//.lmstudio/bin/lms server start ExecStop=/home//.lmstudio/bin/lms daemon down
[Install] WantedBy=multi-user.target
What each part does
LimitMEMLOCK=infinity— removes the default per-process mlock cap, so the loaded model can be kept out of swap/paging.ExecStartPrewithlms daemon up— starts the LM Studio daemon before anything else.lms load <model> --yes— preloads each model at service start. The example loads an embedding model (text-embedding-bge-large-en-v1.5) and a chat model (qwen3.6-35b-a3b-uncensored-hauhaucs-aggressive).lms server startasExecStart— brings up the OpenAI-compatible server.lms daemon downasExecStop— cleans up on shutdown.RequiresMountsFor=/home— ensures the home partition holding the model files is mounted before the service starts.Type=oneshot+RemainAfterExit=yes— the unit is treated as active after the start commands finish, which fits a daemon thelmsCLI manages separately.
Caveat
The tip explicitly assumes the model fits in VRAM+RAM. If it doesn't, locking memory is the wrong lever — you'll just push the problem elsewhere. Once it fits, the win is avoiding paging-induced stalls on inference.
To apply: drop the block into your unit file, then systemctl daemon-reload and restart the service. Developers running LM Studio headless as a systemd service are the target audience here; the same idea applies to any provider process whose weights you want pinned in memory.
📖 Read the full source: r/openclaw
👀 See Also

Save on Claude Code Bills by Routing Planning Tokens to Cheaper Models
A user cut $40 in overage fees by splitting Claude Code workflows: planning steps go to Haiku 3.5, actual edits and decisions stay on Opus/Sonnet. A 30-line wrapper handles routing; setup took ~2 hours.

How splitting context into separate files made Claude more consistent
A Reddit user shares a practical setup for Claude: split context into about-me.md, my-voice.md, and my-rules.md files; use a plan-before-execute flow; switch models per task; and give feedback instead of perfect prompts.

Claude's /btw Command Enables Parallel Communication During Tasks
Claude AI now supports a /btw command that lets users communicate with the AI while it's actively working on a task, allowing questions, additional instructions, or clarifications without interrupting the current workflow.

Claude CLI v2.1.154 Breaks Local vLLM — One-Line Patch Fixes It
Claude CLI ≥2.1.154 adds three new API roles (ctx, msg, system) that break local vLLM compatibility. A one-line patch to vLLM's Anthropic protocol restores it.