CPU & vCPU Clarification

schirpich

Member
Jan 26, 2011
9
0
21
Just a simple question I'm not sure about, could use a little clarification.

I have a quad core server, proxmox 1.7 and 5 containers running on it. Each is set at 1 vcpu.

If each container is set at one vcpu, is it still using all 4 cores at the VZ server level? Or is the affinity for that container really set to only ever use a single core at the server level at any given moment?

And secondly, if I add more vcpu's to a container via the proxmox web interface, do I need to restart the container for the setting to actually take effect?
 
If each container is set at one vcpu, is it still using all 4 cores at the VZ server level? Or is the affinity for that container really set to only ever use a single core at the server level at any given moment?

CPU limit only works with kernel 2.6.18

And secondly, if I add more vcpu's to a container via the proxmox web interface, do I need to restart the container for the setting to actually take effect?

Well, AFAIK setting are activated immediately for new tasks. But existing tasks are not affected.
 
When you say kernel 2.6.18, am I understanding correctly that "only" kernel 2.6.18 or 2.6.18 and above?

I am currently running 2.6.32

And for the tasks, does this mean processes running on the container?

For instance If I don't set the MaxRequestsPerChild directive in apache, that particular process never dies and from what I understand would never see/use the newly added vcpu's unless it was killed or restarted?
 
currently only our 2.6.18er kernel supports OpenVZ cpu limits. upcoming 2.6.32 kernels should also have this feature.