Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1372821 - Gnocchi API processes tuned to 1 with cpu_count for threads out of box
Gnocchi API processes tuned to 1 with cpu_count for threads out of box
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 10.0 (Newton)
Assigned To: Pradeep Kilambi
Mehdi ABAAKOUK
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-02 15:09 EDT by Alex Krzos
Modified: 2016-12-14 10:56 EST (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-14 10:56:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 368124 None None None 2016-10-05 12:45 EDT
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 14:55:27 EST

  None (edit)
Description Alex Krzos 2016-09-02 15:09:38 EDT
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:
1.
2.
3.

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 04:19:57 EDT
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 10:56:34 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.

https://rhn.redhat.com/errata/RHEA-2016-2948.html

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