Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runtime): Set server process to run with highest system priority #5206

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Nov 22, 2024

This PR modifies the server startup command to:

  • Use nice -n -20 to set highest CPU scheduling priority
  • Set OOM score to -1000 to make it one of the last processes to be killed
  • Use sudo for elevated privileges needed for these settings

This ensures the server process runs with maximum priority and is one of the last processes to be killed by the OOM killer.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:7bd12a9-nikolaik   --name openhands-app-7bd12a9   docker.all-hands.dev/all-hands-ai/openhands:7bd12a9

@xingyaoww xingyaoww changed the title Set server process to run with highest system priority feat(runtime): Set server process to run with highest system priority Nov 22, 2024
@xingyaoww xingyaoww merged commit 7db0a35 into main Nov 22, 2024
14 checks passed
@xingyaoww xingyaoww deleted the high-priority-server branch November 22, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants