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.
mark
On Mon, 23 May 2016 10:51:57 -0400 m.roth@5-cent.us wrote:
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.
You can do that with Virtual Box. I haven't tried it with anything else, but Virtual Box allows you to set (and change) the number of cores available to the session.
https://agileek.github.io/docker/2014/08/06/docker-cpuset/ You could also try with docker.
-----Wiadomość oryginalna----- Od: "Frank Cox" theatre@melvilletheatre.com Wysłano: 2016-05-23 17:31 Do: "centos@centos.org" centos@centos.org Temat: Re: [CentOS] CentOS 7, container question
On Mon, 23 May 2016 10:51:57 -0400 m.roth@5-cent.us wrote:
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.
You can do that with Virtual Box. I haven't tried it with anything else, but Virtual Box allows you to set (and change) the number of cores available to the session.
Frank Cox wrote:
On Mon, 23 May 2016 10:51:57 -0400 m.roth@5-cent.us wrote:
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.
You can do that with Virtual Box. I haven't tried it with anything else, but Virtual Box allows you to set (and change) the number of cores available to the session.
My manager's been looking at containers - he doesn't want the overhead, both system usage and system maintenance, of a VM. Isn't VB a VM?
mark
I've been wracking my brain, but for the life of me can't recall the exact program name, but back when I managed a HPCC, there was a tool that would let you restrict a running process to X number of CPUs/Cores natively. I keep thinking it was MPC, but nothing googles on that. Regardless, that might be a better way of running Sybase, as a container may not be beefy enough to handle the load Sybase is likely to generate.
On Mon, May 23, 2016 at 10:51 AM, m.roth@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.
mark
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Mon, May 23, 2016 at 12:16:01PM -0400, Mark Haney wrote:
I've been wracking my brain, but for the life of me can't recall the exact program name, but back when I managed a HPCC, there was a tool that would let you restrict a running process to X number of CPUs/Cores natively. I keep thinking it was MPC, but nothing googles on that. Regardless, that might be a better way of running Sybase, as a container may not be beefy enough to handle the load Sybase is likely to generate.
'tasksel'? I believe it is just a wrapper for sched_setaffinity/sched_getaffinity, which you can also do with cgroups.
Mark Haney wrote:
I've been wracking my brain, but for the life of me can't recall the exact program name, but back when I managed a HPCC, there was a tool that would let you restrict a running process to X number of CPUs/Cores natively. I keep thinking it was MPC, but nothing googles on that. Regardless, that might be a better way of running Sybase, as a container may not be beefy enough to handle the load Sybase is likely to generate.
Yeah, mpich, I think - one of my users uses that; on our other clusters, we've been using torque, though we're slowly moving to slurm.
I agree with you though, I don't know that doing it that way will work - I think Sybase *looks* at the number of cores it can see, probably some of the license info it uses.
mark
On Mon, May 23, 2016 at 10:51 AM, m.roth@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.
mark
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
--
Mark Haney ::: Senior Systems Engineer *VIF* *International Education* P.O. Box 3566 ::: Chapel Hill, N.C. 27515 ::: USA 919-265-5006 office
Global learning for all. www.viflearn.com Find VIF on Facebook http://facebook.com/VIFInternationalEducation | Twitter https://twitter.com/vifglobaled | LinkedIn http://www.linkedin.com/company/vif-international-education
Recognized as a ‘Best for the World’ http://bestfortheworld.bcorporation.net/ B Corp! _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On 23 May 2016 at 17:51, m.roth@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-u...
Another option is to use KVM and Libvirt (and virt-manager if you need a GUI)
On 24/05/16 00:51, m.roth@5-cent.us wrote:
Is it possible to do what we want, and if so, some pointers would be
most appreciated.
mark
I believe *[0]* is what you are after. In summary:
lxc-cgroups -n <container_name> cpuset.cpus 0-3
I've experimented with it - *[1]*:
Regards, ak.
*[0]* https://docs.oracle.com/cd/E37670_01/E37355/html/ol_control_containers.html *[1]* https://imagebin.ca/v/2iMePQ4Sbf62
On 25/05/16 21:31, Anthony K wrote:
On 24/05/16 00:51, m.roth@5-cent.us wrote:
Is it possible to do what we want, and if so, some pointers would be
most appreciated.
mark
I believe *[0]* is what you are after. In summary:
lxc-cgroups -n <container_name> cpuset.cpus 0-3
I've experimented with it - *[1]*:
Regards, ak.
*[0]* https://docs.oracle.com/cd/E37670_01/E37355/html/ol_control_containers.html *[1]* https://imagebin.ca/v/2iMePQ4Sbf62
Also, I know you've stated you don't want the overhead of VM's. However, running a Linux VM on top of KVM on a Linux host doesn't tax the host system much at all. If you haven't tried KVM recently, then you owe it to yourself to do so and see for yourself - for Linux VM on Linux host, it outperforms VirtualBox.
Regards, ak.