-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cove): Reduce workers to a more sensible level (can/should probab…
…ly be lower), to avoid OOM if e.g. a bot sends tons of 404s threads=2 - Threads was set to 1 in cd16ce7, so that processes "can be killed without affecting other requests" - It seems like common advice is to set threads to 2 (or to the number of CPU?), to avoid CPU affinity issues https://www.cloudbees.com/blog/getting-every-microsecond-out-of-uwsgi#multithreading - Note that a cpu-affinity option is also available https://uwsgi-docs-additions.readthedocs.io/en/latest/Options.html#cpu-affinity workers=16 - The original maximum workers of 100 is from the original server transfer cd16ce7 - Today, uWSGI processes use between 2.1% (84MB) and 0.9% (38MB) memory (presumably those that handled requests, and those that didn't). - So, workers=16 with threads=2 is not expected to exhaust the 4GB memory, though the default reload-on-rss of 256MB means up to 8GB can be requested. cheaper=4 and cheaper-initial=8 - These were increased to 50 in 88369e1, I think because low values led to poor performance during traffic spikes cheaper-rss-limit-soft-ratio is set to 0.9 to match the Prometheus monitoring rules.
- Loading branch information
1 parent
8c97739
commit 5d97cf1
Showing
3 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
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