Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.unix-wizards Subject: Re: SysIII swapping strangeness Message-ID: <5876@utzoo.UUCP> Date: Wed, 14-Aug-85 14:12:04 EDT Article-I.D.: utzoo.5876 Posted: Wed Aug 14 14:12:04 1985 Date-Received: Wed, 14-Aug-85 14:12:04 EDT References: <167@plx.UUCP> Organization: U of Toronto Zoology Lines: 40 > Consider a heavily memory (over)loaded system, sometimes > swapping continuously for 5-20 minutes at a time. Is it > possible that processes are being swapped in and back out > many many times before they actually run? (some of these > processes are > 500Kb). Not inconceivable. At the very least, they're not getting *much* run time per swap. This is not a trivial problem -- compute just how long it takes even (say) an Eagle to swap a 500KB process! > 1) Is this 2 second business left over from the pdp11 > where the address spaces were smaller? Should > I/do people change this? No, it seems to be left over from systems that were not badly memory-short, or at least didn't combine memory shortage with big long-running processes. Even on the 11 this represented very bad behavior if you *did* have big long-running processes. (I speak from experience.) > 2) Shouldn't the swapper be changed to at least let the > poor sucker get a few ticks before letting him > go back out? Yup. In fact, it should be changed to let him have a fair bit of cpu time, since even with very fast disks it takes the better part of a second to swap half a megabyte in and out. This WILL do bad things to the response time of interactive programs that are competing with the big boy for memory. This problem is fundamental and unsolvable: if you cannot get both the big boy and the interactive programs in memory at once, you have to choose one or the other. Trying to do both only results in thrashing. > 3) Do all un*x systems (before demand paging came around) > slow way,way,way down when anything but trivial > swapping is occurring? *All* Unix systems -- demand paging or not -- slow way,way,way down if their physical memory is overcommitted. "Real memory for real performance." -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry