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
@@ -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)