Hardware Reference
In-Depth Information
and a third for root and daemons. If we gave them each one share, they would get a
guarantee of no less than 33% of the CPU time.
6.3.2.2
Memory Management
The next precious resource that can be managed is memory. The memory container
allows to put a memory limit on a cgroup, and if the group's Resident Set Size (RSS)
exceeds that number, its least-recently-used pages are swapped out.
This is definitely excellent for managing tasks with memory leaks, thus improv-
ing system stability. Moreover this can also be used for less severe problems. For
example, tasks which use a lot of memory tend to push out pages of other tasks which
haven't run lately, making them slow in restart. By putting a memory limit on the
cgroup of memory, hungry tasks will grant a more rapid restart of other tasks.
Unfortunately, at least at the moment of this writing, the cgroups memory limit
is a hard limit, and doesn't allow overcommitment even when we have lots of free
memory. Thus, a natural extension to this container is the support for a soft limit,
which should guarantee an upper bound like CPU share does. Such a support should
allows a larger soft limit when there is plenty of free memory, but it reduces the limit
to the smaller hard ones when there is demand for memory.
6.3.2.3
I/O Management
A certain kind of abrupt slowdown is common to anything that can build up a queue,
such as a CPU, a disk or a network, as well as any program that uses these resources.
The queue network theory [ 13 ] shows that any open system with a service center s
that requires certain service time t s to process a job exhibits performance which has
the behavior represented in Fig. 6.8 . This is the classic behavior of a disk, where
for example it can deliver 425 I/Os per second at 100% utilization. Thus, since we
R max =NR min
R=NT
max −Z
R(N)
Feasible
Response
Times
T max
saturation point
R min
12
34
M
Terminals(N)
Fig. 6.8 The asymptotic
system response time of an
open system
Z
T max
 
Search WWH ::




Custom Search