Mail Archives: djgpp/1992/04/03/03:19:46
>> I was wondering what the
>> "Optimal IBM PC" for the DJGPP compilation would be. i.e. I have 8M RAM,
>> How can I use my MEGs to speed up DJGPP compilation??????
> Last weekend I was testing several methods in speeding up
> Djgpp compilations. The best way to speed up compiling is to
> make a RAMDisk of about 4MB and copy everything in /djgpp/bin,
> /djgpp/lib, /djgpp/include (and include/sys) on to the RAMDrive.
> Also be sure when altering your environment variables you SET
> gcctmp to a directory on the ramdrive. This is the fastest way to
> compile, but there are other methods as well... you could make
> a smaller ramdrive for gcctmp and use a cache (but some caches
> don't work with some MAKE programs, mainly Borlands). Nonetheless
> this is the second fastest option (with or without the ramdrive you
> might want to play around with; you might not want to bother with
> the RAMDrive...) The only real other option is buy a faster computer...
>
> Please let me know what you eventually use, how much memory, what caches,
> the size of ramdrives, and what is on them, (make and model of your
> machine...), etc... I am sort of keeping track of this information
Here we go,
I was stubborn in finding out THE BEST CONIGURATION for GCC. Well, the
best way to find out is to try millions of different configurations.
I did! I am giving you the summary, so you can pull some useful info
out of the numbers I'll give you. The program I used as a template was
"compress" which comes with djgpp. I have 8 MB RAM, and I tried different
RAMDISK and RAMDRIVE configs to see which would work the best. Those of
you who don't have 8 MB RAM or those of you who have their faster cache
program might still have an idea. My machine is a 386SX-16MHz. My hard disk
is an IDE 19ms HD.
First thing I tried was to NOT use SMARTDRV at all (i.e. no disk cache),
since I have 8MB RAM, i.e. 8MB-640K=7500K Extended memory, when I use,
say, 7000K as SMARTDRV, I have 5000K free XMS which will become
important in the discussion below. Ok, lets see a summary of compilation
times in NO CACHE case:
free XMS RAMDISK SMARTDRV Compilation Time
-------------------------------------------------------------
90K 7400K - 119 sec
140K 7350K - 80 sec
190K 7300K - 67 sec
240K 7250K - 60 sec
290K 7200K - 53 sec
340K 7150K - 46 sec
390K 7100K - 40 sec
440K 7050K - 40 sec
490K 7000K - 39 sec
540K 6950K - 39 sec
590K 7000K - 39 sec
. . . .
1590K 6000K - 39 sec
As you can see, comp. time saturates when you have enough free XMS memory.
By the way, I used this RAMDISK for GCCTMP, so actually having more than enough
RAMDRIVE didn't do any good. Having more than enough free XMS memory
didn't do any good wither. Note: I use HIMEM.SYS as XMS manager.
Next thing to try was to NOT HAVE RAMDISK, but have lots of SMARTDRV. In
this case, I used my 19ms Hard disk for GCCTMP. Here is the performance report:
free XMS RAMDISK SMARTDRV Compilation Time
-------------------------------------------------------------
80K - 7400K 331 sec
130K - 7350K 195 sec
180K - 7300K 130 sec
230K - 7250K 108 sec
280K - 7200K 83 sec
330K - 7150K 66 sec
380K - 7100K 51 sec
430K - 7050K 40 sec
530K - 6950K 35 sec
. . . .
1530K - 5950K 35 sec
Same thing, if you have enough free XMS, it is good. Otherwise performance
drops down like crazy. Having 80K free XMS was funny, in this case
all the swapping is done on Harddisk and Harddisk goes nuts! After 5
minutes of pationate love with HD, compilation is done!!!
Ok, third thing is to combine good things about RAMDRIVE and SMARTDRV
to get the best performance. From what the above two tables show, you
definitely need at least 500-600K free XMS. I'm not sure about if we would
require more free XMS to compile a larger program?? Hope to hear this from
professionals. I'm also not sure how to use the free XMS as EMS, but
I think DJGPP is smart enough, so that it figures out that you have free
XMS and it uses it for swapping and stuff. Am I right????
Third table is the perf. report when you use RAMDISK for GCCTMP and when
you use a certain amount of cache, let's see if we can beat the 35 sec.
barrier:
free XMS RAMDISK SMARTDRV Compilation Time
-------------------------------------------------------------
900K 1000 5500K 32 sec
900K 1300 5200K 32 sec
900K 1600 4900K 32 sec
1900K 1600 3900K 32 sec
I was expecting this. This is the optimal configuration, so no matter
what you do, as long as you have enough free XMS, enough RAMDISK for GCCTMP
and enough cache, you get the best performance (32 sec. in this case).
I also tried what the above letter suggested: Using RAMDISK to hold
all BIN, LIB and INCLUDE, INCLUDE/SYS files. This would leave enough
free RAMDISK so I could use my RAMDISK for GCCTMP also. Here is the sumary:
free XMS RAMDISK SMARTDRV Compilation Time
-------------------------------------------------------------
1000K 6600 - 32 sec
1000K 5000 1600K 28 sec
Yihhuuuu, we beat the 32 sec. barrier. So, if you have enough RAM, you
should do this. If you don't mind the time that you spend copying all
the files to RAMDISK during boot up. Don't forget to change environment
variables so that they point to RAMDISK BIN, LIB and INCLUDE dir's.
Sorry about the lengthy letter. Any comments or suggestions would be
greatly appreciated.
Take care,
Tolga
soyata AT phi DOT ece DOT jhu DOT edu
- Raw text -