X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=pct.adoc;h=fde647ad6769d4fe2a5eae0faba39aaf15f941ed;hp=7a5e9b705bb6d2ec43c1613f896275bc1fc42ef8;hb=b179764dcbed98e70fccfcab3f8476fe1eeef074;hpb=4f785ca73bb3f0d15e98ee465126ae418d524a14 diff --git a/pct.adoc b/pct.adoc index 7a5e9b7..fde647a 100644 --- a/pct.adoc +++ b/pct.adoc @@ -2,7 +2,6 @@ ifdef::manvolnum[] pct(1) ====== -include::attributes.txt[] :pve-toplevel: NAME @@ -23,7 +22,6 @@ endif::manvolnum[] ifndef::manvolnum[] Proxmox Container Toolkit ========================= -include::attributes.txt[] :pve-toplevel: endif::manvolnum[] ifdef::wiki[] @@ -347,10 +345,69 @@ ACLs allow you to set more detailed file ownership than the traditional user/ group/others model. -[[pct_setting]] +[[pct_settings]] Container Settings ------------------ +[[pct_cpu]] +CPU +~~~ + +You can restrict the number of visible CPUs inside the container using +the `cores` option. This is implemented using the Linux 'cpuset' +cgroup (**c**ontrol *group*). A special task inside `pvestatd` tries +to distribute running containers among available CPUs. You can view +the assigned CPUs using the following command: + +---- +# pct cpusets + --------------------- + 102: 6 7 + 105: 2 3 4 5 + 108: 0 1 + --------------------- +---- + +Containers use the host kernel directly, so all task inside a +container are handled by the host CPU scheduler. {pve} uses the Linux +'CFS' (**C**ompletely **F**air **S**cheduler) scheduler by default, +which has additional bandwidth control options. + +[horizontal] + +`cpulimit`: :: You can use this option to further limit assigned CPU +time. Please note that this is a floating point number, so it is +perfectly valid to assign two cores to a container, but restrict +overall CPU consumption to half a core. ++ +---- +cores: 2 +cpulimit: 0.5 +---- + +`cpuunits`: :: This is a relative weight passed to the kernel +scheduler. The larger the number is, the more CPU time this container +gets. Number is relative to the weights of all the other running +containers. The default is 1024. You can use this setting to +prioritize some containers. + + +[[pct_memory]] +Memory +~~~~~~ + +Container memory is controlled using the cgroup memory controller. + +[horizontal] + +`memory`: :: Limit overall memory usage. This corresponds +to the `memory.limit_in_bytes` cgroup setting. + +`swap`: :: Allows the container to use additional swap memory from the +host swap space. This corresponds to the `memory.memsw.limit_in_bytes` +cgroup setting, which is set to the sum of both value (`memory + +swap`). + [[pct_mount_points]] Mount Points @@ -432,8 +489,8 @@ NOTE: The contents of device mount points are not backed up when using `vzdump`. [[pct_container_network]] -Container Network -~~~~~~~~~~~~~~~~~ +Network +~~~~~~~ You can configure up to 10 network interfaces for a single container. The corresponding options are called `net0` to `net9`, and