You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by "btzq (via GitHub)" <gi...@apache.org> on 2024/10/15 15:36:13 UTC

[D] CPU Pinning For KVM and Guest VMs [cloudstack]

GitHub user btzq created a discussion: CPU Pinning For KVM and Guest VMs

Hi Community, 

We are thinking if its possible for:

Idea 1: CPU Pin specific cores of the Physical Server, for KVM Hypervisor purposes only.
- Goal of this is to avoid context switching between running the hypervisor and guest VMs

Idea 2: CPU Pin specific vCPU to guest VMs
- Goal is to improve performance of guest VMs, especially in latency sensitive applications (stock trading). 
- Live Migration is important to us, will this feature break it?

Has anyone achieved this before? How did you do it?

GitHub link: https://github.com/apache/cloudstack/discussions/9801

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org


Re: [D] CPU Pinning For KVM and Guest VMs [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache added a comment to the discussion: CPU Pinning For KVM and Guest VMs

You can try libvirt hooks which can change the VM xml definition before/after vm is started/stopped/migrated.



GitHub link: https://github.com/apache/cloudstack/discussions/9801#discussioncomment-10967348

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org


Re: [D] CPU Pinning For KVM and Guest VMs [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
GitHub user btzq added a comment to the discussion: CPU Pinning For KVM and Guest VMs

@rajujith no we havent tried those out. Just wondering if someone else has done this before so we could learn from them. 

When you meant agent hooks, do you mean KVM Agent Hooks?
https://cwiki.apache.org/confluence/display/CLOUDSTACK/KVM+hook+script+include

GitHub link: https://github.com/apache/cloudstack/discussions/9801#discussioncomment-10960235

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org


Re: [D] CPU Pinning For KVM and Guest VMs [cloudstack]

Posted by "rajujith (via GitHub)" <gi...@apache.org>.
GitHub user rajujith added a comment to the discussion: CPU Pinning For KVM and Guest VMs

@btzq  regarding 'Idea 1' have you tried extraconfig or agent hooks? We will need some testing to see if live migration could break. 

GitHub link: https://github.com/apache/cloudstack/discussions/9801#discussioncomment-10954901

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org


Re: [D] CPU Pinning For KVM and Guest VMs [cloudstack]

Posted by "rajujith (via GitHub)" <gi...@apache.org>.
GitHub user rajujith added a comment to the discussion: CPU Pinning For KVM and Guest VMs

@btzq  I can think of three ways, but I haven't tried these with CPU pinning. Let's see if anyone has tried CPU pinning. 
1) Extraconfig : https://www.shapeblue.com/cloudstack-feature-first-look-enable-sending-of-arbitrary-configuration-data-to-vms/
2) KVM Agent hooks: https://github.com/apache/cloudstack/pull/3839
3) Libvirt hooks: https://docs.cloudstack.apache.org/en/latest/adminguide/hosts.html#kvm-libvirt-hook-script-include

GitHub link: https://github.com/apache/cloudstack/discussions/9801#discussioncomment-10966696

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org


Re: [D] CPU Pinning For KVM and Guest VMs [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
GitHub user btzq closed a discussion: CPU Pinning For KVM and Guest VMs

Hi Community, 

We are thinking if its possible for:

Idea 1: CPU Pin specific cores of the Physical Server, for KVM Hypervisor purposes only.
- Goal of this is to avoid context switching between running the hypervisor and guest VMs

Idea 2: CPU Pin specific vCPU to guest VMs
- Goal is to improve performance of guest VMs, especially in latency sensitive applications (stock trading). 
- Live Migration is important to us, will this feature break it?

Has anyone achieved this before? How did you do it?

GitHub link: https://github.com/apache/cloudstack/discussions/9801

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org