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

Increase gunicorn workers and threads per load testing findings and docs recommendations #1207

Open
exalate-issue-sync bot opened this issue Nov 14, 2024 · 1 comment
Assignees

Comments

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Nov 14, 2024

per https://fecgov.atlassian.net/browse/FECFILE-180 findings and the gunicorn documentation, we should increase the gunicorn workers in our environments based on the following guidance:

How Many Workers?

Generally we recommend (2 x $num_cores) + 1

How Many Threads?

Depending on the system, using multiple threads, multiple worker processes, or some mixture, may yield the best results.

The tasks in this ticket are to

  1. determine the number of workers to use based on our cloud.gov environments (see Laura’s comment below. CPU cores are consistent throughout environments).
  2. determine the number of threads we should use for each worker
  3. update the gunicorn settings in run.sh and dockerfile(s) to reflect these settings
  4. Test with 4 workers in DEV and monitor application CPU (Kibana dashboard) to make sure it works once changes are made.
  5. Create follow-up ticket to plan to monitor application performance after this chance (needs to be in a subsequent sprint)

QA Notes

null

DEV Notes

The ability to load test these changes in the [cloud.gov|http://cloud.gov] environments is very limited to due the CDN throttling us and return 202s under moderate load. Testing locally may be achieved by adjusting the Dockerfile, but care should be taken to monitor your CPU temp.

Design

null

See full ticket and images here: FECFILE-1788

Copy link
Author

Laura Beaufort commented: {quote}determine the number of workers to use based on our [cloud.gov|http://cloud.gov/] environments{quote}

CPU cores are always 4:

{noformat}cf ssh fecfile-web-api -i 0
cat /proc/cpuinfo
...
cpu cores : 4{noformat}

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

2 participants