Main text
Hard drives
1. Filesystems
Your hard drive is an important part of the overall performance of your OS/2 system. Setting it up properly at the start will yield amazing results. The best thing you can do to improve the performance of your existing hard drive is to format it with the High Performance File System, or HPFS for short. This file system replaces the standard File Allocation Table, or FAT, system found on all DOS computers today. It has many advantages and improvements over FAT, and is ideally suited for OS/2. The only drawback is that HPFS requires between 200 and 400 K of working memory. Therefore, using HPFS on anything less than a 6 meg machine is counter-productive. Please note that if your hard drive size is 80 meg or less, that you will not see any measurable performance gain in speed, but you will still have the benefit of resistance to file fragmentation, better undelete capability, and a smaller cluster size compared to FAT, which will waste less space on your drive.
If you happen to have a license for the HPFS386 (or better: 386 HPFS) server file system, it is preferable to normal HPFS in all cases. Due to the different architecture and the cache size that is only restricted by the amount of available memory, its performance is much better than that of plain HPFS or JFS. Moreover, it offers local security similar to Unix. HPFS386 and HPFS are compatible, in case of changing them you only have to remove access restrictions. HPFS386 was part of Warp Server Advanced and Advanced SMP, but it is not included in Warp Server Entry Edition or Warp Server for e-Business. An extra license is extremly expensive, except for an update for Warp Server for e-Business (a few dollars).
If you own a license for OS/2 Warp 4.51, OS/2 Warp Server for e-Business or eComStation, the Journaling File System (JFS) is another good choice. Though it is not faster than HPFS under normal conditions, it provides a much larger cache, better and faster drive checking in case of crashes, and it offers spanning drives across several partitions and harddisks, and extending them during operation.
2. Swapping
Choosing the appropriate location and size of your swapfile can improve system performance drastically.
Upon startup OS/2 creates a swapfile with a given size or uses an existing one that fits the parameters. Now if
OS/2 runs out of physical memory, swapping occurs. When the needed space exceeds the swapfile's current size
OS/2 enlarges the file. Later when the allocated space isn't needed any more the swapfile is reduced in size
again with the initial size as a minimum. The process of enlarging and shrinking the file takes time, especially as
some internal structures have to be created. Additionally it can lead to fragmentation and hence to a slowdown of
swapping operations. So if the file has the right size initially, no enlarging or shrinking will occur.
Most of the time a swapfile size of 20MB will be enough. Make that 32MB if you're using VoiceType. This is a
rule of thumb. To better adjust the size to your specific system first choose a small initial size. Then create
your typical working environment by opening regularly used programs with files of the usual size. Now take a look
at the SWAPPER.DAT file's new size. Add a bit to the current size and use that value as new initial
size.
The default location for the swapfile is in the \OS2\SYSTEM directory on your bootdrive. If you have only
one harddisk place the swapfile in the root directory of the most used partition so the harddrive's read/write
head will be near it most of the time. If you happen to have more than one harddisk place the swapfile in the most
used partition on the least used harddisk. This should increase performance up to dramatically, especially on SCSI
systems.
The corresponding CONFIG.SYS statement is
SWAPPATH=location threshold initial_size,
e.g. SWAPPATH=H:\ 2048 20480 would place the 20MB large file SWAPPER.DAT in the root directory of the H: partition with a warning threshold of 2MB. If the free diskspace on H: sinks below 2MB a warning message will be issued.
3. Cache
3.1 HPFS and FAT
If you are running a HPFS formatted drive, try changing the IFS= line of your CONFIG.SYS file to read something like:
IFS=C:\OS2\HPFS.IFS /CACHE:2048 /CRECL:64 /AUTOCHECK:C
The /CACHE:2048 parameter will reserve 2048K for use by the cache only, so be careful how big you make this number. 2048 is the maximum, and less than 512 is equally useless. If you have an 8 MB RAM machine, start off with 512 and work your way up from there. On an 8 meg machine it will be a balancing act between speeding up your drive and slowing down OS/2, so keep an eye on how much crunching your hard disk does, and how long it takes to access frequently used items. Somewhere in the above mentioned range will be a happy compromise. If you have more than 32MB of RAM always use 2MB cache. See the table below for recommended cache sizes dependent on RAM and used file systems.
| RAM | HPFS and FAT | HPFS only | FAT only |
|---|---|---|---|
|
6-8MB |
256 each |
512 |
512 |
|
8-12MB |
up to 512 each |
up to 1024 |
up to 1024 |
|
12-16MB |
512 each |
1024 |
1024 |
|
16-20MB |
up to 1024 each |
up to 2048 |
up to 2048 |
|
20-32MB |
1024 each |
2048 |
2048 |
|
>32MB |
up to 2048 each |
2048 |
2048 |
The /CRECL:64 parameter sets the maximum record size for caching. If most of your files are about 64K in size, then setting it to 64 would be ideal. You can experiment with this number by adjusting it in 2 K increments, from a minimum of 4 (default) up to a maximum of 64. A good starting point is 32. The /AUTOCHECK parameter determines which partitions will be automatically checked if the system hasn't been shut down properly.
Another trick to speed up HPFS systems is to specify some additional parameters for the CACHE.EXE program, which regulates all the activity taking place in the cache. Try adding the following line to the end of your CONFIG.SYS file:
RUN=C:\OS2\CACHE.EXE /MAXAGE:30000 /DISKIDLE:30000 /BUFFERIDLE:10000 /READAHEAD /LAZY:1
This will increase the time data is hold on the cache. You may even try larger values like /MAXAGE:60000 /DISKIDLE:60000 /BUFFERIDLE:30000. This will hold data up to 60 seconds in the cache, but increase the risk of data loss in case of a crash as well. Okay, now reboot and see if it makes any difference on your machine.
Most people will also have FAT partitions on their system, e.g. for DOS or Windows. You can specify a seperate FAT cache with the DISKCACHE= statement in CONFIG.SYS.
DISKCACHE=1024,32,LW,AC:C
would set a cache size of 1024K, a record size of 32K (see above), turn on the lazywriter and select the C: partition for autochecking. See the table below for recommended cache sizes. If you don't access FAT partitions that much you may want to lower the FAT cache in favour of the HPFS cache. Don't remove the statement completely if you want to access floppy disks!
3.2 HPFS386
HPFS386 settings are not defined in CONFIG.SYS, but in the plain text file HPFS386.INI that is located in the \IBM386FS directory on your boot drive. The cache size is determined in kilobytes by the option cachesize in section [filesystem]. If you don't do this, 20% of the available memory will be used if its amount is below 20MB. If it is 20MB or higher, 60% will be used. For normal operation 12 to 16MB are sufficient, but you should increase the value for servers:
[filesystem] cachesize = 16384
Unless you are using old hardware that is incapable of accessing memory above 16MB via DMA (e.g. Adaptec AHA-1542 ISA SCSI Controllers or very old ISA networking cards), add the following to section [filesystem] to enable HPFS386 to access all memory:
useallmem = yes
As with normal HPFS and CACHE.EXE you can influence cache activity by using CACHE386.EXE. These parameters need to be specified in HPFS386.INI, too. To do so use section [lazywriter]. In contrary to HPFS they can be defined for each drive seperately. Have a look at the following example:
[lazywriter] lazy = *: ON maxage = efgh: 40000 bufferidle = efgh: 20000 maxage = j: 7000 bufferidle = j: 5000
The lazywriter is turned on for all HPFS-formatted drives by using the asterisk, maxage is set to 40000 milliseconds for drives e, f, g and h and bufferidle to 20000 milliseconds for the same drives. Drive j is set up for 7000 and 5000 milliseconds with the second pair of parameters.
3.3 JFS
Similar to HPFS the cache size for JFS is specified in kilobytes in CONFIG.SYS using the switch /CACHE:cachesize. By default, 12,5% of the machines physical memory are used. The possible range is 1MB to 64MB. A cache of 16MB would be defined with the following statement:
IFS=C:\OS2\JFS.IFS /CACHE:16384 /AUTOCHECK:*
Further settings are done using the /L:synctime,maxage,bufferidle parameter with synctime being the interval for starting synchronization threads. All values must be given in seconds for JFS! The following defaults have been pre-defined:
synctime: 64 maxage: synctime*4 bufferidle: minimum of 1 and synctime/8
To set JFS These settings can be adapted during operation with a little help from CACHEJFS.EXE that takes the same parameters.
Using the default values seems to cause some systems to become unstable. The following values have proven themselves.
synctime: 5 maxage: 20 bufferidle: 4
4. Search paths
When you start a program without a qualified path, i.e. you simply type something like netscape.exe at
the commandline, all the directories contained in your PATH statement in CONFIG.SYS will be
searched in the statement's order. The same happens with DLLs that are called by a program only that this time
the LIBPATH is searched. As a result programs with paths at the end of the PATH statement will
take longer to start. Also note that some programs have the bad habit to insert their directory at the
statements' beginning upon installation. By sorting these statements to reflect how often files are accessed an
often noticeable speedup can be achieved. Be warned however that this can cause conflicts if you have several files
with the same name and OS/2 or a program suddenly can't find the correct files any more.
As some applications like compilers or databases cause heavy disk activity, but also are not frequently used there
will be a conflict of interest in granting them the fastest search possible and slowing down other software. A good
idea is to optimize the path for the more frequently used software and setup some scripts that can temporarily
change the environment variables for the more seldom used applications. By specifying the reserved environment
variables BEGINLIBATH and ENDLIBPATH you can add new directories to the LIBPATH
statement's beginning and end. Have a look at the following example with the original
LIBPATH=.;C:\OS2;C:\OS2\DLL
This gets changed by issueing
SET BEGINLIBPATH=D:\IBMCPP\DLL SET ENDLIBPATH=E:\UTILS
which leads to the new
LIBPATH=D:\IBMCPP\DLL;.;C:\OS2;C:\OS2\DLL;E:\UTILS
that can be changed again. Note that the changed environment is only valid for the session of CMD.EXE in that
the script was executed. However, if you start a new session from there the environment will be inherited.
The PATH can be changed by specifying something like:
SET PATH=x:\newfirstpath;%PATH%;x:\newlastpath%PATH%
will access the current path's value.
Another way of optimization would be to use several CONFIG.SYS files containing different path statements,
but then a reboot will be necessary to change the environment.
5. Drivers
IBM's IDE driver IBM1S506.ADD doesn't support the latest chipsets by VIA, Aladdin, AMD etc. You can
speed up your system significantly by using the freely available IDE driver DANIS506.ADD by Daniela Engert. Read
the documentation thoroughly as there are several options that can speed up your system or cause it to crash!
Also there are some extra vendor specific drivers available for older chipsets that can enable special
features.
Later IBM1S506 drivers have busmastering enabled by default. Try the /!BM switch to turn it off if you are
experiencing problems.