Ask Your Question
1

2 cores, 1 vCPU. kvm/qemu (or xen)

asked 2016-03-23 08:23:37 -0600

collen gravatar image

Hi

is there a way to bond 2 cores (or more) from my cpu to 1 virtual cpu with kvm ? Was looking into cpu pinning and cpuset, but it's a real hassle to understand it all.

just want to run a program in a VM, that uses 1 thread and divide it over 2 cores.. any other suggestions are welcome ofcoz.

Thx, Collen

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-23 15:15:55 -0600

genodeftest gravatar image

Install Virt-Manager (from Fedora's package repositories). This is a GUI for visualization like kvm/qemu or xen. You can configure your virtual machine there and set CPU affinity. If virt-manager isn't the right tool for you, you may use virtualbox instead, though its fedora support is somewhat limited.

If you don't want to run a virtual machine, just have a look at CLI tool taskset. Documentation can be found on man 1 taskset. It's fairly easy to use.

edit flag offensive delete link more

Comments

Thx for the input, i already tried Virt-manager but did not got it to work with 1 vcpu and 2 cores... the other way around works.... (2vcpu, 2 cores)

I'm going to give taskset a try, but my guess is that it can't be done... spanning 1 process or thread over more then 1 core...

collen gravatar imagecollen ( 2016-03-28 09:20:18 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-23 08:23:37 -0600

Seen: 167 times

Last updated: Mar 23 '16