Sync os_workers fact with upstream 07/28807/1
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 16 Feb 2017 11:07:57 +0000 (15:07 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 16 Feb 2017 11:09:08 +0000 (15:09 +0400)
The current value for os_workers performs 3x worse in many cases compared
to the prevuous default of processorcount. Let's tune value to provide
response times close to what processorcount had (with 2 sockets machines).

Change-Id: Icecbaa18015e7fb9f5762222d69334bdf1a7566a
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
build/f_repos/patch/fuel-library/0002-Rework-processorcount-limits-to-os_workers.patch

index 53b1b60..715cdd3 100644 (file)
@@ -253,8 +253,8 @@ index 0000000..404fb90
 +# used to determine number of workers in a single place but use it across all
 +# modules.
 +#
-+# The value for os_workers is max between '(<# processors> / 4)' and '2' with
-+# a cap of 8.
++# The value for os_workers is max between '(<# processors> / 2)' and '2' with
++# a cap of 12.
 +#
 +# This fact can be overloaded by an external fact from /etc/factor/facts.d if
 +# a user would like to provide their own default value.
@@ -263,7 +263,7 @@ index 0000000..404fb90
 +  has_weight 100
 +  setcode do
 +    processors = Facter.value('processorcount')
-+    [ [ (processors.to_i / 4), 2 ].max, 8 ].min
++    [ [ (processors.to_i / 2), 2 ].max, 12 ].min
 +  end
 +end
 diff --git a/deployment/puppet/osnailyfacter/manifests/apache_mpm.pp b/deployment/puppet/osnailyfacter/manifests/apache_mpm.pp