Performance Tuning Parameters
Adjusting Disk Cache Parameters
The basic parameters are controlled via the CONFIG.SYS statement
where X is the boot drive letter and,
x : The amount of RAM in kilobytes used for the HPFS cache.
y : The maximum cached block size in kilobytes. The possible
values are from 2K to 64K.
zzz: The list of HPFS drive letters on which the CHKDSK (with the
option /F) will
be performed automatically, in the case the system was not shut down properly. Placing
the plus sign in front of a drive letter causes that this drive is checked during every
The optional (and undocumented) switch /force is intended
to allow the immediate access to an improperly stopped HPFS drive without
necessity to run CHKDSK /F on it (such a drive does not appear in the /AUTOCHECK
list). The switch /quiet disables the error messages. It should
not be put as the last parameter of the IFS statement.
The fine-tuning of the HPFS cache is achieved via the CACHE command. The following are
the switches for this command:
The CACHE command can be executed from the command window, or from the CONFIG.SYS file
via one or several RUN statements.
- Sets the amount of time in milliseconds that
the disk must be idle, before the data in the cache memory can be written to it.
The default is 1000.
- Sets the maximum amount of time in milliseconds before
a block in the cache memory will be written to the disk. The default is 5000.
- Sets the minimum amount of time in milliseconds
that should pass before a cache buffer can be written to the disk. The default is 500.
- Defines the maximum allowed
number of unwritten buffers in the cache. After this number is reached, all unwritten buffers
are cleaned up.
- Defines the maximum size of the data block (in bytes)
that can be put in the cache memory. By default it is set to 64x1024.
Enables or disables read-ahead operations.
Enables the long display of the cache status (including /writecache and /dirtymax).
- By its nature this switch must be applied within a
separate CACHE command. It enables/dispables the HPFS cache. If set to
n, it enables exactly n lazy writers.
The syntax of the cache statement for FAT partitions is
DISKCACHE=x, LW, T, AC:zzz
where LW indicates the lazy-write cache operations. Omitting
this is equivalent to
immediate write of the cache to the disk, and T
is the threshold size of the
number of FAT sectors that may be placed into the cache. The range is from 4 to 128 and
the default is 4.
x : The size of the FAT cache in kilobytes.
zzz : The list of drive letters of FAT-formatted partitions
to be checked automatically during the boot sequence, in the case of an improper
Swap File Considerations
The swap file location and size are controlled by the statement
SWAPPATH=TheLocation x y
TheLocation: This is the swap file (=SWAPPER.DAT) location.
The default is X:\OS2\SYSTEM.
x : The minimal amount of free partition space in kilobytes.
When the swap file increases, living less then this amount of free space, a warning message
y : The initial size of the swap file, in kilobytes.
The swap file dynamically changes its size. It is recommendable to fix the initial size
so that the system would normally work without frequent changes in the swap file
size--such swap file adjustments hurt the system performance.
It is recommendable to place the swap file in the root directory of the most frequently
used partition of the least frequently used hard drive.
Controlling the Application Priority
determines how the system will treat the foreground applications. When set to YES,
disk I/O operations associated with foreground aplications will get a nontrivial
priority boost over the background processes. This is the default behavior.
Similarly, the statement
controls how the system treats the foreground applications, from the point of view of
the allocated CPU time. The default is DYNAMIC, which means a foreground application
gets a performance boost. Also, in this case moving a pointer over the application
window will increase the priority. Setting PRIORITY to ABSOLUTE means background and
foreground applications will be treated on the equal footing.
In a server-like situation, it is reasonable to consider setting the above
variables to NO/ABSOLUTE, so that background processes would not be affected by the
Controlling the Threads
defines the maximum number of threads that can be simultaneously running in the system.
The range is from 64 to 4096.
The statement TIMESLICE=x,y
defines the minimum=x and the maximum=y time
(in milliseconds) that the system
spends executing a thread, before passing to another thread of
By default, the TIMESLICE statement is not present in the CONFIG.SYS file, and the operating
system uses the dynamical timeslicing algorithm. This means that
the minimum/maximum timeslice values depend on the actual system conditions.
defines the amount of thread waiting time (in seconds),
before the operating system will assign a higher priority to the thread. By definition,
this works only if PRIORITY is set to DYNAMIC. The range for z is from 1 to 255, and
the default is 3.
The operating system (together with applications, when appropriate) assings a priority
to every thread of execution. There exist four classes of priority, and each class is
divided into 32 priority levels. The system manages threads basically using the following
This is called round-robin scheduling.
- Assigning the priorities and executing the threads (TIMESLICE).
Threads of the same priority get the same chance to be processed;
- Changing the thread priority (MAXWAIT).
Object Snooze Time
The global variable OBJECTSNOOZETIME determines the snooze time of
WPS objects (in seconds). This is the period of time the WPS will wait after
an object is closed, before all the object DLLs will be unloaded from the memory,
and hence the object will pass from the awakened to the dormant state. The default
value if 90 seconds (it is not necessary to define it in CONFIG.SYS).