Bug 1425813

Summary: neutron metadata_workers should be half the cpu cores as per neutron recommendation
Product: Red Hat OpenStack Reporter: Jaison Raju <jraju>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0 (Liberty)CC: amuller, aschultz, asoni, beagles, dbecker, jraju, mburns, morazi, ohochman, oidgar, rhel-osp-director-maint, tvignaud, ushkalim
Target Milestone: Upstream M2Keywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-7.0.0-0.20170624014919.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 21:08:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaison Raju 2017-02-22 13:43:38 UTC
Description of problem:
As per the neutron.conf text , metadata_workers is recommended as half the cpu core.
Whereas api_workers are supposed to be = physical cpu cores .

Although the THT set them both equally using 'neutron_workers:
./puppet/controller.yaml:                neutron::server::api_workers: {get_input: neutron_workers}
./puppet/controller.yaml:                neutron::agents::metadata::metadata_workers: {get_input: neutron_workers}


Version-Release number of selected component (if applicable):
RHOS8

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
metadata_workers & api_workers are set equally as 0 .

Expected results:


Additional info:
From : /etc/neutron/metadata_agent.ini

~~~
# Number of separate worker processes for metadata server (defaults to half of
# the number of CPUs) (integer value)
#metadata_workers = 12
~~~

From : /etc/neutron/neutron.conf

~~~
# Number of separate API worker processes for service. If not specified, the
# default is equal to the number of CPUs available for best performance.
# (integer value)
#api_workers = <None>
~~~

Comment 2 Assaf Muller 2017-04-28 19:23:25 UTC
To assign to Or Idgar, once he gets a Bugzilla account :)

Comment 3 Red Hat Bugzilla Rules Engine 2017-04-28 19:23:32 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 4 Brent Eagles 2017-05-03 17:29:50 UTC
We no longer default neutron workers to equal the number of processors since this results in very large memory and processor overhead on servers with a large number of cores. Particularly if most of the other services also do this. It is now set to half of the processor cores with a minimum of 2 and maximum of twelve. There is a bug in the upstream heat template for the metadata workers as the default of an empty string no longer results in the proper calculated default being chosen. It should follow the same pattern using heat "conditions" that's used in neutron-api.yaml.

Comment 6 Omri Hochman 2017-11-16 16:10:39 UTC
I'm adding the values I see in osp12 RC puddle,  not sure if that's good enough for verification, (adding Udi to check)   

cat /etc/neutron/metadata_agent.ini | less : 

# Number of separate worker processes for metadata server (defaults to half of
# the number of CPUs) (integer value)
#metadata_workers = 16

# Number of separate API worker processes for service. If not specified, the
# default is equal to the number of CPUs available for best performance.
# (integer value)
#api_workers = <None>
api_workers=2

Comment 7 Omri Hochman 2017-11-16 16:39:00 UTC
Verified with:
 openstack-tripleo-heat-templates-7.0.3-3.el7ost.noarch


After re-checking the values with beagles; we saw that on my 12 core machine we have the right value on neutron.conf ( checked on the controller-1)  

neutron.conf ( on controller1) 
-------------------------------
#api_workers = <None>
api_workers=6

# Number of RPC worker processes for service. (integer value)
#rpc_workers = 1
rpc_workers=6

# Number of RPC worker processes dedicated to state reports queue. (integer
# value)
#rpc_state_report_workers = 1

Comment 10 errata-xmlrpc 2017-12-13 21:08:54 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.

https://access.redhat.com/errata/RHEA-2017:3462