To provide some additional infrastructure statistics i.e., number of hosts/ CPU sockets managed by cloudstack which reflects the size of the cloud.
Scope of this document is to provide a functional specification for the Report CPU sockets implementation for 4.3 release.
Proposal: http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201310.mbox/%3CFF3AF618-A5C8-4F36-8F3A-C8280A154287@citrix.com%3E
Jira ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-4908
Cloudstack manages different types of hosts that contains one or more physical cpu sockets.
We can list the number of hosts that are managed by CS using listHosts API. We introduce a new parameter value in response called "cpusockets" that holds the number cpu sockets of particular host where ever we can retrieve (otherwise we mark it as NULL).
Upon listing hosts we can count the number of cpu sockets for all hosts.
Xenserver:
- In Xenserver version 6.2 there is xapi call "host-cpu-info" in which we can get the "socket-count" per each host.
- In earlier versions of Xenserver 6.2 there is no such call so we do not counting cpu sockets for those hypervisors.
VMWare:
- vim25 provides data object "HostHardwareSummary" in which we can get the cpu socket count from the parameter, numCpuPkgs - "Number of physical CPU packages on the host. Physical CPU packages are chips that contain one or more processors. Processors contained by a package are also known as CPU cores. For example, one dual-core package is comprised of one chip that contains two CPU cores."
KVM:
- Using Virsh command "nodeinfo" number of cpu sockets can be retrieved.
HyperV:
-We provide the number of physical cpu sockets per host and upon listing hosts we can count the number of cpu sockets for all hosts.
Oracle VM, LXC:
- For these hypervisors we will list the number of host being managed. Retrieving socket information for these hypervisors may require domain experts for the corresponding hypervisor. Now we will give the number of hosts.
We introduce a new column named "cpu_scokets" in the table "host" which holds the number of cpu sockets for the hypervisors.
New Column: Table "host"
cpu_sockets int(10) unsigned DEFAULT NULL
We will introduce
1) new parameter in listhost API call named "hypervisor"
2) new parameter in listhost response named "cpusockets"
In reponse we have new parameter value "cpusockets":1
We show the following information in 'Infrastructure' tab.
From UI it looks like
===========================================================
Hypervisor | Hosts | Sockets
===========================================================
VMware | 20 | 45
----------------------------------------------
XenServer 6.2| 50 | 70
----------------------------------------------
XenServer | 50 | unknown
----------------------------------------------
KVM | 15 | 35
----------------------------------------------
Hyper-V | 30 | unknown
===========================================================
Some minimal calculations are required from the listHost response.
1) Call listHosts API with filter "hypervisor" (say xenserver)
2) take the count of number of hosts
3) In the response we need to take sum of all the values of parameter "cpusockets". If cpusockets are not mentioned for particular hypervisor type we leave the value as unknown.
This we need to for all hypervisor types.
For Xenserver 6.2 prior versions we are not counting number of sockets. For the remaining hypervisors OVM, LXC require corresponding hypervisor experts to fill in the socket information