http://linux-vserver.org/api.php?action=feedcontributions&user=Cluk&feedformat=atomLinux-VServer - User contributions [en]2024-03-29T10:31:44ZUser contributionsMediaWiki 1.20.2http://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2011-02-14T16:33:55Z<p>Cluk: Removed Hardy</p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the VServer [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the VServer [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Lucid ==<br />
Kernel Version: 2.6.32<br />
<br />
Vserver patch: 2.3.0.36.29.4<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Karmic ==<br />
Kernel Version: 2.6.31<br />
<br />
Vserver patch: 2.3.0.36.19<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Jaunty ==<br />
Kernel Version: 2.6.28<br />
<br />
Vserver patch: 2.3.0.36.9<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
* linux-headers<br />
** Up to version 2.6.28-11.42~ppa1 the linux-headers package was broken which broke external modules built manually or via dkms (nvidia, virtualbox). If you are experiencing problems with one of those modules please update to the latest package version and rebuild the modules. For modules built via dkms this can be done with:<br />
dkms remove -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms build -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms install -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
<br />
== Intrepid ==<br />
Kernel Version: 2.6.27<br />
<br />
Vserver patch: 2.3.0.36.4<br />
<br />
Status: experimental<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Repository ==<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
=== Lucid ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main<br />
<br />
=== Karmic ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
<br />
=== Jaunty ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
<br />
=== Intrepid ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
<br />
== Installation ==<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Running Ubuntu vservers ==<br />
<br />
If you are running Ubuntu vservers you may be interrested by the following page dealing with [[Upstart_issues|Upstart issues]] specially with karmic and superior versions.<br />
<br />
== Useful Links ==<br />
<br />
* https://launchpad.net/~christoph-lukas/+archive/ppa<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Clukhttp://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2010-05-27T07:08:17Z<p>Cluk: </p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the VServer [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the VServer [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Lucid ==<br />
Kernel Version: 2.6.32<br />
<br />
Vserver patch: 2.3.0.36.29.4<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Karmic ==<br />
Kernel Version: 2.6.31<br />
<br />
Vserver patch: 2.3.0.36.19<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Jaunty ==<br />
Kernel Version: 2.6.28<br />
<br />
Vserver patch: 2.3.0.36.9<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
* linux-headers<br />
** Up to version 2.6.28-11.42~ppa1 the linux-headers package was broken which broke external modules built manually or via dkms (nvidia, virtualbox). If you are experiencing problems with one of those modules please update to the latest package version and rebuild the modules. For modules built via dkms this can be done with:<br />
dkms remove -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms build -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms install -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
<br />
== Intrepid ==<br />
Kernel Version: 2.6.27<br />
<br />
Vserver patch: 2.3.0.36.4<br />
<br />
Status: experimental<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Hardy ==<br />
Kernel Version: 2.6.24<br />
<br />
Vserver patch: 2.0.0.5.0.7<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_OCFS2_FS has been disabled<br />
<br />
* linux-ubuntu-modules<br />
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled<br />
<br />
== Repository ==<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
=== Lucid ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main<br />
<br />
=== Karmic ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
<br />
=== Jaunty ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
<br />
=== Intrepid ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
<br />
=== Hardy ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
<br />
== Installation ==<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Useful Links ==<br />
<br />
* https://launchpad.net/~christoph-lukas/+archive/ppa<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Clukhttp://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2010-05-27T07:07:36Z<p>Cluk: </p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the VServer [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the VServer [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Lucid ==<br />
Kernel Version: 2.6.32<br />
<br />
Vserver patch: 2.3.0.36.29.4<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Karmic ==<br />
Kernel Version: 2.6.31<br />
<br />
Vserver patch: 2.3.0.36.19<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Jaunty ==<br />
Kernel Version: 2.6.28<br />
<br />
Vserver patch: 2.3.0.36.9<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
* linux-headers<br />
** Up to version 2.6.28-11.42~ppa1 the linux-headers package was broken which broke external modules built manually or via dkms (nvidia, virtualbox). If you are experiencing problems with one of those modules please update to the latest package version and rebuild the modules. For modules built via dkms this can be done with:<br />
dkms remove -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms build -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dkms install -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
<br />
== Intrepid ==<br />
Kernel Version: 2.6.27<br />
<br />
Vserver patch: 2.3.0.36.4<br />
<br />
Status: experimental<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
== Hardy ==<br />
Kernel Version: 2.6.24<br />
<br />
Vserver patch: 2.0.0.5.0.7<br />
<br />
Status: experimental<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_OCFS2_FS has been disabled<br />
<br />
* linux-ubuntu-modules<br />
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled<br />
<br />
== Repository ==<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
=== Karmic ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main<br />
<br />
=== Jaunty ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
<br />
=== Intrepid ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
<br />
=== Hardy ===<br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
<br />
== Installation ==<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Useful Links ==<br />
<br />
* https://launchpad.net/~christoph-lukas/+archive/ppa<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Clukhttp://linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-12-10T20:56:03Z<p>Cluk: /* cgroup and CFS based CPU hard limiting that replaces sched_hard */</p>
<hr />
<div>Bears run away when you yell at them, even lynxes. ,<br />
<br />
== Kernel configuration ==<br />
<br />
When configuring your kernel for cgroups with util-vserver you must make sure CONFIG_CGROUP_NS is unset so guests start properly for the time being.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/.defaults/cgroup<br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
# List of CPUs<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.cpus<br />
# NUMA nodes<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.mems<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.<br />
<br />
== cgroup and CFS based CPU hard limiting that replaces sched_hard ==<br />
<br />
You can find documentation about the cfs hard limiting in Documentation/scheduler/sched-cfs-hard-limits.txt inside your kernel source dir.<br />
<br />
This feature is currently available in patch-2.6.31.2-vs2.3.0.36.15.diff and is in testing phase as of this patch set so report any bugs to the mailing list.<br />
<br />
To get the hard limit setup on every vserver start you need a recent utils package. It worked for me with: 0.30.216-pre2864.<br />
<br />
Before trying to setup limits for one guest you should mount the cgroup filesystem:<br />
<br />
[ -d /dev/cgroup ] || mkdir /dev/cgroup<br />
mount -t cgroup -ocpu none /dev/cgroup<br />
<br />
Example for an upper bound of 2/5th (or 40%) of the all cpu power that a guest/cgroup can use :<br />
<br />
<pre><br />
# force CFS hard limit<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpu.cfs_hard_limit<br />
# time assigned to guest (in microseconds) 200000 = 0,2 sec <br />
echo 200000 > /etc/vservers/<guestname>/cgroup/cpu.cfs_runtime_us<br />
# in each specified period (in microseconds) 500000 = 0,5 sec <br />
echo 500000 > /etc/vservers/<guestname>/cgroup/cpu.cfs_period_us<br />
</pre><br />
<br />
This limit is an hard limit, see it like an upper wall for the ressources used by the cgroup. <br />
If you set both cpu share AND hard limit the system will do fine but hard limits takes priority over cpu share scheduling, so cpu share will do the job but each cgroup will have an upper bound that it cannot cross even if the cpu share you gived it is higher.<br />
<br />
<pre><br />
Hard limit feature adds 3 cgroup files for CFS group scheduler:<br />
cfs_runtime_us: Hard limit for the group in microseconds.<br />
cfs_period_us: Time period in microseconds within which hard limits is enforced.<br />
cfs_hard_limit: The control file to enable or disable hard limiting for the group.<br />
</pre><br />
<br />
<br/><br />
<br />
== real world exemples of scheduling ==<br />
<br />
<br />
this part is to be filled with exemple you have put in place and are working and have been tested, please add the patch and kernel version for each exemple you put here.</div>Clukhttp://linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-12-10T20:32:56Z<p>Cluk: /* cgroup and CFS based CPU hard limiting that replaces sched_hard */</p>
<hr />
<div>Bears run away when you yell at them, even lynxes. ,<br />
<br />
== Kernel configuration ==<br />
<br />
When configuring your kernel for cgroups with util-vserver you must make sure CONFIG_CGROUP_NS is unset so guests start properly for the time being.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/.defaults/cgroup<br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
# List of CPUs<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.cpus<br />
# NUMA nodes<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.mems<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.<br />
<br />
== cgroup and CFS based CPU hard limiting that replaces sched_hard ==<br />
<br />
You can find documentation about the cfs hard limiting in Documentation/scheduler/sched-cfs-hard-limits.txt inside your kernel source dir.<br />
<br />
This feature is currently available in patch-2.6.31.2-vs2.3.0.36.15.diff and is in testing phase as of this patch set so report any bugs to the mailing list.<br />
<br />
To get the hard limit setup on every vserver start you need a recent utils package. It worked for me with: 0.30.216-pre2864.<br />
<br />
Before trying to setup limits for one guest you should mount the cgroup filesystem:<br />
<br />
[ -d /dev/cgroups ] || mkdir /dev/cgroups<br />
mount -t cgroup -ocpu none /dev/cgroup<br />
<br />
Example for an upper bound of 2/5th (or 40%) of the all cpu power that a guest/cgroup can use :<br />
<br />
<pre><br />
# force CFS hard limit<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpu.cfs_hard_limit<br />
# time assigned to guest (in microseconds) 200000 = 0,2 sec <br />
echo 200000 > /etc/vservers/<guestname>/cgroup/cpu.cfs_runtime_us<br />
# in each specified period (in microseconds) 500000 = 0,5 sec <br />
echo 500000 > /etc/vservers/<guestname>/cgroup/cpu.cfs_period_us<br />
</pre><br />
<br />
This limit is an hard limit, see it like an upper wall for the ressources used by the cgroup. <br />
If you set both cpu share AND hard limit the system will do fine but hard limits takes priority over cpu share scheduling, so cpu share will do the job but each cgroup will have an upper bound that it cannot cross even if the cpu share you gived it is higher.<br />
<br />
<pre><br />
Hard limit feature adds 3 cgroup files for CFS group scheduler:<br />
cfs_runtime_us: Hard limit for the group in microseconds.<br />
cfs_period_us: Time period in microseconds within which hard limits is enforced.<br />
cfs_hard_limit: The control file to enable or disable hard limiting for the group.<br />
</pre><br />
<br />
<br/><br />
<br />
== real world exemples of scheduling ==<br />
<br />
<br />
this part is to be filled with exemple you have put in place and are working and have been tested, please add the patch and kernel version for each exemple you put here.</div>Clukhttp://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2009-05-13T13:56:59Z<p>Cluk: hint for broken header package</p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the VServer [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the VServer [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Jaunty ==<br />
Jaunty ships with kernel version 2.6.28. As of now (28.3.2009) there are only experimental patches available for this kernel version. <br />
<br />
I have adapted version 2.3.0.36.9 of the vserver patch to the Jaunty kernel sources. These images should be considered '''experimental'''.<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.28-11-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.28-11-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.28-11-vserver<br />
* linux-restricted-modules-vserver<br />
* linux-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
* linux-headers<br />
** Up to version 2.6.28-11.42~ppa1 the linux-headers package was broken which broke external modules built manually or via dkms (nvidia, virtualbox). If you are experiencing problems with one of those modules please update to the latest package version and rebuild the modules. For modules built via dkms this can be done with:<br />
dmks remove -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dmks build -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
dmks install -m <modulename> -v <moduleversion> -k 2.6.28-11-vserver<br />
<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Intrepid ==<br />
Intrepid ships with kernel version 2.6.27. As of now (28.3.2009) there are only experimental patches available for this kernel version. <br />
<br />
I have adapted version 2.3.0.36.4 of the vserver patch to the Intrepid kernel sources. These images should be considered '''experimental'''.<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.27-11-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.27-11-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.27-11-vserver<br />
* linux-vserver<br />
* util-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Hardy ==<br />
Hardy ships with kernel version 2.6.24 which is not officially supported by Linux-VServer due to the major changes made in this kernel version.<br />
<br />
Nevertheless I have adapted version 2.0.0.5.0.7 of the vserver patch to the Hardy kernel sources. We have run those patched kernels for about a year now without any problems on our desktop systems.<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.24-23-vserver<br />
* linux-headers-lum-2.6.24-23-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.24-23-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.24-23-vserver<br />
* linux-restricted-modules-vserver<br />
* linux-ubuntu-modules-2.6.24-23-vserver<br />
* linux-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_OCFS2_FS has been disabled<br />
<br />
* linux-ubuntu-modules<br />
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Useful Links ==<br />
<br />
* https://launchpad.net/~christoph-lukas/+archive/ppa<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Clukhttp://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2009-03-28T14:40:38Z<p>Cluk: Moved repo to ppa. Added information for Jaunty.</p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the VServer [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the VServer [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Jaunty ==<br />
Jaunty ships with kernel version 2.6.28. As of now (28.3.2009) there are only experimental patches available for this kernel version. <br />
<br />
I have adapted version 2.3.0.36.9 of the vserver patch to the Jaunty kernel sources. These images should be considered '''experimental'''.<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.28-11-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.28-11-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.28-11-vserver<br />
* linux-restricted-modules-vserver<br />
* linux-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Intrepid ==<br />
Intrepid ships with kernel version 2.6.27. As of now (28.3.2009) there are only experimental patches available for this kernel version. <br />
<br />
I have adapted version 2.3.0.36.4 of the vserver patch to the Intrepid kernel sources. These images should be considered '''experimental'''.<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.27-11-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.27-11-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.27-11-vserver<br />
* linux-vserver<br />
* util-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Hardy ==<br />
Hardy ships with kernel version 2.6.24 which is not officially supported by Linux-VServer due to the major changes made in this kernel version.<br />
<br />
Nevertheless I have adapted version 2.0.0.5.0.7 of the vserver patch to the Hardy kernel sources. We have run those patched kernels for about a year now without any problems on our desktop systems.<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.24-23-vserver<br />
* linux-headers-lum-2.6.24-23-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.24-23-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.24-23-vserver<br />
* linux-restricted-modules-vserver<br />
* linux-ubuntu-modules-2.6.24-23-vserver<br />
* linux-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_OCFS2_FS has been disabled<br />
<br />
* linux-ubuntu-modules<br />
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main<br />
<br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Useful Links ==<br />
<br />
* https://launchpad.net/~christoph-lukas/+archive/ppa<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Clukhttp://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2009-03-06T09:48:44Z<p>Cluk: Binary Packages for Intrepid and Hardy</p>
<hr />
<div>== Disclaimer ==<br />
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]<br />
<br />
The binary kernel images provided here are neither official ubuntu nor official vserver kernel images. <br />
<br />
If you have any problems with those kernels please send a mail to the Vserver [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.<br />
<br />
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the Vserver [http://list.linux-vserver.org/ mailinglist].<br />
<br />
== Intrepid ==<br />
Intrepid ships with kernel version 2.6.27. As of now (4.3.2009) there are only experimental patches available for this kernel version. <br />
<br />
I have adapted version 2.3.0.36.4 of the vserver patch to the Intrepid kernel sources. These images should be considered '''experimental''' but seems to work.<br />
<br />
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.27-11-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.27-11-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.27-11-vserver<br />
* linux-vserver<br />
* util-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_AUFS has been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
i386: <br />
<br />
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-i386 ./</nowiki><br />
<br />
amd64: <br />
<br />
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-amd64 ./</nowiki><br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Hardy ==<br />
Hardy ships with kernel version 2.6.24 which is not officially supported by Linux-Vserver due to the major changes made in this kernel version.<br />
<br />
Nevertheless I have adapted version 2.0.0.5.0.7 of the vserver patch to the Hardy kernel sources. We have run those patched kernels for about a year now without any problems on our desktop systems.<br />
<br />
=== Packages ===<br />
The following packages are available for i386 and amd64:<br />
<br />
* linux-headers-2.6.24-23-vserver<br />
* linux-headers-lum-2.6.24-23-vserver<br />
* linux-headers-vserver<br />
* linux-image-2.6.24-23-vserver<br />
* linux-image-vserver<br />
* linux-restricted-modules-2.6.24-23-vserver<br />
* linux-restricted-modules-vserver<br />
* linux-ubuntu-modules-2.6.24-23-vserver<br />
* linux-vserver<br />
<br />
=== Known Limitations ===<br />
* linux-image<br />
** CONFIG_OCFS2_FS has been disabled<br />
<br />
* linux-ubuntu-modules<br />
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled<br />
<br />
=== Repository ===<br />
You can add the following key to your apt keyring:<br />
<br />
<nowiki>wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -</nowiki><br />
<br />
Add the following line to your sources.list:<br />
<br />
i386: <br />
<br />
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-i386 ./</nowiki><br />
<br />
amd64: <br />
<br />
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-amd64 ./</nowiki><br />
<br />
=== Installation ===<br />
<br />
aptitude update<br />
aptitude install linux-image-vserver linux-headers-vserver util-vserver<br />
<br />
== Useful Links ==<br />
<br />
* https://help.ubuntu.com/community/VServer<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Cluk