#!/usr/bin/env bash set -euo pipefail sudo mkdir -p /etc/systemd/system/ollama.service.d cat <<'CONF' | sudo tee /etc/systemd/system/ollama.service.d/override.conf >/dev/null [Service] CPUAccounting=true MemoryAccounting=true CPUQuota=640% MemoryHigh=11G MemoryMax=13G CONF sudo systemctl daemon-reload sudo systemctl restart ollama echo "Normal mode restored for Ollama." echo "CPUQuota=640%, MemoryHigh=11G, MemoryMax=13G"