On Tue, Jan 13, 2009 at 9:55 AM, Robert Bauer <saf at xy1.org> wrote:

> I understand what is a zone.
> But what is a container? In the FAQ there is written it uses the OS
> resource management facility.
> What is a resource management facility?
>  <opensolaris-help at opensolaris.org>


A contained is sometimes defined as a Zone with Resource management rules
applied.

Sun Resource Manager (SRM) comes with Solaris 10 and later for free, and
allows you to control the "amount of resources used" by a "project".  A
Zone, or a group of processes, can belong to a project.

This is best explained by an example:

You can define some projects, and the system ships with a few projects by
default. The project is associated with "resource controls", which can for
example set the max file size of processes, max memory of the project, CPU
usage "guarantees", etc."

There is a quagmire of possible settings, see the man page for prctl for
much information.

The simplest way to use it though is via the zonecfg command, which allows
you to implicitly build a project around a zone.  For this you can specify
the capped-cpu, capped-memory and dedicated-cpu properties, as well as via
rctl properties.

Some hints to get you started:
rctladm -l Lists the currently applicable resource control settings.
projects -l Lists the existing projects defined.

Besides the man pages for the above two commands, also check out the man
page for prctl.

About CPU limits:  There are two types:  CPUs can be allocated (reserved),
which means they are available only to processes running in that project, or
you can use CPU shares, which means that whenever a process in that project
wants to run, it will have a guaranteed minimum amount of CPU available to
it.  It prevents a process from being starved of CPU, without reserving the
CPUs, so if no process in the project is ready to run, then those "shares"
are available to all other projects on the system.

Sun resource manager is a very interesting topic.  It is a solid product,
mwaning it works well and is stable, and realy worth investigating if you
want to set up many zones and/or applications on a system!

-- 
Any sufficiently advanced technology is indistinguishable from magic.
   Arthur C. Clarke

My blog: http://initialprogramload.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/opensolaris-help/attachments/20090113/b7ba12ea/attachment.html>

Reply via email to