[RFC] Credit1: Make weight per-vcpu

From George Dunlap  – http://lists.xensource.com/archives/html/xen-devel/2010-08/msg00673.html
At the moment, the “weight” parameter for a VM is set on a per-VM basis.  This means that when cpu time is scarce, two VMs with the same weight will be given the same amount of total cpu time, no matter how many vcpus it has.  I.e., if a VM has 1 vcpu, that vcpu will get x% of cpu time; if a VM has 2 vcpus, each vcpu will get (x/2)% of the cpu time.
I believe this is a counter-intuitive interface.  Users often choose to add vcpus; when they do so, it’s with the expectation that a VM will need and use more cpu time.  In my experience, however, users rarely change the weight parameter.  So the normal course of events is for a user to decide a VM needs more processing power, add more cpus, but doesn’t change the weight.  The VM still gets the same amount of cpu time, but less efficiently allocated (because it’s divided).
The attached patch changes the meaning of the “weight” parameter, to be per-vcpu.  Each vcpu is given the weight.  So if you add an extra vcpu, your VM will get more cpu time as well.
This patch has been in Citrix XenServer for several releases now (checked in June 2008), and seems to fit more with customer expectations.

Read more

🛠️ Engineering Trust: How Xen’s Open CI Powers Global, Hardware-Level Testing
07/10/2025

In safety-critical industries like automotive and industrial systems, trust is non-negotiable. When building software that controls critical hardware, like braking systems or factory automation, you need confidence. The software must behave exactly as intended. Every time. On the actual device. That's why the Xen Project is investing in

🛠️ Xen Summit 2025: Find Your Place in the Future of Virtualization
06/27/2025

The annual Xen Summit is right around the corner, and there has never been a more exciting time to be part of the Xen Project. As enterprise and industrial needs shift and proprietary vendors rethink their licensing, the industry is ready for strong, open alternatives. Xen stands out not only

Let’s Grow Xen Together!
03/18/2025

Xen is open, secure, and built for the future. As the new Community Manager, I’m focused on growing the Xen community, welcoming new contributors, and ensuring a thriving ecosystem. Let’s build the future of virtualization together!

Xen Project 4.20: A Step Forward in Open Source Virtualization
03/11/2025

The Xen Project has released Xen 4.20 🎉! This release introduces a range of enhancements that further solidify its position as the premier open-source hypervisor. It delivers important security updates, improved performance, and broader hardware support. Xen has doubled down as the best choice for cloud providers, enterprise users, and