Adapting to memory pressure from within scientific applications on multiprogrammed environments
Richard Mills, College of William & Mary
Dismal performance often results when the memory requirements of a process exceed the physical memory available to it. Moreover, significant throughput reduction is experienced when this process is part of a synchronous parallel job on a non-dedicated computational cluster. A possible solution is to develop programs that can dynamically adapt their memory usage according to the current availability of physical memory. We explore this idea in the context of scientific computations that perform repetitive data accesses. Part of the program’s data set is cached in resident memory, while the remainder that cannot fit is accessed in an “out-of-core” fashion from disk.
The replacement policy can be user defined. This allows for graceful degradation of performance as memory becomes scarce. To dynamically adjust its memory usage, the program must reliably answer whether there is a memory shortage or surplus in the system. Because operating systems typically export limited memory information, we develop a parameter-free algorithm that uses no system information beyond the resident set size (RSS) of the program. Our resulting library can be called by scientific codes with little change to their structure or with no change at all, if computations are already “blocked” for reasons of locality.
Experimental results with memory-adaptive implementations of a conjugate-gradient linear system solver, a modified Gram-Schmidt orthogonalization routine, and a Monte-Carlo Ising model simulation all show substantial performance gains over conventional implementations that rely on the virtual memory system to handle memory pressure. Furthermore, multiple instances of the adaptive code can coexist on the same node with little interference with one another.
Abstract Author(s): Richard T. Mills, Andreas Stathopoulos, and Dimitrios S. Nikolopoulos<br />Department of Computer Science<br />College of William & Mary<br />Williamsburg, Virginia 23187-8795