Bug 1244852
| Summary: | openstack-nova-api metadata service is surprisingly slow with memcached | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Attila Fazekas <afazekas> |
| Component: | openstack-nova | Assignee: | Sven Anderson <svanders> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | nlevinki <nlevinki> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | Director | CC: | berrange, dasmith, eglynn, kchamart, sbauza, sferdjao, sgordon, srevivo, svanders, vromanso |
| Target Milestone: | --- | Keywords: | ZStream |
| Target Release: | 8.0 (Liberty) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-10 14:53:13 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: | |
| Embargoed: | |||
|
Description
Attila Fazekas
2015-07-20 15:21:29 UTC
The problem is, that the cache is populated with metadata when lazy fields of the instance object are yet missing. In this case "flavor" data has not been loaded, and therefore is not cached and consequently queried for each request from the database. Triggering the the lazy load before caching increases the performance by a factor of 25. I will investigate, how this can be solved properly. Related RHOS5 issue: https://bugzilla.redhat.com/show_bug.cgi?id=1302413 The metadata caching is flawed in general: https://bugs.launchpad.net/nova/+bug/1549814 There are fixes upstream, which pre-fetches some of data before caching, here: https://github.com/openstack/nova/commit/3a761270581d1ac61a3b4669c130d211f1ad5a17#diff-969229657f01b56c336e01497df732d7R1226 and here: https://github.com/openstack/nova/commit/cc41015d463e11ac11bbaaac0b5c441329dc5f0b#diff-567f52edc17aff6c473d69c341a4cb0cR513 The second alone would fix this issue, since it pre-fetches the flavor data. Unfortunately the second change introduced the pre-fetch as a side-effect, so it cannot be backported as is. I have submitted two upstream changes that are related to this. Disabling memached for metadata caching: https://review.openstack.org/#/c/285530 No parallel queries of the same data (this addresses point 2 in the description): https://review.openstack.org/#/c/285562 Because of upstream fixes there is no performance issue in liberty/OSP8 anymore. |