An improved method, system, and a computer program storage device (e.g., including
software embodied on a magnetic, electrical, optical, or other storage device)
for management of compressed main memory allocation and utilization which can avoid
system abends or inefficient operation that would otherwise result. One feature
reduces (and ultimately eliminates) all unessential processing as the amount of
available storage decreases to a point low enough to threaten a system abend. In
another example, the amount of current memory usage is determined as well as one
or more of: an estimate of an amount of allocated but unused memory; a determination
of the amount of memory required for outstanding I/O requests. The compressed memory
is managed as a function of the current memory usage and one or more of the other
measured or estimated quantities. The compressed memory can be managed by maintaining
a set of dynamic thresholds; estimating the amount of storage that can easily be
freed (used but available) and the amount of storage that is committed (allocated
but unused). The estimate of committed storage can include: the current storage
utilization; and an estimate of storage committed to new pages (based on the number
of new pages granted), the times at which this was done, the estimated compression
ratio, and estimates of residency times in the cache.