I agree to some extent, but I might suggest that discovery and exposure of host system physical resources may be better left to other APIs, since such functionality has widespread uses outside of virtualization management.
Since you bring it up, we - Open Source CIM interfaces for Xen, via libvirt - are actually having to face this exact problem today, namely what is/are good standardized cross-platform cross-distro Linux interfaces for exposing physical hardware info necessary for virtual resource allocation. Right now we have a some Open Source Linux CIM providers exposing h/w info mined out of, say, /proc, but the architecture and distro ifdefs are getting out of hand... You are quite correct in stating this requirement, and there seems to be multiple candidates (SMBIOS, HPI, SNMP, etc) but I don't have a good answer. My concern would be trying to add and solve this problem within the scope of libvirt.
- Gareth
Dr. Gareth S. Bestor
IBM Linux Technology Center
M/S DES2-01
15300 SW Koll Parkway, Beaverton, OR 97006
503-578-3186, T/L 775-3186, Fax 503-578-3186
"Daniel P. Berrange" <berrange@redhat.com>
|
|
To: libvir-list@redhat.com
cc:
Subject: [Libvir] RFC: requesting APIs for host physical resource discovery |
The current libvirt APIs allow the host's physical resources to be split up
and allocated to guest domains, however, there is no way to discover what
the available host resources actually are. Thus I would like to suggest the
inclusion of new APIs to enable host resource discovery. As a starting point
I'd like to be able to query the following information:
* Number of physical CPUs - ability to enumerate the CPUs in the host,
both those currently present, and theoretical maximum (to take account
of hotplug).
* Amount of RAM - actual physical RAM present, and that available for
guest usage (eg discounting that reserved by a hypervisor or equiv)
* CPU relationship - ie ability to distinguish between CPUs which
are hyperthread siblings, on same core, or on separate sockets
Alonside these basic queries it would be desirable to add a further resource
resource management API to allow for setting of a guest domain's CPU affinity.
ie ability control what CPUs the VMM is allowed to schedule a domain on.
Once this first basic set of caapbilties for resource discovery are provided
for, then I believe it will be neccessary to provide some more advanced
queries, in particular:
* NUMA topology - ability to enumerate NUMA nodes, the CPUs associated
with each node & the RAM range mapped to that node
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list