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

Improve Performance by Pre-Initializing Docker Containers for Faster /eval Requests #60

Open
EmmanuelStan12 opened this issue Sep 30, 2024 · 0 comments

Comments

@EmmanuelStan12
Copy link

Currently, for each /eval request, a new Docker container is created, initialized, and assigned to the session. This process involves running startup scripts, which can significantly impact performance due to the time required to initialize and start the container. To improve performance and reduce latency during /eval requests, the following enhancements are proposed:

  1. Create a buffer or pool of pre-initialized Docker containers, each with a unique session ID, that are ready to be used for future /eval requests.
  2. For every new /eval request, allocate a pre-initialized container from the buffer and assign it to the session. This will significantly reduce the time it takes to respond to requests since the container will already be running.
  3. The container should be initialized with the necessary startup scripts beforehand so that each session has the environment pre-configured and ready for code evaluation.

Benefits:

  1. Reduced Latency: By having containers pre-initialized, the time to respond to /eval requests will be reduced.
  2. Improved Performance: Sessions can begin processing requests almost immediately, reducing the need to create and initialize new containers on demand.
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

No branches or pull requests

1 participant