[openstack-dev] [nova] Metadata API cross joining "instance_metadata" and "instance_system_metadata"

Sergio A. de Carvalho Jr. scarvalhojr at gmail.com
Tue Oct 23 16:34:50 UTC 2018


Make sense, Dan.

Thanks so much for your help.

Sergio

On Tue, Oct 23, 2018 at 5:01 PM Dan Smith <dms at danplanet.com> wrote:

> > I tested a code change that essentially reverts
> > https://review.openstack.org/#/c/276861/1/nova/api/metadata/base.py
> >
> > In other words, with this change metadata tables are not fetched by
> > default in API requests. If I understand correctly, metadata is
> > fetched in separate queries as the instance object is
> > created. Everything seems to work just fine, and I've considerably
> > reduced the amount of data fetched from the database, as well as
> > reduced the average response time of API requests.
> >
> > Given how simple it is and the results I'm getting, I don't see any
> > reason not to patch my clusters with this change.
> >
> > Do you guys see any other impact this change could have? Anything that
> > it could potentially break?
>
> This is probably fine as a bandage fix, but it's not the right one for
> upstream, IMHO. By doing what you did, you cause two RPC round-trips to
> fetch the instance and then the metadata every single time the metadata
> API is hit (not including the cache). By converting the DB load to do
> the two-step, we still hit the DB twice, but only one RPC round-trip,
> which will be much more efficient especially at load/scale.
>
> --Dan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20181023/5ab3e6a7/attachment.html>


More information about the OpenStack-dev mailing list