[comp.windows.ms] Severe performance degradation with 386 enhanced mode, any tips?

mikew@charm.LCS.MIT.EDU (Michael B. Williams) (01/18/91)

A few of us out here are experiencing the same problem, but no one has
yet suggested a solution that works.  My NEC Powermate 386SX gives the
following SI times (values are approximate):

Computing Index
	From DOS (or Standard mode window): 15.2
	From 386 mode: 4.6

These values are pretty much consistent regardless of how much memory
you have or which little boxes you check.  I've got 6MB of RAM, a 100 MB
hard disk, and I still suffer the problem.

The really frustrating thing is when I tell people, they suggest things such as
``you need more memory'' or ``check the `exclusive' mode box''--things that
it is clear have nothing to do with the problem.  (After all, if it were that simple,
I'd have figured it out long ago!)


Michael B. Williams	      \ 1-2-3-4, KICK THE LAWSUITS OUT THE DOOR
MIT NE43-532 		       \ 5-6-7-8, INNOVATE DON'T LITIGATE
Laboratory for Computer Science \ 9-A-B-C, INTERFACES SHOULD BE FREE
545 Technology Square	         \ D-E-F-0, LOOK AND FEEL HAS GOT TO GO!
Cambridge, MA 02139
(617) 253-5983   Internet: mikew@athena.mit.edu   CompuServe: 73667,3264

jcb@frisbee.Eng.Sun.COM (Jim Becker) (01/18/91)

A friend found that using QEMM for memory management worked well, like
twice as fast or better. Apparently even DOS shells running full
screen run at half speed with the Windows memory management.


-Jim
--
--    
	 Jim Becker / jcb%frisbee@sun.com  / Sun Microsystems

iho@cac.washington.edu (Il Oh) (01/18/91)

mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:

[complaint about bad performance in 386 enhanced mode deleted]

Turn to p. 522 of your Windows manual (that's the page in my manual and yours
may be different) and follow the instructions for setting up a permanent swap
file.  While the performance is still lousy, it's noticeably better with the
permanent swap file.

In case your manual is arranged differently than mine, it's the chapter on
optimizing your system.
--
 "And now, adding color                 |    Il Hwan Oh
  a group of anonymous, Latin-American  |    University of Washington, Tacoma
  meat-packing glitterati"              |    iho@cac.washington.edu
         -- Pink Floyd, Final Cut       |

mikew@charm.LCS.MIT.EDU (Michael B. Williams) (01/19/91)

In article <6219@exodus.Eng.Sun.COM>, jcb@frisbee.Eng.Sun.COM (Jim Becker) writes:
|> A friend found that using QEMM for memory management worked well, like
|> twice as fast or better. Apparently even DOS shells running full
|> screen run at half speed with the Windows memory management.

I like this idea, but I got QEMM for Christmas and so far it doesn't seem to make much
of a difference.  Are there any special settings for QEMM that might help?

________________________________________________________________________
Michael B. Williams	      \ 1-2-3-4, KICK THE LAWSUITS OUT THE DOOR
MIT NE43-532 		       \ 5-6-7-8, INNOVATE DON'T LITIGATE
Laboratory for Computer Science \ 9-A-B-C, INTERFACES SHOULD BE FREE
545 Technology Square	         \ D-E-F-0, LOOK AND FEEL HAS GOT TO GO!
Cambridge, MA 02139		  --------------------------------------
(617) 253-5983   Internet: mikew@athena.mit.edu   CompuServe: 73667,3264

mikew@charm.LCS.MIT.EDU (Michael B. Williams) (01/19/91)

In article <14639@milton.u.washington.edu>, iho@cac.washington.edu (Il Oh) writes:
|> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:
|> 
|> [complaint about bad performance in 386 enhanced mode deleted]
|> 
|> Turn to p. 522 of your Windows manual (that's the page in my manual and yours
|> may be different) and follow the instructions for setting up a permanent swap
|> file.  While the performance is still lousy, it's noticeably better with the
|> permanent swap file.

Although I haven't used a permanent swapfile--I have 6MB of RAM and have so
far never run out--I have tried turning off the temporary swap file (primarily to save
disk space), with no significant change in speed.  Is it possible that just the act of
setting up a permanent swapfile could improve performance of DOS programs?  I
wouldn't think that there would be a connection, but at this point, anything is worth
a try.
________________________________________________________________________
Michael B. Williams	      \ 1-2-3-4, KICK THE LAWSUITS OUT THE DOOR
MIT NE43-532 		       \ 5-6-7-8, INNOVATE DON'T LITIGATE
Laboratory for Computer Science \ 9-A-B-C, INTERFACES SHOULD BE FREE
545 Technology Square	         \ D-E-F-0, LOOK AND FEEL HAS GOT TO GO!
Cambridge, MA 02139		  --------------------------------------
(617) 253-5983   Internet: mikew@athena.mit.edu   CompuServe: 73667,3264

press@venice.SEDD.TRW.COM (Barry Press) (01/19/91)

In article <1991Jan18.174333.28178@mintaka.lcs.mit.edu> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:
>In article <6219@exodus.Eng.Sun.COM>, jcb@frisbee.Eng.Sun.COM (Jim Becker) writes:
>|> A friend found that using QEMM for memory management worked well, like
>|> twice as fast or better. Apparently even DOS shells running full
>
>I like this idea, but I got QEMM for Christmas and so far it doesn't seem to make much

I tried it as well, and find that although I can make the system work (but 
don't load smartdrv high, cause it locks up my system), it drastically slows
down my disk.  For instance, SI reports disk speed of 8.5, but if I simply
put in QEMM vs. HIMEM, it goes down to 6.2.  Worse yet, calls to Quarterdeck
helped not a bit.  Admittedly, the SCSI disk I've got is not your usual setup,
and there are interactions between the disk driver and qemm (but both Adaptec 
and QDK say they work together), but losing 25% of disk performance for 25K or
so of memory (can't load smartdrive high, and QDK says in general this probably
doesn't work) just isn't worth it.

-- 
Barry Press                                 Internet: press@venice.sedd.trw.com

brad@huey.Jpl.Nasa.GOV (Brad Hines) (01/19/91)

In article <966@venice.SEDD.TRW.COM>, press@venice.SEDD.TRW.COM (Barry Press) writes:
|> 
|> I tried it as well, and find that although I can make the system work (but 
|> don't load smartdrv high, cause it locks up my system), it drastically slows
|> down my disk.  For instance, SI reports disk speed of 8.5, but if I simply
|> put in QEMM vs. HIMEM, it goes down to 6.2.  Worse yet, calls to Quarterdeck
|> helped not a bit.  Admittedly, the SCSI disk I've got is not your usual setup,
|> and there are interactions between the disk driver and qemm (but both Adaptec 
|> and QDK say they work together), but losing 25% of disk performance for 25K or
|> so of memory (can't load smartdrive high, and QDK says in general this probably
|> doesn't work) just isn't worth it.
|> 
|> -- 
|> Barry Press                                 Internet: press@venice.sedd.trw.com


Although Microsoft seems to promise doom and destruction if you use anything
but smartdrive, I quickly decided that smartdrive was still slow (like previous
versions) when I started using win 3.0.  I now use pc-cache from pc-tools 6.0,
and it seems much faster (purely subjective measurement here).  I have used this
configuration now since about a week after I got Windows back in June with
no ill effects.  And pc-cache can load hi if you have enough memory up there.
pc-cache from pc-tools 5.5 is somewhat smaller and will almost surely fit
in your high memory, but I haven't tested it much with windows.  I like the
ability of pc-cache 6.0 to cache writes; this too has worked flawlessly since
June.

The resident sizes of both pc-cache 5.5 and 6.0 are similar, but the size of
version 6.0 when first loaded is rather large (>60K as I recall) but then it ends
up occupying only 20-30K.

-- 
Brad Hines
Internet: brad@huey.jpl.nasa.gov

JPL 169-214
4800 Oak Grove Drive
Pasadena, CA  91107
USA
818-354-2465

ernst_witter@eva.slu.se (01/22/91)

There has been some discussion about the degradation of performance
(here meant that applications run slower) when running Windows in 386Enh
mode, compared with standard mode, or when running the DOS applications
outside of Windows. I have 386SX (16Mhz) with 5Mb total memeory and have
been running Windows for about 6 months. I mainly use non-Windows applications
and have also observed the above mentioned degradation of performance. 
Using the system performance indices which I have I've tried to locate what
is causing this slowing down of the machine. Not surprisongly the outcome
is somewhat dependent on which test you run. I've run Norton index (v4.5),
Landmark CPU test v0.99, and MicroSystems HSPEED prgram. The latter is special
in that it only tests block writes to memory and registers and simple
arithematic performance by these two (is not affected by presence of co-proc).
Running my machine (0 Wait State) without any management of its extended 
memory gives the following:
	Norton:	15.6
	Landmark: 21.0 Mhz (rel to AT)
	HSPEED: 783% (rel to IBM/PC)

Installing HIMEM.SYS reduces performance according to Landmark by 32% and
according to Norton by 4%. HSPEED gives same performance:
	Norton: 15.0
	Landmark: 14.3 Mhz
	HSPEED: 783% 
Further installing emm386.sys and/or smartdrv.sys has no further (other than
that caused by HIMEM) effect on system performance. It is interesting to note
here that simulating expanded memory in hardware/software with emm.sys supplied
with the machine does not affect system performance.

The next step was then to run these tests from Windows (exclusive, full screen,
no other programs loaded except program manager). Here it was only Landmark
which showed a further degradation of performance (8.0 Mhz) compared with
having only HIMEM installed.
The conclusion must therefore be that -for some programs at least- the
problem of Windows degrading performance in 386Enh is simply due to the 
need for HIMEM. Note however that as soon as you run a non-Windows application
not-exclusive things soon grind to a virtual halt, especially if you try
to display things in a window. As far as Windows use with non-windows
applications, it is a great task switcher but as for efficient multi-
tasking or trying to use the pasting between applications facilities it is
certainly not living up to its promise.

I would be interested to hear from anyone using QEMM with Win3.

Ernst Witter

sc05@harvey.gte.com (Shih-Chio Chang) (01/25/91)

I was following the discussion and did some experiments for myself.  I have
found a possible cause that nobody had mentioned.  In my case, I am using
a Compaq 386/20 and X11/AT with a 3Com305 card for ether net access.
I have found that the Norton (ver. 4.5) SI index to be around 24 before
window was launched, and stayed around that figure in full-screen DOS session
in window enhanced mode.  However, the SI index dropped to around 20 for
windowed DOS session.  Then the biggest degradation came when I launched
NetTask, the resident network driver used by X11/AT.  The index dropped to
around 15 in either windowed or full-screen DOS sessions.

I do not have experience with other network drivers (I used PC-NFS and
X-View for a while but they basically do not work with windows, and has the
unfortunate limitation of 7 windows maximum posed by PC-NFS),  but I would
imagine similar situations may occur.

S.C. Chang
GTE Labs
schang@gte.com
(617)466-2988

davidds@microsoft.UUCP (David D'SOUZA) (01/28/91)

>In article <1991Jan17.234310.6393@mintaka.lcs.mit.edu> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:
>>A few of us out here are experiencing the same problem, but no one has
>>yet suggested a solution that works.  My NEC Powermate 386SX gives the
>>following SI times (values are approximate):
>>
>>Computing Index
>>	From DOS (or Standard mode window): 15.2
>>	From 386 mode: 4.6


Windows Enhanced mode uses 32 bit code.   All memory accesses need to
be 32 bits wide.  On 386 machines, motherboard memory fetches can be
done 32 bits at a time.  Expansion memory is usually added to the
mother board in which case you have 32 bit access to the new memory. 
Some, such as Compaq, have a dedicated memory expansion slot which
also allows memory to be fetched 32 bits at a time.

However, if you add more memory to your 386 using old style cards which
plug into the AT style slots, you are hosed.  This memory can only be
accessed 16 bits at a time (the hardware does this automatically).
Thus, it takes twice as long for the processor to fetch 32 bits from
here. You could even incur wait states between fetches making things
even slower.

Real and standard mode just use 16 bit code and all memory fetches need
only be 16 bits wide so you don't really notice the slow memory.  Most
dos apps are also 16 bit apps so once again, you don't see performance
problems.

When you run any 32 bit app, IF IT RESIDES IN THE SLOW MEMORY, it will
also experience a slow down.  Some 32 bit apps end up loading in mother
board 32 bit memory and only data ends up being stored in the slower
memory. So you don't notice a major slow down.  Windows, due to its
virtual memory, could end up in any portion of physical memory and even
moves around, thus, tends to be more susceptable to slow memory
problems.

-Dave

<Standard disclaimer>

brandis@inf.ethz.ch (Marc Brandis) (02/02/91)

In article <70249@microsoft.UUCP> davidds@microsoft.UUCP (David D'SOUZA) writes:
>>In article <1991Jan17.234310.6393@mintaka.lcs.mit.edu> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:
>>>A few of us out here are experiencing the same problem, but no one has
>>>yet suggested a solution that works.  My NEC Powermate 386SX gives the
>>>following SI times (values are approximate):
>>>
>>>Computing Index
>>>	From DOS (or Standard mode window): 15.2
>>>	From 386 mode: 4.6
>
>
>Windows Enhanced mode uses 32 bit code.   All memory accesses need to
>be 32 bits wide.  On 386 machines, motherboard memory fetches can be
>done 32 bits at a time.  Expansion memory is usually added to the
>mother board in which case you have 32 bit access to the new memory. 
>Some, such as Compaq, have a dedicated memory expansion slot which
>also allows memory to be fetched 32 bits at a time.

Sorry, I do not want to start a flame war, but this is just plain nonsense in
this context. First, Michael B. Williams has a 386SX, so all memory accesses
are only 16 bits wide. Second, he is not measuring the speed of Windows but
the speed of SI, which is 16 bit code. 

>However, if you add more memory to your 386 using old style cards which
>plug into the AT style slots, you are hosed.  This memory can only be
>accessed 16 bits at a time (the hardware does this automatically).
>Thus, it takes twice as long for the processor to fetch 32 bits from
>here. You could even incur wait states between fetches making things
>even slower.

[some more comments about 16- and 32-bit code deleted]

Well, now you are coming closer, but the problem is not the width of the bus
but the wait states that you get when accessing memory over an AT bus. The
difference between standard mode and enhanced mode is, that in standard mode
DOS applications use the real mode of the processor (as under DOS), while in
enhanced mode they are run in VM86 (virtual mode). Programs running in real
mode can only use the first megabyte of memory, so the DOS program SI will
always be loaded there. A VM86 can reside anywhere in memory and therefore
SI may be loaded in some slow memory that is accessed over the AT bus.

There is also some overhead coming from the use of VM86, as certain 
instructions cause a trap in VM86 and are then emulated by a Windows monitor.
However, these instructions do not occur in the inner loop of SI that measures
the speed index, so you should not notice a big difference due to this.


Marc-Michael Brandis
Computer Systems Laboratory, ETH-Zentrum (Swiss Federal Institute of Technology)
CH-8092 Zurich, Switzerland
email: brandis@inf.ethz.ch

t901590@mp.cs.niu.edu (T.J. McNamee ) (02/05/91)

In article <70249@microsoft.UUCP> davidds@microsoft.UUCP (David D'SOUZA) writes:
>>In article <1991Jan17.234310.6393@mintaka.lcs.mit.edu> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes:
>>>A few of us out here are experiencing the same problem, but no one has
>>>yet suggested a solution that works.  My NEC Powermate 386SX gives the
>>>following SI times (values are approximate):
>>>
>>>Computing Index
>>>	From DOS (or Standard mode window): 15.2
>>>	From 386 mode: 4.6
>
>
>Windows Enhanced mode uses 32 bit code.   All memory accesses need to
>be 32 bits wide.  On 386 machines, motherboard memory fetches can be
>done 32 bits at a time.  Expansion memory is usually added to the
>mother board in which case you have 32 bit access to the new memory. 
>Some, such as Compaq, have a dedicated memory expansion slot which
>also allows memory to be fetched 32 bits at a time.
>   & then a bunch of stuff about 16-bit memory boards & acessing 16-bit
>   memory in 2 swipes, etc.

   As I understand it a 386DX has a 32-bit data bus, but the 386SX has
only a 16-bit data bus.  32-bit internally (registers & such) but
only a 16-bit interface to the outside world. (Much like the M68000)
Therefore ALL memory would be 16-bit and acessed in 2 swipes.
If I'm wrong, I'd like to know...I have a 386SX w/ win3.0

                                 Eric Moore

altman@sbgrad7.cs.sunysb.edu (Jeff Altman) (02/15/91)

Use Hyperdsk instead of SMartdrv.sys.  Version 4.20 supports
the same ability as smartdrv.sys to give control of XMS 
memory to Windows when windows needs it.

Works well with QEMM, and there are 286 and 386 specific versions

It also caches writes.


--
- Jeff (jaltman@ccmail.sunysb.edu)