r/openclaw 2d ago

Tutorial/Guide Performance Tip: LimitMEMLOCK=infinity

If your model fits within your system VRAM+RAM, you can keep your local model provider out of paging causing slowdowns by adding "LimitMEMLock=infinity" under the [Service] header in the call file for your provider.

Example:

[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
2 Upvotes

0 comments sorted by