Ask Your Question
2

Levels of importance? VCPU allocation

asked 2014-03-30 08:09:29 -0500

Thomas87 gravatar image

updated 2014-03-31 04:48:57 -0500

Hi,

Is it possible to divide virtual machines on the same compute node in different levels of importance?

I want to make sure that staff have higher priority than students in regards to VCPU?

For instance give staff a CPU ratio of 1:1 while students have 1:16..

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2014-03-31 09:48:36 -0500

SamYaple gravatar image

This is most definetly possible! In fact, I have done something very similar. It is not as easy as an option though. You will have to build your own scheduling driver. And in your case, the outcome will not be exactly what you are hoping for.

You are trying to make it so that Staff have 100% of the CPU core to themselves, not over commited. And the Students are over commited 16:1. This will not work without some form of cpu pinning (16 students are pinned to 1 cpu core, while only one staff is pinned to a single core). I have not implemented that myself, put I did look into a project called pinhead a while back.

Ultimately, it will be alot of work. I would recommend you build to areas with dedicated resources. One for staff, one for students. I would probably use Cells, but you'll have to find the method that suits you best. This has the down side of segregating your cloud and spliting up your resources. But it is by far the quickest option to implement your goals.

edit flag offensive delete link more

Comments

Thanks for the response, I found a way to solve this by specifying the CPU allocation in KVM and virsh.. Actually kinda cool to specify the exact CPU a virtual machine is allowed to talk to.

Thomas87 gravatar imageThomas87 ( 2014-04-14 05:38:39 -0500 )edit
1

Is this all controlled through Openstack? Or are you going around Openstack with your own commands?

SamYaple gravatar imageSamYaple ( 2014-04-14 08:02:39 -0500 )edit

I went around Openstack. I just collect required information from the openstack database, and runs the command from virsh. virsh vcpupin #vm_uuid #nr_of_vm_vcpu #number_of_the_cpu_allocated_to_vm;

Thomas87 gravatar imageThomas87 ( 2014-04-14 09:41:47 -0500 )edit

Thanks! Is this a manual process or have you scripted this in some way?

SamYaple gravatar imageSamYaple ( 2014-04-14 09:45:35 -0500 )edit

Well.. I would say ongoing process :-) If I get it to work smoothly, I´ll post the script.

Thomas87 gravatar imageThomas87 ( 2014-04-14 09:50:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-03-30 08:09:29 -0500

Seen: 119 times

Last updated: Mar 31 '14