[pve-devel] [PATCH] implement cpuunit with cgroups

Dietmar Maurer dietmar at proxmox.com
Tue Jun 2 08:18:17 CEST 2015


> -	description => "Limit of CPU usage in per cent. Note if the computer has 2
> CPUs, it has total of 200% CPU time. Value '0' indicates no CPU
> limit.\n\nNOTE: This option is currently ignored.",
> +	description => "Limit of CPU usage in per cent. Note if the computer has 2
> CPUs, it has total of 200% CPU time. Value '0' indicates no CPU limit.\n\n.",
>  	minimum => 0,
>  	default => 0,
>      },
> @@ -2562,6 +2562,10 @@ sub config_to_command {
>      push @$cmd, '--slice', "qemu";
>      push @$cmd, '--unit', $vmid;
>      push @$cmd, '-p', "CPUShares=$cpuunits";
> +    if ($conf->{cpulimit}) {
> +	my $cpulimit = $conf->{cpulimit} * 100;

why *100 (description states value is already in %)?

> +	push @$cmd, '-p', "CPUQuota=$cpulimit"."\%";
> +    }
>




More information about the pve-devel mailing list