Node:Config,
Next:More than 64MB,
Previous:Reasonable hardware,
Up:Requirements
Q: How do I configure my system to get optimal performance under
DJGPP?
A: That depends on the amount of RAM you have installed in your machine. Below are some guidelines to help you.
SETVER.EXE
, HIMEM.SYS
etc.) from your CONFIG.SYS
and AUTOEXEC.BAT.
TMPDIR
environment variable to a directory on your hard disk. Put a
sufficiently large BUFFERS=
statement into your CONFIG.SYS
(I recommend setting BUFFERS=40,8
) to make DOS file operations
faster8.
CWSPARAM
program
(from the csdpmi4b.zip
archive) and set the
"Minimum application memory desired before 640K paging" parameter to
512K or larger. Depending on how much memory you actually have, you
might need to further fine-tune this parameter. This parameter defines
the lowest amount of extended memory CWSDPMI will use; if your system
doesn't have that much free extended RAM, CWSDPMI will use conventional
memory instead, where usually there should be around 600K of free RAM.
With this configuration, GCC will run out of free physical RAM and start paging when compiling almost any C program and all C++ programs. If you are serious about DJGPP development, you need to buy more RAM urgently.
SETVER.EXE
, HIMEM.SYS
) from your CONFIG.SYS
and
AUTOEXEC.BAT.
TMPDIR
environment
variable to a directory on your hard disk.
With this configuration, GCC will still run out of free physical RAM and start paging when compiling large C programs and most C++ programs. Plan to buy more RAM as soon as you can.
EMM386
or QEMM386
. Try using
the FRAME=NONE
parameter of the memory manager. This will
disable Expanded Memory (EMS) services as far as most programs are
concerned; if you must use DJGPP together with any program which needs
EMS, try to configure that program to use Extended Memory (XMS) instead.
DEVICEHIGH=
command (instead of DEVICE=
in
CONFIG.SYS
, and by using the LOADHIGH
command in
AUTOEXEC.BAT
.
TMPDIR
environment
variable to a directory on your hard disk.
AUTOEXEC.BAT
file that installs an 8-MByte cache for hard disks
C:
, D:
, and F:
:
loadhigh c:\dos\smartdrv.exe c+ d+ f+ 8192
(The +
character after the drive letter enables the delayed-write
(a.k.a. write-back) feature for that drive.) Note that you do
not need, and should not install a disk cache if you intend to
use DJGPP programs from Windows 9X, because Windows includes its own
built-in disk cache (called VCACHE
) that is loaded together with
the operating system.
TMPDIR
environment variable to it.
If your RAM disk is less than 4 MBytes, GCC might run out of space there
for very large source files (e.g., cccp.c file from the GCC source
distribution), but this shouldn't happen unless the size of the source
file you are compiling approaches 1 MByte. Note that software is
available that lets you install a RAM disk even on Windows 9X.
(However, I'm told that Microsoft's own RAMDRIVE.SYS
only
supports long file name on the RAM disk if its size is less than 9MB.)
Some people disable the delayed-write feature for safety reasons, to
avoid losing files due to system crashes. If you are worried about this,
you can usually gain performance without sacrificing safety by enabling
delayed-write together with an option that causes the cache to flush the
write-behind data before the system returns to the DOS prompt. For a
SmartDrv
disk cache, this is achieved by specifying /N/F
switches instead of /X
.
Using a memory manager, such as EMM386
or QEMM
, is not
required (DJGPP will run without it), but highly recommended, since it
has several advantages:
If your memory manager is EMM386
, I recommend to put the
NOEMS NOVCPI
parameters on its command line. This will allow you
to use UMBs and up to 128MB of physical memory (if you have that much
installed). Without these parameters, many versions of EMM386
limit your physical memory to 32MB.
It is generally not recommended to install DJGPP on a networked drive,
since this makes it slower, particularly when linking programs. If you
do install DJGPP on a networked drive, you should consult your network
administrator to configure the network for maximum performance. For
Novell networks, a good place to look for advice is the Novell FAQ
(search for a file called nov-faq.htm
).