| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-04-19 | |||
| 14:56:17 | dansmith | it's just that we get the value either calculated from meta, or already set if the instance has had it done | |
| 14:56:21 | dansmith | it's still the same answer | |
| 14:56:23 | bauzas | right | |
| 14:56:31 | bauzas | so, the key is the tuple (image, flavor) | |
| 14:56:35 | bauzas | well | |
| 14:56:38 | dansmith | no | |
| 14:56:46 | bauzas | (image, flavor, hv_type, hv_version) | |
| 14:56:51 | dansmith | yeah | |
| 14:56:51 | dansmith | the key is a hash value of flavorid, a set of image properties, hv, version) | |
| 14:57:00 | dansmith | not image id though | |
| 14:57:08 | mriedem | what other nasty things is the RT doing that we aren't thinking about? | |
| 14:57:12 | mriedem | cpu pinning stuff on the host? | |
| 14:57:21 | edleafe | Can we simplify things and get a good estimate of what the max total overhead could ever be on a particular host? | |
| 14:57:24 | bauzas | mriedem: I think we CPU pin indeed | |
| 14:57:27 | edleafe | And then just reserve that? | |
| 14:57:48 | mriedem | edleafe: as cdent noted earlier, we don't get the reserved inventory for this | |
| 14:57:58 | bauzas | mriedem: AFAIK, we just verify if we can accept a host for CPU pinning, but we do set the pin between pCPU and vCPU at the RT stage | |
| 14:58:08 | sfinucan | mriedem: Yeah, you're looking for calls to 'numa_fit_instance_to_host' | |
| 14:58:08 | bauzas | sfinucan: correct ? ^ | |
| 14:58:32 | edleafe | mriedem: I mean when creating the resource provider, add the total overhead it might need to the reserved part for the hypervisor | |
| 14:58:33 | sfinucan | bauzas: Correct | |
| 14:58:37 | cdent | mriedem: that's not what I said. What I said was _if_ we change reserved, we don't change the allocations. I actually think making a good guess at what global overhead is at boot time, and adding that to reserved is the right way to go | |
| 14:58:56 | cdent | s/boot/host boot/ | |
| 14:59:01 | sfinucan | We call 'numa_fit_instance_to_host' to make sure that the instance would fit on a host with a given CPU pinning permutation | |
| 14:59:09 | dansmith | cdent: meaning claim more and update later? | |
| 14:59:31 | mriedem | edleafe: cdent: i don't really know how we can safely estimate that, | |
| 14:59:31 | edleafe | dansmith: no, just claim what the instance uses | |
| 14:59:42 | dansmith | edleafe: eh? | |
| 14:59:44 | mriedem | w/o knowing which flavors will be used, which scheduler filters are being used, etc | |
| 14:59:46 | cdent | dansmith: no, continue making allocations using the non-overhead values. incorporate the expected in 'reserved' of inventory | |
| 14:59:47 | sfinucan | It's the easiest way to check that out for things like cpu_thread_policy, where we can't do a simple "have I X free CPUs" check | |
| 14:59:51 | dansmith | edleafe: we're claiming before we know that, that's the whole point | |
| 15:00:02 | bauzas | okay, here is a thinh | |
| 15:00:04 | edleafe | dansmith: it would already be accounted for | |
| 15:00:09 | dansmith | cdent: oh, that's what I initially was saying, yeah | |
| 15:00:12 | bauzas | given all the nasty and fancy things we do with RT | |
| 15:00:15 | edleafe | in the RP's reserved | |
| 15:00:17 | bauzas | I have a though | |
| 15:00:38 | bauzas | why not just posting an allocation without all that stuff, and do modify the allocation at the RT state ? | |
| 15:00:43 | dansmith | cdent: not claim the flavor+overhead, but claim flavor, and require reserved to be set high enough to cover it | |
| 15:00:53 | mriedem | bauzas: that's one of the options i said in the spec | |
| 15:00:56 | dansmith | bauzas: because that's terrible | |
| 15:01:00 | edleafe | I see chasing the last tiny bit of resource is going to make the code an even bigger mess than it is now | |
| 15:01:01 | bauzas | ie. we claim for the resouces we know, but we later heal that when we claim | |
| 15:01:17 | bauzas | when we /RT/.claim | |
| 15:01:21 | cdent | dansmith: yes, but doing that in an semi-automated way based on the initial calculated (and config'd) inventory. Updating it at boot time. | |
| 15:01:32 | bauzas | either way, placement doesn't know a bit of that NFV gangband | |
| 15:01:38 | dansmith | cdent: well, whether or not we do that is a detail I guess | |
| 15:01:53 | bauzas | so I think NFV claims would still be a 2-phase step | |
| 15:02:07 | dansmith | cdent: however, I think I lost sight of that as a simple option early on | |
| 15:02:14 | bauzas | ie. rounding the allocation by the scheduler, and refine that allocation as soon as we have a better vision | |
| 15:02:18 | dansmith | cdent: that's probably the way to go, yeah, and do the more complex thing if that ends up being to naive for some reason | |
| 15:02:24 | cdent | dansmith: yes | |
| 15:02:39 | cdent | otherwise we run into some very complex wangling for unclear gains | |
| 15:02:41 | dansmith | cdent: I lost sight of it when we started talking about claiming the flavor+overhead in one go | |
| 15:02:48 | dansmith | cdent: which means we couldn't rely on reserved | |
| 15:03:07 | bauzas | soooo | |
| 15:03:36 | mriedem | dansmith: cdent: so would that be based on reserved_host_disk_mb and reserved_host_memory_mb ? | |
| 15:03:38 | bauzas | could we save my life, and assume that we would POST an allocation that is rounded, and later refine it within the instance_claim phase, exactly like we already do ? | |
| 15:04:09 | bauzas | 90% of users would have benefits, and things wouldn't change (even improve) for NFV users | |
| 15:04:10 | cdent | bauzas: we slightly increase the risk of retry/error if the second claim can't claim | |
| 15:04:22 | dansmith | mriedem: cdent: and vcpu | |
| 15:04:24 | cdent | seems better to not allocation overhead per instance | |
| 15:04:37 | bauzas | cdent: like we already do :) | |
| 15:04:41 | cdent | yes | |
| 15:04:46 | cdent | and instead cover it with reserved | |
| 15:04:48 | cdent | it is safer | |
| 15:04:52 | dansmith | mriedem: cdent: meaning, we'd have to always have at least one reserved vcpu | |
| 15:04:59 | cdent | more likely to have successful claims more often | |
| 15:05:08 | mriedem | dansmith: today in _compute_node_to_inventory_dict in the scheduler report client we don't reserve any vcpu | |
| 15:05:15 | dansmith | right | |
| 15:05:19 | cdent | dansmith: I believe you, but why? | |
| 15:05:33 | dansmith | cdent: because libvirt needs to have vcpu+1 if certain flavor configs are set | |
| 15:05:39 | cdent | ah, okay | |
| 15:06:08 | dansmith | cdent: if you ask for dedicated io threads or something, then it requires another vcpu dedicated to you to handle that | |
| 15:06:12 | mriedem | dansmith: cdent: thinking ahead, _compute_node_to_inventory_dict is only used for the old style driver.get_available_resource call, | |
| 15:06:24 | dansmith | cdent: which is really expensive, and probably unfortunate for people that don't want that, so we'd need a way to not reserve the last vcpu on a system for people that don't want it | |
| 15:06:28 | mriedem | with get_inventory() we could make the reservation calculation in the virt drivers that actually do this overhead thing | |
| 15:06:55 | cdent | yes | |
| 15:07:06 | dansmith | sure, but libvirt needs to not do that if the operator doesn't want it, | |
| 15:07:17 | dansmith | because they may have no flavors configured for this dedicated thing, | |
| 15:07:23 | dansmith | and we don't want to prevent them from using their last vcpu :) | |
| 15:07:45 | mriedem | are you talking to me or cdent? | |
| 15:07:49 | cdent | how much does that matter (the last vcpu) | |
| 15:07:56 | cdent | mriedem: yes, about get_inventory, I like get_inventory | |
| 15:07:56 | dansmith | you | |
| 15:08:08 | dansmith | heh | |
| 15:08:09 | dansmith | cdent: vcpus are few | |
| 15:08:10 | dansmith | cdent: compared to memory or disk | |
| 15:08:15 | bauzas | sorry, in a meeting atm | |
| 15:08:24 | dansmith | cdent: imagine a cloud of 4-core ARM boxes | |
| 15:08:32 | dansmith | where you lose one core per system | |
| 15:08:54 | cdent | are we losing a pcpu or a vcpu? | |
| 15:09:04 | mriedem | dansmith: "libvirt needs to not do that if the operator doesn't want it," - we just take that into account in the libvirt get_inventory() method don't we? | |
| 15:09:15 | mriedem | when determining the reserved value for the VCPU resource provider inventory? | |
| 15:09:16 | cdent | (physical, not pinned) | |
| 15:09:16 | dansmith | mriedem: yeah, it just has to be configurable | |
| 15:09:25 | dansmith | mriedem: and we don't have that currently, AFAIK | |
| 15:09:32 | dansmith | mriedem: we have reserved disk and memory only right? | |
| 15:09:39 | mriedem | dansmith: as far as i know | |