Increase max active resources supported by server#2189
Merged
Conversation
un-def
approved these changes
Jan 16, 2025
Due to aiosqlite's default, NullPool was used for sqlite. This is a suboptimal setting when spawning many sessions as we do. (See bluesky/tiled#663) Also increase busy_timeout to 30s. It allows getting rid of "database is locked" when stopping many runs (e.g. 20 at a time).
pranitnaik43
pushed a commit
to bahaal-tech/dstack
that referenced
this pull request
Feb 9, 2025
* Increase runner submitWaitDuration to 5m * Fix potentially long write DB transactions * Set PRAGMA synchronous=NORMAL * Fix _wait_to_lock_many() * Implement batch background processing * Add Server limits to Server deployment * Fix reuse instances lock * Use AsyncAdaptedQueuePool for sqlite Due to aiosqlite's default, NullPool was used for sqlite. This is a suboptimal setting when spawning many sessions as we do. (See bluesky/tiled#663) Also increase busy_timeout to 30s. It allows getting rid of "database is locked" when stopping many runs (e.g. 20 at a time).
pranitnaik43
pushed a commit
to bahaal-tech/dstack
that referenced
this pull request
Mar 4, 2025
* Increase runner submitWaitDuration to 5m * Fix potentially long write DB transactions * Set PRAGMA synchronous=NORMAL * Fix _wait_to_lock_many() * Implement batch background processing * Add Server limits to Server deployment * Fix reuse instances lock * Use AsyncAdaptedQueuePool for sqlite Due to aiosqlite's default, NullPool was used for sqlite. This is a suboptimal setting when spawning many sessions as we do. (See bluesky/tiled#663) Also increase busy_timeout to 30s. It allows getting rid of "database is locked" when stopping many runs (e.g. 20 at a time).
pranitnaik43
pushed a commit
to bahaal-tech/dstack
that referenced
this pull request
Mar 5, 2025
* Increase runner submitWaitDuration to 5m * Fix potentially long write DB transactions * Set PRAGMA synchronous=NORMAL * Fix _wait_to_lock_many() * Implement batch background processing * Add Server limits to Server deployment * Fix reuse instances lock * Use AsyncAdaptedQueuePool for sqlite Due to aiosqlite's default, NullPool was used for sqlite. This is a suboptimal setting when spawning many sessions as we do. (See bluesky/tiled#663) Also increase busy_timeout to 30s. It allows getting rid of "database is locked" when stopping many runs (e.g. 20 at a time).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2183
This PR improves server performance and documents the new server limits:
The new limits is 150 run/jobs/instances. At that load, the server can process resources with <2minutes latency, which is tolerable. Increasing processing rate further leads to cloud rate limit errors (I hit AWS).