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

Test more gevent workers per app instance #4489

Closed
3 tasks done
lbeaufort opened this issue Jul 20, 2020 · 0 comments · Fixed by #4493
Closed
3 tasks done

Test more gevent workers per app instance #4489

lbeaufort opened this issue Jul 20, 2020 · 0 comments · Fixed by #4493
Assignees
Milestone

Comments

@lbeaufort
Copy link
Member

lbeaufort commented Jul 20, 2020

1G app = 4 CPU cores
(cf ssh api -i 0 to log into one app instance, cat /proc/cpuinfo to see cores)
https://docs.gunicorn.org/en/stable/run.html#commonly-used-arguments

Recommended workers is 2xCPUs+1 = 9 workers (currently 4 workers)

Completion criteria

  • Take a baseline locust test of dev at 10 instances, note database CPU and connections start/end
  • Update gunicorn --access-logfile - --error-logfile - --log-level info --timeout 300 -k gevent -w 9 webservices.rest:app to -w 9
  • Take an "after" locust test of dev , note database and connections CPU start/end

-- Check the number of workers with ssh api and ps aux | grep gunicorn | grep -v grep | wc -l (subtract one) per https://stackoverflow.com/a/33107962

I couldn't get gunicorn to recognize the WEB_CONCURRENCY or GUNICORN_CMD_ARGS env vars.

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

Successfully merging a pull request may close this issue.

1 participant