Skip to content

Commit dfd01c4

Browse files
authored
Add info about performance with vm stats (#369)
Address apache/cloudstack#8364
1 parent 883174f commit dfd01c4

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

source/adminguide/virtual_machines.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,11 +1445,24 @@ Instance statistics are collected on a regular interval (defined by global
14451445
setting vm.stats.interval with a default of 60000 milliseconds).
14461446
Instance statistics include compute, storage and Network statistics.
14471447

1448-
Instance statistics are stored in the database as historical data for a desired time period. These historical statistics then can be retrieved using listVirtualMachinesUsageHistory API. For system VMs, the same historical statistics can be retrieved using listSystemVmsUsageHistory API
1448+
Instance statistics are stored in the database as historical data for a desired time period. These historical statistics then can be retrieved using ``listVirtualMachinesUsageHistory`` API. For system VMs, the same historical statistics can be retrieved using ``listSystemVmsUsageHistory`` API
14491449

1450-
Instance statistics retention time in the database is controlled by the global configuration - `vm.stats.max.retention.time`. Default value is 720 minutes, i.e., 12 hours. Another global configuration that affects Instance statistics is:
1450+
Instance statistics retention time in the database is controlled by the global configuration ``vm.stats.max.retention.time``, with a default value of 720 minutes, i.e., 12 hours. The interval in which the metrics are retrieved are defined by the global configuration ``vm.stats.interval``, which has a default value of 60,000 milliseconds, i.e., 1 minute. The default values are only meant for guideline, as they can have a major impact in DB performance. The equation below presents the overall storage size required considering the values of these configurations.
14511451

1452-
- `vm.stats.user.vm.only` - When set to 'false' stats for system VMs will be collected otherwise stats collection will be done only for user Instances.
1452+
.. math::
1453+
1454+
StatsSize = (\frac{retention * 60000}{interval}) * nodes * VMs * registrySize
1455+
1456+
- **StatsSize**: the size, in `bytes`, required for storing the VM stats;
1457+
- **retention**: the value of the configuration ``vm.stats.max.retention.time``;
1458+
- **interval**: the value of the configuration ``vm.stats.interval``;
1459+
- **nodes**: the number of nodes running the management server in the environment;
1460+
- **VMs**: the number of running VMs in the environment;
1461+
- **registrySize**: the estimated size, in `bytes`, of the registry in the DB;
1462+
1463+
Considering the default values of the configurations ``vm.stats.max.retention.time`` and ``vm.stats.interval``, three nodes running the management server, 10,000 running VMs and an estimated registry size of 400 bytes, it would need, approximately, 8 GB of storage to store VM stats. Therefore, the values for these configurations should be changed considering the CloudStack environment, evaluating the required storage and its impact in DB performance.
1464+
1465+
Another global configuration that affects Instance statistics is ``vm.stats.user.vm.only``. When set to 'false' stats for system VMs will be collected, otherwise stats collection will be done only for user Instances.
14531466

14541467
In the UI, historical Instance statistics are shown in the Metrics tab in an individual Instance view, as shown in the image below.
14551468

0 commit comments

Comments
 (0)