Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!donh From: donh@microsoft.UUCP (Don HACHERL) Newsgroups: comp.os.os2.misc Subject: Re: Virtual Memory Page Size Message-ID: <72555@microsoft.UUCP> Date: 25 May 91 00:12:06 GMT References: <9645@cognos.UUCP> <1991May17.171113.11939@unixg.ubc.ca> Reply-To: donh@microsoft.UUCP (Don Hacherl) Organization: Microsoft Corp., Redmond WA Lines: 29 In article <1991May17.171113.11939@unixg.ubc.ca> ballard@ucs.ubc.ca (Alan Ballard) writes: >In article <9645@cognos.UUCP> bradc@cognos.UUCP () writes: >>Is the virtual memory page size (ie. the unit of swapping) adjustable >>under OS/2 (version 1.3) or is it some fixed size such as 64K? > >OS/2 1.x uses SEGMENTED, not paged, virtual memory. The pieces >swapped are the code and data segments as defined by the applications. >Using a larger number of smaller data segments might help. Avoiding very large segments can help reduce swap latency on OS/2 1.x, but you don't want to over do it. Don't forget that the OS has a fixed per-segment overhead that's taken out of resident memory, i.e. more user segments -> less memory available to put them in. As a rule of thumb I'd try to tune code segments to be in the range 2-16k. OS/2 2.0 is paged, though, and its behaviour is different. Since page fragments past the end of segments go unused (well, almost, but close enough) and all swap I/O occurs 4k at a time no matter what the segment size, you want to have large segments to minimize fragmentation. I've looked at a couple of apps that were swap tuned for 1.x (or Windows) by using tiny segments and they wasted *amazing* amounts of memory under 2.0. A good compromise for the two systems would be in the 16-32k range. Don -- Don Hacherl "Sorry, no pithy quotes today" donh%microsof@uunet.uu.net or {uunet|uw-beaver}!microsoft!donh Disclaimer: Little of what I say should be taken seriously, and none should be taken as the opinion of my employer.