Skip to content

Conversation

@irvingpop
Copy link
Collaborator

Description of changes

we were using way too much memory and racking up oomkills.

Before:
1 gunicorn master + 3 gunicorn workers + 2 django_q workers = 6 processes per container
At ~65 MB average: ~390 MB per container
Two containers (prod + staging): ~780 MB

After:
1 gunicorn master + 1 gunicorn worker + 1 django_q worker = 3 processes per container
At ~65 MB average: ~195 MB per container
Two containers: ~390 MB (~50% reduction!)

@irvingpop
Copy link
Collaborator Author

confirmed memory use reduction in staging:

Gunicorn:
  40.8 MB - gunicorn master
  49.5 MB - gunicorn worker
  ------
  90.3 MB subtotal

Django-Q:
  27.3 MB - qcluster (monitor/sentinel)
  22.3 MB - qcluster (process)
  25.2 MB - qcluster (worker - active)
  16.8 MB - qcluster (pusher)
  16.8 MB - qcluster (guard)
  ------
 108.4 MB subtotal

Total per container: ~199 MB PSS

@irvingpop irvingpop merged commit e1b171b into main Jan 26, 2026
6 checks passed
@irvingpop irvingpop deleted the irving/reduce_memory branch January 26, 2026 16:53
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 this pull request may close these issues.

1 participant