Bug 858038 - Installer sets 2 thin processes no matter what
Summary: Installer sets 2 thin processes no matter what
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-17 20:35 UTC by Jeff Weiss
Modified: 2019-09-26 15:51 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:55:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Jeff Weiss 2012-09-17 20:35:52 UTC
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 08:30:40 UTC
Ack, taking.

Comment 3 Lukas Zapletal 2012-09-18 09:25:31 UTC
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 09:33:11 UTC
https://github.com/Katello/katello/pull/687

Comment 7 Og Maciel 2012-10-03 19:25:13 UTC
# 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 19:25:48 UTC
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 19:55:25 UTC
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.