Skip to content

Commit b3c3f91

Browse files
api: add to cpu speed parameter a description of the cgroup2 case (#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: #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 0f8a839 commit b3c3f91

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
@@ -56,7 +56,11 @@ public class CreateServiceOfferingCmd extends BaseCmd {
5656
@Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER, required = false, description = "the CPU number of the service offering")
5757
private Integer cpuNumber;
5858

59-
@Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER, required = false, description = "the CPU speed of the service offering in MHz.")
59+
@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" +
60+
"For the KVM hypervisor," +
61+
" 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" +
62+
" 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" +
63+
" VMs. For more information, see https://libvirt.org/formatdomain.html#cpu-tuning.")
6064
private Integer cpuSpeed;
6165

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

0 commit comments

Comments
 (0)