rta@ucbvax.berkeley.edu (Rick Ace) (02/22/89)
Upon porting some of our software to SunOS 4.0 recently, we observed a disturbing slowdown of the window system when running a certain file-intensive application. To get a better handle on the nature of this, ahh, behavior, we experimented a little, playing with the window system with other things happening concurrently. All tests were made on SunOS 4.0 (not sure of the exact beta-ness of the release). 1. Sun-4 (100-series) with a SCSI disk and 8Mbytes of memory. No activity on system. Window system is responsive (windows open and close quickly). 2. Same system. Experimental load: dd if=/dev/rsd0g of=/dev/null bs=10k Window system slightly sluggish, but no severe degradation. 3. Same system. Experimental load: CPU-bound program in tight loop, no I/O. Window system again slightly sluggish, but not severe. 4. Same system. Experimental load: cp largefile newfile Now the window system bogs down real bad. Typing ^Z in the window where the "cp" was running had no effect! Trying to open or close other windows experienced extreme delays. 5. Sun-4/280 with Hitachi disk, Xylogics ctlr, 16 Mbytes. Experimental load: cp largefile newfile Same symptoms as test # 4. The results suggested this hypothesis: the new VM scheme in 4.0 uses main physical memory as a combination file buffer cache and page storage for "in-memory" processes. The "cp" program reads blocks from the source file and copies them to the destination file, demanding memory for buffer cache purposes. The kernel memory manager throws processes out of memory to make room for the file blocks being copied by cp. When the user tries to use the window system, that causes processes to wake up and want to get swapped back in, and the process swapper must now compete with file management for physical memory, and somehow the file manager seems to be making life very tough for the swapper. How do y'all feel about this? Have you noticed this type of behavior on your systems? Does the theory seem plausible? Rick Ace Pixar 3240 Kerner Blvd, San Rafael CA 94901 ...!{sun,ucbvax}!pixar!rta