[CentOS] CentOS 7, container question

Mon May 23 16:24:34 UTC 2016
Barak Korren <bkorren at redhat.com>

On 23 May 2016 at 17:51,  <m.roth at 5-cent.us> wrote:
> Hi, folks,
>
>    We would like to run a container on a server, the reason being the COST
> of a Sybase license (it's by core), and what we can afford is a 4-core
> license. Now, the server's a nice Dell w/ 32 cores, so, ideally, what
> we want to do is set up containers, then, in one container, *only* have
> it see 4 cores, while the rest of the server, including (possibly)
> other containers, can see the other 28. The first try seems to have
> disabled *all* the cores other than those four.
>
>    Is it possible to do what we want, and if so, some pointers would be
> most appreciated.
>

Docker has the --cpu option that might do what you need.

You can also do this without a container:
http://blog.scoutapp.com/articles/2014/11/04/restricting-process-cpu-usage-using-nice-cpulimit-and-cgroups

Another option is to use KVM and Libvirt (and virt-manager if you need a GUI)


-- 
Barak Korren
bkorren at redhat.com
RHEV-CI Team