-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move tasks over to rayon thread pool + adjust db connection pool
The rayon threadpool alone was not enough to solve perf problems with offloading these tasks. I had thought it was related to queuing or too much parallelism and it (kinda) was but really it was exhaustion of the db connection pool (default 10) with a high timeout (30s). These two adjustments combined now at least prevent the server from going unresponsive when I hit it with 5000 rps. The server _before_ any offloading (just running all this on the Tokio runtime threads) is still lower latency. It's probable that this "blocking/CPU work" is just still so little the thread coordination overhead is higher than the work at hand.
- Loading branch information
1 parent
e78cb9d
commit 5f06bdf
Showing
5 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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