Best practices, Concepts, Sparse-root zones – Sun Microsystems SOLARIS 10 User Manual
Page 41: Whole-root zones
Version 3.1-en
Solaris 10 Container Guide - 3.1 4. Best Practices
Effective: 30/11/2009
4. Best Practices
The following chapter describes concepts for the implementation of architectures with Solaris
containers.
4.1. Concepts
4.1.1. Sparse-root zones
[dd] Sparse root zones are zones that inherit the following directories from the global zone as
inherit-pkg-dir:
−
/lib
−
/platform
−
/sbin
−
/usr
•
The software packages are installed only once centrally in the global zone from the OS and
application software and made available in all local zones as inherit-pkg-dir. An
inherit-pkg-dir is a read-only loopback mount from the global zone to the local zone.
The packages appear to be installed in the local zone by corresponding entries in the pkg
database.
•
Software maintenance (update, patching) of inherited packages is simply done centrally for all
installed zones from out of the global zone.
•
Sparse root zones are installed and patched considerably quicker by inheritance.
•
/opt is not set up as inherit-pkg-dir.
•
Disk space for inherit-pkg-dir is occupied only once in the global zone on the hard
drive and is used multiple times in the sparse root zones. Thus, only a minimum amount of disk
space which, depending on the architecture and the scope of the software installation, amounts
to about 70 MB (x86/x64) or 100 MB (SPARC), is required by a sparse root zone.
•
Programs and libraries are loaded into the main memory only once, exactly like shared memory.
Since sparse root zones share the same programs and libraries with other zones, space in the
main computer memory is occupied only once, regardless of how many times it is accessed and
how many zones use it. If the same software is used frequently in different zones, this will lead
to economization in required main memory.
•
Sparse root zones are not suitable for running different software versions in zones if this
software is located in an inherit-pkg-dir. Either whole root zone configurations should
be used for this, or the software must not be installed in an inherit-pkg-dir.
•
If the software installation process requires writing permission in an inherit-pkg-dir of
the local zone, a whole root zone configuration should be selected.
4.1.2. Whole-root zones
[dd] Whole root zones have no inherit-pkg-dir, that is, when the zone is created, the
packages are copied from the global zone into the local zone. This does not include packages that
were installed exclusively for use in the global zone (e.g. the kernel and the driver) or packages
installed with pkgadd -G.
•
Whole root zones are almost completely independent from the global zone since the packages
are present as copies and can be modified and patched separately.
•
The required space for a whole root zone encompasses approx. the requirements of a complete
Solaris installation.
•
Creating and patching a whole root zone requires more time.
•
Apart from the kernel, whole root zones do not share any programs and libraries among each
other or with the global zone. They are therefore loaded into the main memory again, regardless
of whether another zone has already loaded its own copy of the same program into the main
memory. This leads to an increased need for main memory resources required by whole root
zones.
34