[openstack-dev] Generic resource allocation API

Kaarle Ritvanen kaarle.ritvanen at nsn.com
Thu May 30 10:58:46 UTC 2013


Hello,

I have an improvement proposal for this blueprint detailing how to 
allocate PCI devices to instances:

https://blueprints.launchpad.net/nova/+spec/pci-passthrough-base

The blueprint proposes mechanisms to declare what kind of PCI devices 
are required in flavor definition, making scheduling decisions based on 
device availability, and attaching the device to the instance at 
hypervisor level.

I feel this pattern is not specific to PCI devices in any way. In a 
generalized version, the flavor declares the instance requires X units 
of resources of type Y. The host would advertise to the scheduler how 
much of Y it currently has available, and use a hypervisor-specific 
mechanism to actually allocate X units of Y to the instance if deployed 
there. Y could be memory, CPU time, network bandwidth (to a given 
Quantum network), storage capacity or bandwith, PCI device or virtual 
function etc. In case of KVM, the hypervisor-specific mechanism could be 
based e.g. on cgroups or tc.

I think we should consider making the API generic enough to cover all 
these use cases. We could also clean up the current flavor definitions 
by consolidating the memory and disk requirements under this generic API.

BR,
Kaarle



More information about the OpenStack-dev mailing list