kvm:set_cpu_shares_for_live_running_instance_permanently
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
kvm:set_cpu_shares_for_live_running_instance_permanently [2020/08/19 11:51] – 192.168.1.1 | kvm:set_cpu_shares_for_live_running_instance_permanently [2020/08/19 12:01] (current) – 192.168.1.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== KVM - Set CPU Shares | + | ====== KVM - Set CPU Shares |
<code bash> | <code bash> | ||
Line 15: | Line 15: | ||
**NOTE: | **NOTE: | ||
- | On Linux, you can use **taskset** to force specific threads onto specific CPUs. So that will let you assign one VCPU to one physical CPU and two VCPUs to another. See, for example, https:// | + | On Linux, you can use **taskset** to force specific threads onto specific CPUs. So that will let you assign one VCPU to one physical CPU and two VCPUs to another. |
- | A virtual CPU equates to 1 physical core, but when your VM attempts to process something, it can potentially run on any of the cores that happen to be available at that moment. The scheduler handles this, and the VM is not aware of it. You can assign multiple vCPUs to a VM which allows it to run concurrently across several cores. | + | A virtual CPU equates to 1 physical core, but when your VM attempts to process something, it can potentially run on any of the actual |
Cores are shared between all VMs as needed, so you could have a 4-core system, and 10 VMs running on it with 2 vCPUs assigned to each. VMs share all the cores in your system quite efficiently as determined by the scheduler. This is one of the main benefits of virtualization - making the most use of under-subscribed resources to power multiple OS instances. | Cores are shared between all VMs as needed, so you could have a 4-core system, and 10 VMs running on it with 2 vCPUs assigned to each. VMs share all the cores in your system quite efficiently as determined by the scheduler. This is one of the main benefits of virtualization - making the most use of under-subscribed resources to power multiple OS instances. | ||
Line 46: | Line 46: | ||
Let’s look at both options for manipulating your kvm virtual machines processes. | Let’s look at both options for manipulating your kvm virtual machines processes. | ||
+ | |||
+ | ---- | ||
==== Start a VM with specific CPU affinity ==== | ==== Start a VM with specific CPU affinity ==== | ||
Line 148: | Line 150: | ||
===== References ===== | ===== References ===== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
https:// | https:// |
kvm/set_cpu_shares_for_live_running_instance_permanently.1597837875.txt.gz · Last modified: 2020/08/19 11:51 by 192.168.1.1