Revision ff39194f man/gnt-instance.rst
b/man/gnt-instance.rst | ||
---|---|---|
527 | 527 |
versions >= 0.11.0. |
528 | 528 |
|
529 | 529 |
cpu\_mask |
530 |
Valid for the LXC hypervisor.
|
|
530 |
Valid for the Xen, KVM and LXC hypervisors.
|
|
531 | 531 |
|
532 | 532 |
The processes belonging to the given instance are only scheduled |
533 | 533 |
on the specified CPUs. |
534 | 534 |
|
535 |
The parameter format is a comma-separated list of CPU IDs or CPU |
|
536 |
ID ranges. The ranges are defined by a lower and higher boundary, |
|
537 |
separated by a dash. The boundaries are inclusive. |
|
535 |
The format of the mask can be given in three forms. First, the word |
|
536 |
"all", which signifies the common case where all VCPUs can live on |
|
537 |
any CPU, based on the hypervisor's decisions. |
|
538 |
|
|
539 |
Second, a comma-separated list of CPU IDs or CPU ID ranges. The |
|
540 |
ranges are defined by a lower and higher boundary, separated by a |
|
541 |
dash, and the boundaries are inclusive. In this form, all VCPUs of |
|
542 |
the instance will be mapped on the selected list of CPUs. Example: |
|
543 |
``0-2,5``, mapping all VCPUs (no matter how many) onto physical CPUs |
|
544 |
0, 1, 2 and 5. |
|
545 |
|
|
546 |
The last form is used for explicit control of VCPU-CPU pinnings. In |
|
547 |
this form, the list of VCPU mappings is given as a colon (:) |
|
548 |
separated list, whose elements are the possible values for the |
|
549 |
second or first form above. In this form, the number of elements in |
|
550 |
the colon-separated list _must_ equal the number of VCPUs of the |
|
551 |
instance. |
|
552 |
|
|
553 |
Example:: |
|
554 |
|
|
555 |
# Map the entire instance to CPUs 0-2 |
|
556 |
gnt-instance modify -H cpu_mask=0-2 my-inst |
|
557 |
|
|
558 |
# Map vCPU 0 to physical CPU 1 and vCPU 1 to CPU 3 (assuming 2 vCPUs) |
|
559 |
gnt-instance modify -H cpu_mask=1:3 my-inst |
|
560 |
|
|
561 |
# Pin vCPU 0 to CPUs 1 or 2, and vCPU 1 to any CPU |
|
562 |
gnt-instance modify -H cpu_mask=1-2:all my-inst |
|
563 |
|
|
564 |
# Pin vCPU 0 to any CPU, vCPU 1 to CPUs 1, 3, 4 or 5, and CPU 2 to |
|
565 |
# CPU 0 (backslashes for escaping the comma) |
|
566 |
gnt-instance modify -H cpu_mask=all:1\\,3-5:0 my-inst |
|
567 |
|
|
568 |
# Pin entire VM to CPU 0 |
|
569 |
gnt-instance modify -H cpu_mask=0 my-inst |
|
570 |
|
|
571 |
# Turn off CPU pinning (default setting) |
|
572 |
gnt-instance modify -H cpu_mask=all my-inst |
|
538 | 573 |
|
539 | 574 |
usb\_mouse |
540 | 575 |
Valid for the KVM hypervisor. |
Also available in: Unified diff