Skip to content

Commit 0fcbb64

Browse files
DaanHooglandBryanMLima
authored andcommitted
api: add to cpu speed parameter a description of the cgroup2 case (apache#9191)
This PR adds to the cpuSpeed parameter of CreateServiceOfferingCmd a description how it will be interpreted in the case cgroups are being used on KVM. Fixes: apache#6743 Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com> --------- Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com>
1 parent c64c3a5 commit 0fcbb64

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ public class CreateServiceOfferingCmd extends BaseCmd {
5454
@Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER, required = false, description = "the CPU number of the service offering")
5555
private Integer cpuNumber;
5656

57-
@Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER, required = false, description = "the CPU speed of the service offering in MHz.")
57+
@Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER, required = false, description = "For VMware and Xen based hypervisors this is the CPU speed of the service offering in MHz.\n" +
58+
"For the KVM hypervisor," +
59+
" the values of the parameters cpuSpeed and cpuNumber will be used to calculate the `shares` value. This value is used by the KVM hypervisor to calculate how much time" +
60+
" the VM will have access to the host's CPU. The `shares` value does not have a unit, and its purpose is being a weight value for the host to compare between its guest" +
61+
" VMs. For more information, see https://libvirt.org/formatdomain.html#cpu-tuning.")
5862
private Integer cpuSpeed;
5963

6064
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the service offering, defaults to 'name'.")

0 commit comments

Comments
 (0)