Description of problem:
Scale testing with Ceilometer Agent-Notification publishing directly to Gnocchi has revealing that spawning threads to create measure objects and adding a key to the omap object "measure" for the Gnocchi backlog causes performance issues. The current code for Gnocchi 3.1 creates N number of Threads (Based on core count)  to create the ceph backlog measures but all write a key to a single object. When measuring Gnocchi API Request times (Apache Log %D) we can see POST taking >1min(And much greater at large scale and eventually greater than the httpd timeout (120s). Http gateway timeout Error messages in Ceilometer Notification Agent logs are a good indicator that this problem is occurring.
By batching all new measure objects and the adding of the key to the omap object we reduce the request time from >1min-30s or greater to ~2-5s on the same hardware. Example patch  reduces overall time that is required to move data with Ceilometer Notification-Agent into Gnocchi Ceph Storage for processing.
Version-Release number of selected component (if applicable):
Ocata Beta (OSP11)
With a large enough scale you will see this issue.
Steps to Reproduce:
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=1430588
This has been ever been backported to OSP 10, so marking as done.
This is a performance issue that is not verifiable by standard QE process. What Alex described has been solved in Gnocchi 4 because the way the data are written are now batched. The patch has already been backported to OSP 10 and OSP 11 and shipped to customers.
This has been merged in Gnocchi 3.1.5. I realize that the Fixed in Version is wrong here.
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.