Bug 1372821 - Gnocchi API processes tuned to 1 with cpu_count for threads out of box
Summary: Gnocchi API processes tuned to 1 with cpu_count for threads out of box
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 10.0 (Newton)
Assignee: Pradeep Kilambi
QA Contact: Mehdi ABAAKOUK
Depends On:
TreeView+ depends on / blocked
Reported: 2016-09-02 19:09 UTC by Alex Krzos
Modified: 2016-12-14 15:56 UTC (History)
6 users (show)

Fixed In Version: openstack-puppet-modules-9.0.0-0.20160915155755.8c758d6.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, the Time Series Database-as-a-Service (gnocchi) API workers were configured to be deployed be default with a single process and logical cpu_core count for threads, resulting in the gnocchi API running in httpd to be deployed with a single process. As a best practice, gnocchi recommends the number of process and threads to be 1.5 * cpu_count. With this update, the worker count is max(($::processorcount + 0)/4, 2) and threads to 1. As a result, the gnocchi API workers run with the right number of workers and threads for better performance.
Clone Of:
Last Closed: 2016-12-14 15:56:34 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 368124 None None None 2016-10-05 16:45:15 UTC

Description Alex Krzos 2016-09-02 19:09:38 UTC
Description of problem:
Deployed OSP10 from OSPd 10 and Gnocchi api workers running in httpd are deployed with a single process and logical cpu_core count for threads.

Gnocchi best practices in Gnocchi documentation recommends number of processes and threads to be 1.5 x cpu_core count - http://gnocchi.xyz/running.html?highlight=api

Analyzing high instance count environments with Gnocchi has shown the Gnocchi-api httpd process consumes only a single core.

Version-Release number of selected component (if applicable):
Builds 2016-08-30.1

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

[root@overcloud-controller-0 ~]# ps afx -F | grep "[Gg]nocchi"
gnocchi  10163 10160  0 625576 80700 15 18:16 ?        Sl     0:01  \_ /usr/sbin/httpd -DFOREGROUND
[root@overcloud-controller-0 ~]# cat /proc/10163/status | grep "Threads"
Threads:        35 
[root@overcloud-controller-0 ~]# grep "thread" /etc/httpd/conf.d/10-gnocchi_wsgi.conf 
  WSGIDaemonProcess gnocchi group=gnocchi processes=1 threads=24 user=gnocchi

While we are at it, can we name the processes with "display-name=gnocchi-api", similar to how Keystone's processes for main/admin api are?

Aodh also runs in mod_wsgi and is configured the same as Gnocchi, this may also require tuning for environments that rely heavily on the Aodh api.

Lastly, we should take into account the number of additional database connections Gnocchi will consume as we now have another service connecting to mysql.

Comment 4 Mehdi ABAAKOUK 2016-10-20 08:19:57 UTC
On fresh install, the configuration have indead changed.

# grep WSGIDaemonProcess /etc/httpd/conf.d/10-gnocchi_wsgi.conf
  WSGIDaemonProcess gnocchi group=gnocchi processes=2 threads=1 user=gnocchi

# ps afx -F | grep "[Gg]nocchi" | grep httpd
gnocchi   9367  9358  0 232249 101156 0 07:51 ?        Sl     0:03  \_ /usr/sbin/httpd -DFOREGROUND
gnocchi   9368  9358  0 232249 100376 0 07:51 ?        Sl     0:03  \_ /usr/sbin/httpd -DFOREGROUND
# cat /proc/9367/status | grep "Threads"
Threads:	5
# cat /proc/9368/status | grep "Threads"
Threads:	5

The new number of threads is OK

Comment 6 errata-xmlrpc 2016-12-14 15:56:34 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.


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