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

chore: make docker-compose use less memory #28773

Merged
merged 2 commits into from
May 30, 2024
Merged

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented May 29, 2024

Playing a few tricks to make docker-compose use less memory:

  • not starting the superset-tests-worker service on a normal docker-compose up by using profile. From my understanding this service is used only by scripts/tests/run.sh, and it starts/stops it on its own - doesn't assume its already running. This saves ~900MB, while maintaining 8 workers to run tests by default, but makes it confiurable if you wanted more you could more easily change it now
  • starting only 2 workers by default for superset-worker as opposed to the default of 8, which is not necessary for dev workflows. This saves maybe ~500MB

before

Screenshot 2024-05-29 at 4 16 17 PM

after

Screenshot 2024-05-29 at 4 59 49 PM

Playing a few tricks to make docker-compose use less memory:
- not starting the `superset-tests-worker` service on a normal `docker-compose up` by using `profile`. From my understanding this service is used only by `scripts/tests/run.sh`, and it starts/stops it on its own - doesn't assume its already running. This saves ~900MB, while maintaining 8 workers to run tests by default, but makes it confiurable if you wanted more you could more easily change it now
- starting only 2 workers by default for `superset-worker` as opposed to the default of 8, which is not necessary for dev workflows. This saves maybe ~600MB
@dosubot dosubot bot added the infra:container Infra container and K8s label May 29, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a teensy suggestion to clarify the comment a bit. Not sure if it's worth adding a comment in the docker-compose.yml file as well for clarity. This may or may not be worth a mention on the docs site, too, if you think it might be something people fiddle with much. Aside from those nits, LGTM!

@mistercrunch mistercrunch merged commit 2dbb44b into master May 30, 2024
30 checks passed
@mistercrunch mistercrunch deleted the docker-compose-mem branch May 30, 2024 18:42
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels infra:container Infra container and K8s preset-io size/XS 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants