perf: cap login desktop below one CPU

This commit is contained in:
Rixuan Shao
2026-07-11 23:10:59 +08:00
parent 14dfedc57e
commit bdadd363df
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ SPARKFLOW_SESSION_COOKIE_SECURE=0
LOGIN_DESKTOP_BIND_ADDRESS=127.0.0.1
LOGIN_DESKTOP_WEB_PORT=8788
LOGIN_DESKTOP_PUBLIC_URL=/login-desktop/proxy/vnc.html?autoconnect=1&resize=scale&view_only=0&path=login-desktop/proxy/websockify
LOGIN_DESKTOP_CPUS=1.0
LOGIN_DESKTOP_CPUS=0.8
LOGIN_DESKTOP_MEMORY_LIMIT=1200m
LOGIN_DESKTOP_PIDS_LIMIT=256
LOGIN_DESKTOP_IDLE_TIMEOUT_SECONDS=1800
@@ -115,7 +115,7 @@ class DeploymentContractTests(unittest.TestCase):
compose = (REPO_ROOT / "docker-compose.yml").read_text(encoding="utf-8")
start_script = (SOURCE_ROOT / "scripts" / "start_login_desktop.sh").read_text(encoding="utf-8")
server = (SOURCE_ROOT / "login_desktop_server.py").read_text(encoding="utf-8")
self.assertIn("cpus: ${LOGIN_DESKTOP_CPUS:-1.0}", compose)
self.assertIn("cpus: ${LOGIN_DESKTOP_CPUS:-0.8}", compose)
self.assertIn("mem_limit: ${LOGIN_DESKTOP_MEMORY_LIMIT:-1200m}", compose)
self.assertIn("pids_limit: ${LOGIN_DESKTOP_PIDS_LIMIT:-256}", compose)
self.assertIn("-nap -wait 50 -defer 50", start_script)
+1 -1
View File
@@ -87,7 +87,7 @@ services:
ports:
- "${LOGIN_DESKTOP_BIND_ADDRESS:-127.0.0.1}:${LOGIN_DESKTOP_WEB_PORT:-8788}:6080"
command: bash /app/scripts/start_login_desktop.sh
cpus: ${LOGIN_DESKTOP_CPUS:-1.0}
cpus: ${LOGIN_DESKTOP_CPUS:-0.8}
mem_limit: ${LOGIN_DESKTOP_MEMORY_LIMIT:-1200m}
pids_limit: ${LOGIN_DESKTOP_PIDS_LIMIT:-256}
volumes: