Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!nirvo!kdg From: kdg@nirvo.uucp (Kurt Gollhardt) Newsgroups: comp.unix.i386 Subject: Re: Microsoft Word & (SCO) Unix 3.2 Summary: Thrashing possible Message-ID: <24F8A529.3ED7@nirvo.uucp> Date: 28 Aug 89 02:36:24 GMT References: <7227@megatest.UUCP> <31897@ism780c.isc.com> <5864@ficc.uu.net> <32271@ism780c.isc.com> Reply-To: kdg@nirvo.UUCP (Kurt Gollhardt) Organization: Nirvonics Inc., Plainfield, NJ Lines: 38 In article <32271@ism780c.isc.com> darryl@ism780c.UUCP (Darryl Richman) writes: >In article <5864@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >"This behaviour indeed speeds up most UNIX programs. However, programs written >"using Intel's UDI interface, such as their PLM286 compiler and associated >"tools, end up requesting 64K for all memory requests. This tends to lead to >"processes that are very large, creates inordinate amounts of thrashing, and >"even runs out of virtual memory space if the program makes frequent requests >"for small amounts of memory. > >I'm surprised that you see a significant amount of thrashing, since, if >you don't use the memory, it stays paged out. And pages that aren't >touched don't get allocated real memory in the first place. If you are >running out of virtual memory space in the emulator, you can up your ulimit. Actually, with this kind of allocation going on, you might very well have to up *swap space*. Think of it: say the app allocs 1000 (what it thinks are small) segments, for each of which the emulator allocs 64K: poof! you've got 64M w/o even trying hard. In fact, this probably *is* the source of the thrashing, because the emulator *clears* all of the memory it allocates (using a C *char_p++ = 0 loop, no less). This causes the demand-zero pages to become real pages which are then cleared twice: first (efficiently) by the kernel, then again (inefficiently) by the emulator. These pages will now have to be written out to swap when they are reclaimed. Thrash city. A simple fix to the thrashing problem would be for the emulator to only clear the memory which is actually used by the 286 app. You'd still be in danger of running out of swap space, though. An environment variable to control the min allocation size (default to 64K, set to something like 4K for the UDI apps) would be nice. Shouldn't be too hard to implement (given the source, of course). -- Kurt Gollhardt \ Nirvonics, Inc. -- Plainfield, NJ Kurt.Gollhardt@nirvo.uucp /\ Software Design and Consulting ...!rutgers!nirvo!Kurt.Gollhardt / \ "It's all about people; not you and me or him and her, but *us*."