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.
...
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 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.
...
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 "hypervisortype"
2) new parameter in listhost response named "cpusockets"
...
In reponse we have new parameter value "cpusockets":1
From UI it looks like
===========================================================
...
Hypervisor
...
|
...
Hosts
...
|
...
Sockets
...
===========================================================
...
VMware | 20 | 45
---------------------------------------------
...
-
...
XenServer
...
|
...
50
...
|
...
70
...
---------------------------------------------
...
-
...
KVM
...
|
...
15
...
|
...
35
...
---------------------------------------------
...
-
...
Hyper-V
...
|
...
30
...
|
...
unknown
...
===========================================================
...
Some
...
minimal
...
calculations
...
are
...
required
...
from
...
the
...
listHost
...
response.
...
1)
...
Call
...
listHosts
...
API
...
with
...
filter
...
"hypervisortype"
...
(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.