Repository navigation
Conversation
Puma and Pulp worker/process counts are derived from live hardware facts (processor count, memory) rather than from the selected --tuning profile: - foreman::foreman_service_puma_workers defaults to floor(min(100, cores*1.5, mem_gb-1.5)) - foreman_proxy_content::pulpcore_worker_count defaults to min(8, cores) - pulpcore::content_service_worker_count defaults to 2*min(8,cores)+1 - pulpcore::api_service_worker_count defaults to min(4,cores)+1 so development's minimal hardware floor (1 CPU core / 6 GB, see hooks/pre_commit/13-tuning.rb) doesn't actually cap these: any development box above that floor scales them up the same as default/medium would, and can OOM when Pulp syncs several repositories concurrently. config/foreman.hiera/tuning/sizes/development.yaml didn't exist before this change, so development silently fell back to tuning/common.yaml with no profile-specific override, unlike medium/large/extra-large/extra-extra-large which each have one. Pin the four worker counts above to 2 for development, the same hiera-override mechanism already used by the other tuning sizes. Ports theforeman/foremanctl#925 (which fixed the equivalent problem in the container-based installer) to the RPM/Puppet installer. Fixes #39882 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ekohl
requested changes
Oct 11, 2026
ekohl
left a comment
Member
There was a problem hiding this comment.
This isn't going to work: these parameters are read by Kafo and stored in the answer file. You can see the answers take precedence over the tuning:
foreman-installer/config/foreman-hiera.yaml
Lines 13 to 22 in 05222e7
Ideally we'd have a tuning test that takes every file in config/foreman.hiera/tuning/sizes and verifies that for each entry the class isn't in the answer files so you'd know what is invalid.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are you introducing these changes?
Puma and Pulp worker/process counts are derived from live hardware facts (processor count, memory) rather than from the selected
--tuningprofile:foreman::foreman_service_puma_workersdefaults tofloor(min(100, cores*1.5, mem_gb-1.5))foreman_proxy_content::pulpcore_worker_countdefaults tomin(8, cores)pulpcore::content_service_worker_countdefaults to2*min(8,cores)+1pulpcore::api_service_worker_countdefaults tomin(4,cores)+1This means
--tuning development's minimal hardware floor (1 CPU core / 6 GB, seehooks/pre_commit/13-tuning.rb) doesn't actually cap these: any development box above that floor (e.g. a forklift VM with a few cores and more RAM) scales them up the same asdefault/mediumwould, and can OOM when Pulp syncs several repositories concurrently.config/foreman.hiera/tuning/sizes/development.yamldidn't exist before this change, sodevelopmentsilently fell back totuning/common.yamlwith no profile-specific override, unlikemedium/large/extra-large/extra-extra-large, which each have one.Ports theforeman/foremanctl#925 (which fixed the equivalent problem in the container-based installer) to the RPM/Puppet installer.
What are the changes?
config/foreman.hiera/tuning/sizes/development.yaml, pinning the four worker counts above to2, the same hiera-override mechanism already used by the other tuning sizes.spec/tuning_spec.rbasserting those values, mirroring foremanctl's owntests/unit/tuning_test.py.Fixes #39882
Test plan
rspec spec/tuning_spec.rbpassesrubocopclean on the new spec🤖 Generated with Claude Code