Information Technology Reference
In-Depth Information
of those processes to use more virtual memory will fail with the same error code
as if the virtual memory had been exhausted on the system:
web# ls
bash: fork: Not enough space
In other words, an application in that Container will behave as if it was running
on a non-virtualized system that had exhausted its virtual memory (i.e., filled up
the swap partitions). Unfortunately, some applications do not handle this condi-
tion gracefully. For this and other reasons, caution should be used to avoid this
situation in normal operating situations. Choosing a reasonable quantity for this
cap is similar to sizing swap space for a non-virtualized system.
This limit can also be changed while the Container is running. The following
command changes the Container's virtual memory limit (swap cap) to 6 GB with-
out requiring a reboot for the change to take effect:
GZ# prctl -n zone.max-swap -v 6g -t privileged -r -e deny -i zone web
Virtual Memory Usage Monitoring Tools Yo u c a n m o n i t o r t h e a m o u n t o f v i r t u a l
memory used by each zone with the prstat command.
GZ# prstat -Z
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
25586 root 9760K 8944K sleep 59 0 0:00:07 4.2% svc.configd/15
25506 root 9728K 8920K sleep 59 0 0:00:07 3.8% svc.configd/13
25583 root 7576K 6608K sleep 59 0 0:00:02 0.7% svc.startd/14
25504 root 7488K 6488K sleep 59 0 0:00:01 0.5% svc.startd/12
25948 root 4984K 3760K sleep 59 0 0:00:00 0.2% inetd/4
25646 root 4984K 3760K sleep 59 0 0:00:00 0.2% inetd/4
25538 root 5808K 3080K sleep 59 0 0:00:00 0.0% zoneadmd/4
25487 root 5808K 3080K sleep 59 0 0:00:00 0.0% zoneadmd/4
1 root 2472K 424K sleep 59 0 0:00:18 0.0% init/1
ZONEID NPROC SIZE RSS MEMORY TIME CPU ZONE
246 22 84M 51M 0.4% 0:00:09 5.3% ProdWeb1
245 22 84M 51M 0.4% 0:00:08 4.6% DevApp1
0 47 235M 54M 0.4% 1:41:59 0.2% global
Total: 91 processes, 359 lwps, load averages: 0.55, 0.13, 0.04
The amount of virtual memory used by a Container is shown in the SIZE column. In
the same output, the RSS column shows the amount of RAM used by the Container's
processes. Notice how little RAM and virtual memory Containers need.
Another tool, kstat , will display both the VM cap and usage of a Container. To
use it, first you must obtain the Container's ID number from zoneadm , as shown
earlier.
 
Search WWH ::




Custom Search