Bug 858038 - Installer sets 2 thin processes no matter what
Installer sets 2 thin processes no matter what
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Og Maciel
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 16:35 EDT by Jeff Weiss
Modified: 2014-11-09 17:52 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The System Engine installer chose two thin processes regardless of memory and hardware available. This was due to System Engine dividing the string number of processes by a pre-considered algorithm that set the number of thin worker processes. This fix converts the string value to a floating point. This sets the optimal number of thin processes.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:55:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Weiss 2012-09-17 16:35:52 EDT
Description of problem:
installer ends up choosing 2 thin processes no matter what hardware you have.

Version-Release number of selected component (if applicable):
CloudForms System Engine Version: 1.1.12-7.el6cf 

How reproducible:


Steps to Reproduce:
1. install cfse on a system with 8g ram and 8cpu
2.
3.
  
Actual results:
2 thin proc

Expected results:
many thin procs (9?)

Additional info:
Check out the code at 
https://github.com/Katello/katello/blob/master/katello-configure/lib/puppet/parser/functions/katello_process_count.rb

and the log snippet below.  Note "Maximum Processes" is never printed, so it means an exception is thrown on calculating them, and the lib just punts and returns 2.  It probably should not punt without logging something.

relevant log snippet 

120914-20:18:35 notice: Scope(Class[Katello::Params]): CPU count: 8
120914-20:18:35 notice: Scope(Class[Katello::Params]): Thin processes recommendation: 9
120914-20:18:35 notice: Scope(Class[Katello::Params]): Total memory: 8257074626.56
120914-20:18:35 notice: Scope(Class[Katello::Params]): Thin consumes: 230000000
120914-20:18:35 notice: Scope(Class[Katello::Params]): Reserve: 2000000000
120914-20:18:35 notice: Scope(Class[Katello::Params]): Portion: 0.5
120914-20:18:35 notice: Scope(Class[Katello::Params]): CPU count: 8
120914-20:18:35 notice: Scope(Class[Katello::Params]): Thin processes recommendation: 9
120914-20:18:35 notice: Scope(Class[Katello::Params]): Total memory: 8257074626.56
120914-20:18:35 notice: Scope(Class[Katello::Params]): Thin consumes: 230000000
120914-20:18:35 notice: Scope(Class[Katello::Params]): Reserve: 2000000000
120914-20:18:35 notice: Scope(Class[Katello::Params]): Portion: 1
Comment 2 Lukas Zapletal 2012-09-18 04:30:40 EDT
Ack, taking.
Comment 3 Lukas Zapletal 2012-09-18 05:25:31 EDT
Good idea putting the error message there, Jeff :-)

Okay, looks like a regression in the code:

notice: Scope(Class[Katello::Params]): Thin processes recommendation: 3
notice: Scope(Class[Katello::Params]): Total memory: 1846835937.28
notice: Scope(Class[Katello::Params]): Thin consumes: 230000000
notice: Scope(Class[Katello::Params]): Reserve: 2000000000
notice: Scope(Class[Katello::Params]): Portion: 0.5
notice: Scope(Class[Katello::Params]): Error when calculating: String can't be coerced into Float, using 2

Fixing the string->float conversion and I am also going to add new katello-configure parameters --katello-web-workers and --foreman-web-workers so users can override this.
Comment 4 Lukas Zapletal 2012-09-18 05:33:11 EDT
https://github.com/Katello/katello/pull/687
Comment 7 Og Maciel 2012-10-03 15:25:13 EDT
# grep "cpu count" -nriI /var/log/katello/katello-configure/*
/var/log/katello/katello-configure/main.log:5:121002-16:56:08 notice: Scope(Class[Katello::Params]): CPU count: 4
/var/log/katello/katello-configure/main.log:13:121002-16:56:08 notice: Scope(Class[Katello::Params]): CPU count: 4
# grep server /etc/katello/thin.yml 
# stop katello prior changing servers option
servers: 5
# ps -ef | grep [t]hin | wc -l
5
Comment 8 Og Maciel 2012-10-03 15:25:48 EDT
Verified using:

* candlepin-0.7.8-1.el6cf.noarch
* candlepin-selinux-0.7.8-1.el6cf.noarch
* candlepin-tomcat6-0.7.8-1.el6cf.noarch
* katello-1.1.12-12.el6cf.noarch
* katello-all-1.1.12-12.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-6.el6cf.noarch
* katello-cli-common-1.1.8-6.el6cf.noarch
* katello-common-1.1.12-12.el6cf.noarch
* katello-configure-1.1.9-6.el6cf.noarch
* katello-glue-candlepin-1.1.12-12.el6cf.noarch
* katello-glue-pulp-1.1.12-12.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch
Comment 10 errata-xmlrpc 2012-12-04 14:55:25 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Note You need to log in before you can comment on or make changes to this bug.