Information Technology Reference
In-Depth Information
As with all other resource controls, the Container's resource limits will revert
back to the values set with zonecfg after reboot.
How should the OS enforce a RAM cap? If a process running in a memory-
capped Container attempts to exceed its limit, the application behavior should be
consistent with application behavior in a non-virtualized system with insufficient
RAM. Put simply, the operating system should begin forcing memory pages out to
swap space. Other than the performance penalty of paging, this action should be
transparent to the application. However, performance would become inconsistent
if the application was temporarily suspended while memory pages were paged out.
Because paging takes time, it should be possible for the application to continue to
allocate RAM while the pager tries to catch up.
Oracle Solaris uses the resource capping daemon, a program named rcapd (1M).
If a Container's processes begin to use more memory than the physical memory
cap, rcapd will begin to force memory pages associated with that Container out to
the swap disk(s). To maintain consistency with non-capped behavior, the applica-
tion is allowed to continue running while paging occurs. As a result, a Container's
processes may temporarily exceed its physical memory cap.
Care should be taken when setting this cap. Caps that are set too low will cause
excessive paging, which can drag down overall system performance. This is espe-
cially true if other Containers are also causing paging or are using the same disk
or storage I/O connection.
Also, the program that enforces the RAM cap, rcapd , uses some CPU cycles
to track memory usage of processes. This effect will become noticeable on larger
systems with hundreds of processes.
Physical Memory Usage Monitoring Tools If you use the resource capping feature, you
should monitor the use of RAM by all Containers on a regular basis. You can use
the rcapstat command with its -z option to accomplish this goal:
GZ# rcapstat -z 5
id zone nproc vm rss cap at avgat pg avgpg
1 ProdWeb1 30 0K 0K 8G 0K 0K 0K 0K
1 ProdWeb1 - 644M 454M 8G 0K 0K 0K 0K
1 ProdWeb1 - 966M 908M 8G 0K 0K 0K 0K
1 ProdWeb1 - 1610M 1362M 8G 0K 0K 0K 0K
1 ProdWeb1 - 2568M 1702M 8G 0K 0K 0K 0K
This output shows that the Container never uses more than roughly 2.5 GB of RAM,
well under the cap of 8 GB. If any paging activity (values greater than zero) ap-
pears in the four columns on the right, their presence indicates that the Container's
processes are paging. A small amount of infrequent paging is normal for operating
systems with virtual memory, but frequent paging or infrequent paging of large
 
Search WWH ::




Custom Search