Linux – What are the advantages/disadvantages of using cgroups

cgroupjbosslinux

I administer several Linux-based servers and we are looking at migrating several JBoss apps as well as a couple of websites running on Apache from a RHEL 5.5 (64-bit) server with 4 cores to a RHEL 6 (64-bit) server with 24 cores. My supervisor has mentioned the possibility of using cgroups to manage memory/CPU allocation on the new server. I've done some reading/research on my own and have a fairly good understanding of the purpose of cgroups and what they can do.

My question is, what would be the advantages of running cgroups and is this an effective way to manage JBoss applications?

Best Answer

The biggest advantage is to impose limits on different workloads so they get their required performance and/or don't impact other workloads running on the same server.

You can limit how much CPU/memory JBoss is going to use or build more complex balancing policies.

When you are consolidating many workloads in a single server, it's extremely important guarantee how much resources they are using. Something that is inherently done when you have many physical servers because each box is a resource limit on itself.