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

Default instance/memory values can create unstable configurations with many processors #571

Closed
kasimon opened this issue Jan 3, 2018 · 1 comment

Comments

@kasimon
Copy link
Contributor

kasimon commented Jan 3, 2018

The default instance number/memory configuration for servers with more than 2GB memory

if $mem_in_mb >= 2048 {

can result in unsuitable configurations for servers with more than 4 processors. According to the official tuning guide, each server instance should have 512MB memory available. Since the java memory is limited by default at 2GB, but the number of instances unconditionally equals the number of processors, the puppetserver process will run with not enough memory and may quit working at load peaks.

My suggestions would be:

  • Either limit instances too: default_instances = min(number_processors, 4)
  • or calculate possible instances from number of processors and available memory: default_instances = min (number_processors, (memory_in_mb / 512) -1)
  • or at least log a warning when more than instances will be configured than fitting into the configured memory
@ekohl
Copy link
Member

ekohl commented Jan 3, 2018

Either limit instances too: default_instances = min(number_processors, 4)

https://github.com/theforeman/puppet-katello/blob/986a17ea3007f7e5c6ff7c8e9fdb74bef55507c6/manifests/params.pp#L32 implements a similar change and I'd accept a patch that implements this. We don't implement real automatic tuning anyway.

kasimon added a commit to kasimon/puppet-puppet that referenced this issue Jan 3, 2018
Only use 2G for puppetserver if at least 3G available. Don't use more than four instances, as 512MB memory per instance are recommended. 

Closes: theforeman#571
@mmoll mmoll closed this as completed in #572 Jan 3, 2018
mmoll pushed a commit that referenced this issue Jan 3, 2018
Only use 2G for puppetserver if at least 3G available. Don't use more than four instances, as 512MB memory per instance are recommended. 

closes GH-571
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants