Add Ollama burst and normal mode scripts
This commit is contained in:
19
scripts/burst-95.sh
Executable file
19
scripts/burst-95.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/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=760%
|
||||||
|
MemoryHigh=12G
|
||||||
|
MemoryMax=14G
|
||||||
|
CONF
|
||||||
|
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl restart ollama
|
||||||
|
|
||||||
|
echo "Burst mode enabled for Ollama."
|
||||||
|
echo "CPUQuota=760%, MemoryHigh=12G, MemoryMax=14G"
|
||||||
19
scripts/normal-80.sh
Executable file
19
scripts/normal-80.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/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"
|
||||||
Reference in New Issue
Block a user