Red Hat Bugzilla – Bug 1372821
Gnocchi API processes tuned to 1 with cpu_count for threads out of box
Last modified: 2016-12-14 10:56:34 EST
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.
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
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