Top.Mail.Ru
? ?

Previous Entry | Next Entry

cpulimit is back in RHEL6 based kernel

Hard CPU limit (ability to specify that you don't want this container to use more than X per cent of CPU no matter what) is back in latest RHEL6-based kernel, 042test006.1, which has just been released.

The feature was only available for the stable (i.e RHEL4 and RHEL5-based) kernels, and was missing from all of our development kernels from 2.6.20 to 2.6.32. So while it was always there in stable branches, the feeling is like it's back.

In order to use CPU limit feature, set the limit using vzctl set $CTID --cpulimit X, where X is in per cent of one single CPU. For example, if you have single 2 GHz CPU and want container 123 to use no more than 1 GHz, use vzctl set 123 --cpulimit 50. If you have 2 GHz quad-core system and want to use no more than 4 GHz, use vzctl set 123 --cpulimit 200. Well, in the second case it might be better to just use --cpus 2. Anyways, see vzctl man page.

Comments

spiculator
Feb. 15th, 2011 01:40 pm (UTC)
Is vzkernel-2.6.32-042test006.1.x86_64.rpm file licensed undef GPL? I guess it should be since it is based on Linux kernel.

If it is, could you please provide me with the source code for this file? I really need it to compile this kernel with a few patches.

Thank you.
k001
Mar. 9th, 2011 09:31 am (UTC)
How could you overlook the sources? They are in the very same directory as the binary RPM.

For example, for kernel 042test008 you can get binary rpm, source rpm and the patch from the same wiki page: http://wiki.openvz.org/Download/kernel/rhel6/042test008.1 -- this page is just a set of links to download.openvz.org organized in a convenient way.

Alternatively, if you look directly at http://download.openvz.org/kernel/branches/rhel6-2.6.32/042test008.1/ you will see both binary and source rpm, as well as subdirectory patches where the patch against vanilla 2.6.32 is found.

Source RPM is just a cpio archive with an extra header. In order to extract source rpm, use rpm2cpio *.src.rpm | cpio -id command


PS Sorry it took me so long to answer -- looks like the comment was not delivered to my mailbox, so I just accidentally came across it.

Latest Month

July 2016
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Page Summary

Comments

Powered by LiveJournal.com
Designed by Tiffany Chow