Cooperative memory management background
![]()
Cooperative memory management (CMM, or "cmm1") dynamically adjusts the memory available to Linux®.
In a virtualized environment it is common practice to give the virtual machines more memory than is actually available to the hypervisor. Linux tends to use all of its available memory. As a result, the hypervisor (z/VM®) might start swapping.
To avoid excessive z/VM swapping, the memory available to Linux can be reduced. CMM allocates pages to page pools that make the pages unusable to Linux. There are two such page pools as shown in Figure 1.

- A static page pool
- The page pool is controlled by a resource manager that changes the pool size at
intervals according to guest activity and overall memory usage on z/VM (see Figure 2).
Figure 2. Static page pool. The size of the pool is static during an interval. 
- A timed page pool
- Pages are released from this pool at a speed that is set in the release
rate (see Figure 3). According to guest activity and overall
memory usage on z/VM, a resource manager adds pages at
intervals. If no pages are added and the release rate is not zero, the pool empties.
Figure 3. Timed page pool. Pages are freed at a set release rate. 
The external resource manager that controls the pools can be the z/VM resource monitor (VMRM) or a third-party systems management tool.
VMRM controls the pools over a message interface. Setting up the external resource manager is beyond the scope of this information. For more details, see the chapter on VMRM in z/VM: Performance, SC24-6301.
Third-party tools can provide a Linux deamon that receives commands for the memory allocation through TCP/IP. The deamon, in turn, uses the procfs-based interface. You can use the procfs interface to read the pool sizes. These values are useful diagnostic data.