Date: Sun, 06 Nov 94 23:31:04 GMT From: Martin AT snsystems DOT co DOT uk (Martin Day) Reply-To: Martin AT snsystems DOT co DOT uk To: eliz AT is DOT elta DOT co DOT il Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Disk I/O rates with DJGPP Lines: 51 In message <9411061011 DOT AA01093 AT is DOT elta DOT co DOT il> Eli Zaretskii writes: > > System 4K 32K > > =================== > > Native 21 16 Turbo-C compiler - 16 bit code > > X32 22 17 Watcom C 9.5 with X32 DOS extender > > DOS4GW 24 21 Watcom C 9.5 with DOS4GW DOS extender > > DJGPP 27 27 GCC with GO32 ( 1.12.maint2 ) > > =================== > > This is running on a 100MHz Pentium, 48Mbytes RAM using a SCSI hard > > drive running QEMM 7.03 with DPMI services. > > Did you try both with and without ``nodpmi'' in the GO32 environment > variable? Any difference in timings? Adding the nodpmi option gives a small performance gain of approx half a second > > I think the results show that the 4k buffer is not the only reason > > for slow file i/o with GCC. There's probably some inefficiency in > > the real mode interrupt call to DOS too. > > > > Any comments ? > > What I would like to point out is that performance penalty for using > DJGPP is really not so bad. I mean, when reading a 32MByte file, > does it really hurts that much to wait for another 7 or 10 *seconds* > for the program to run? Remember, unless you are running something > like wc, your program will have to actually *do something* with > those 32MByte of data, which will also take *some* time. > > [...] My real question here is why does go32 have a 30% time overhead on a disk read when X32 only has a 5% overhead (reading in 4k byte block sizes in both cases) ? Is the routine to copy data in/out of the real mode memory buffer slow or (more likely) is the transition to/from virtual 8086 mode slow ? We sell a debugger that we can build to run with either X32 or DOS4GW but due to inefficiencies in DOS4GW's switching between protected and virtual 8086 mode (for keyboard/mouse/scsi i/o processing) the debugger built with DOS4GW is noticeably more sluggish than when it's built with X32. If the problem is in the mode switch in go32 then addressing this should improve the performance of any program that has to perform a significant amount of i/o and may also help where you are low on memory and a lot of swapping to disk is occurring. -- Martin martin AT snsystems DOT co DOT uk