yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80761
[Bug 1853370] [NEW] resize_claim lazy-loads at least 3 joined fields in separate DB calls
Public bug reported:
During a resize_claim the ResourceTracker lazy-loads in 3 separate calls
to the DB (over RPC) these 3 fields:
b"2019-11-20 16:13:29,521 DEBUG [nova.objects.instance] Lazy-loading 'pci_requests' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
b"2019-11-20 16:13:29,525 DEBUG [nova.objects.instance] Lazy-loading 'resources' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
b"2019-11-20 16:13:29,527 DEBUG [nova.objects.instance] Lazy-loading 'pci_devices' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
It seems we should be able to collapse that into a single DB call to
load the necessary fields in a single call.
We could add a new extra_attrs kwarg to the Instance.refresh method so
we can keep using the same instance we have in memory (and is shared by
the ComputeManager method calling the resize_claim) or we could add a
new load_if_not_present() method to the Instance object. I'm not sure if
there are pros/cons either way on using refresh or adding a new method.
** Affects: nova
Importance: Low
Status: Confirmed
** Tags: performance resize
** Changed in: nova
Status: New => Confirmed
** Changed in: nova
Importance: Undecided => Low
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1853370
Title:
resize_claim lazy-loads at least 3 joined fields in separate DB calls
Status in OpenStack Compute (nova):
Confirmed
Bug description:
During a resize_claim the ResourceTracker lazy-loads in 3 separate
calls to the DB (over RPC) these 3 fields:
b"2019-11-20 16:13:29,521 DEBUG [nova.objects.instance] Lazy-loading 'pci_requests' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
b"2019-11-20 16:13:29,525 DEBUG [nova.objects.instance] Lazy-loading 'resources' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
b"2019-11-20 16:13:29,527 DEBUG [nova.objects.instance] Lazy-loading 'pci_devices' on Instance uuid c0fdac69-b360-4526-917e-16fb018cb8a3"
It seems we should be able to collapse that into a single DB call to
load the necessary fields in a single call.
We could add a new extra_attrs kwarg to the Instance.refresh method so
we can keep using the same instance we have in memory (and is shared
by the ComputeManager method calling the resize_claim) or we could add
a new load_if_not_present() method to the Instance object. I'm not
sure if there are pros/cons either way on using refresh or adding a
new method.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1853370/+subscriptions