From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,94b04f8de719f8a6 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-07-19 16:20:11 PST Path: nntp.gmd.de!Germany.EU.net!news.dfn.de!xlink.net!howland.reston.ans.net!wupost!sdg.dra.com!art From: art@sdg.dra.com (Art Zemon) Newsgroups: comp.unix.osf.misc Subject: Re: swap methods? Message-ID: <1994Jul19.135332.797@sdg.dra.com> Date: 19 Jul 94 13:53:32 CDT References: <3071tf$a6q@sun.lclark.edu> <3077iq$f6v@newsroom.gsfc.nasa.gov> Organization: Data Research Associates, St. Louis MO When OSF/1 is in "eager" swap mode, it allocates on-disk swap space before satisfying each request for virtual memory. In other words, if your program requests 64 KB of virtual memory, OSF/1 will find space on disk to which it can swap that VM. The disk space may never be used, but it is there if you ever need it. When OSF/1 is in "lazy" swap mode, it allocates VM without bothering to allocate on-disk swap space. In the event that OSF/1 needs to page or swap, it then tries to find the disk space required. The advantage to lazy mode is that you can keep filling up physical memory even if you don't have enough swap space. I.e., you could have 256 MB of memory but only 128 MB of swap space. This would give you (very roughly) 384 MB of useable virtual memory. The danger in using lazy mode is that OSF/1 may need to abruptly kill a running process if the operating system desperately needs physical memory and there is no swap space available. The advantage to eager mode is that processes never get killed due to lack of swap space. If they request VM and get it, then they are safe. The worst that can happen is that they request VM and the operating system denies the request. The disadvantage to eager mode is that you need lots of swap space, typically 2-3 times the amount of physical memory. Any less and you may run out of swap space before you run out of physical memory. Cheers, -- Art Z.