home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 36 Tips
/
36-Tips.zip
/
alltips.zip
/
OTSWAP.FAX
< prev
next >
Wrap
Text File
|
1994-11-27
|
15KB
|
332 lines
Info about memory and swapper usage. 7/20/94
File:osotswap.fax 5/3/94
Memory and Swapper information
------------------------------
The purpose of this document is to provide information
about memory and swapper usage.
Memory needs
------------
- OS/2 will run on 4 MB. Depending on the application mix,
and the desired performance, memory requirement needs will
vary. In general, the system should have enough memory to
avoid excessive amount of swapping activity.
- Question: What are the symptoms of poor performance
caused by insufficient amount of memory ? a) Excessive
amount of hard disk activity which is caused by constant
swapper activity. In extreme cases, the disk light will be
constantly active even when system is not being actively
used. b) Performance degradation - It takes an excessive
amount of time to do anything. In extreme cases, it might
take several minutes for the task list to be displayed
after pressing <Ctrl><Esc>. Solution: Adding additional
memory will alleviate the above symptoms.
Swapper
-------
- Question: How much disk space should be allowed for
swapper file growth ? Answer: It depends on the number of
applications, the kind of applications running and the
amount of memory in the system. Symptoms: If getting
SWAPPER FULL (if COMMIT=OFF) or LOW MEMORY (if COMMIT=ON)
messages, then you are not allowing enough free disk space
to allow for swapper growth. Performance will drop
tremendously, because of increased swapper activity, and in
extreme cases, the system may halt or trap.
- If you are monitoring swapper file size, you will get a
feel for the size of the typical swapper file size under
normal system usage.
SYS1477 - PJ13981, PJ09668 and PJ09471
---------------------------------------
PJ13981 deals with a potential problem because all OS/2
processes continue running after receiving a SYS1477
"Out of Swapper" warning message. The possibility of a
system crash exists if these processes continue allocating
memory.
The SYS1477 Swapper File Full message is just a warning
message that informs the user that it needs more disk space
in order for the swapper file to grow. However, it is not
designed to allow usage of the system under low disk space
conditions in the swapper partition without running the risk
of causing a system failure.
The user should understand that while the SYS1477 message
is being displayed, all processes continue running. If any
one of the processes continues allocating memory while the
SYS1477 message is displayed, and the user does not respond
to it quickly enough, may cause OS/2 to run out of memory and
halt the system with an Internal Processing Error (IPE).
In very fast machines, or if the system is very busy, it is
possible for an application to consume the remaining memory
and cause an IPE before the SYS1477 message has time to
come up.
SUGGESTIONS TO MINIMIZE THE CHANCES OF PROBLEMS:
1. Provide enough disk space to allow for swapper growth.
2. Larger "minfree" parameter so that the SYS1477 warning
message is displayed earlier.
3. Usage of the "commit" parameter. This prevents an
application from running unless there is enough memory
and swapper resources for the application to run. The
user should understand that the "commit" parameter
allocates memory and swapper resources when REQUESTED
by the application. If this parameter is not used,
resources are allocated as NEEDED by the application
to run.
For example: If an application allocates 16mb of memory but
does not use the memory, then if "commit" is specified it
will require a total of 16mb of memory and swapper resources
for the application to run. If "commit" is not used, it
might only require 200k of memory and swapper resources to
run the same application.
SYS0008 message when running memory intensive applications
----------------------------------------------------------
- This may be caused by having the swapper file in a
partition with a large amount of free disk space. This is
a known problem that has been fixed and will be
incorporated in a service pack for OS/2 2.1 or the next
version of OS/2. As a work around, place the swapper file
on a partition with less than 100mb of free space.
How OS/2 addresses RAM above 16M
-----------------------------------
OS/2 will attempt to address all RAM directly but it can
be limited by device drivers to 16M of directly addressable
RAM. OS/2 queries loaded device drivers (using a
DOSDevIOCtl, Category 8, function 63h API call) to determine
if a given device driver can access more than 16M of RAM.
If any device driver on the system returns that it cannot
address more than 16M of RAM, then OS/2 will only
directly address 16M of RAM. RAM above 16M is
reserved for an "in memory" swap file which will be used
before SWAPPER.DAT is used. Note that if NOSWAP is set in
the MEMMAN statement, the "in memory" swap file is not
disabled.
Below are a few reasons that a device driver may not be able
to address RAM above 16M. The most common is that the
device driver is a block device driver (a device driver which
uses DMA) whose DMA channel is only 24bits and the device
driver was not programmed to work around the DMA's limitation
of addressing 16M of RAM. Another reason is the device
driver may have been programmed for OS/2 1.3 and is therefore
subject to the maximum amount of RAM which OS/2 1.3 could
address which is 16M. Also if the greater than 16M bit in
the Device Driver Attributes which are returned from the API
call is not set, this will occur.
Determining RAM available on ISA systems
-------------------------------------------
During boot, OS2LDR issues the three BIOS calls mentioned in
the section below. If the INT 15 AX=88 returns a value other
then 16M then this is the amount of RAM OS/2 will address.
If the INT 15 AX=88 returns 16M then OS/2 will check the return
from the INT 15 AX=E801 to see if that indicates extra RAM
available to the system. Once OS2LDR has determined what
RAM is available to the system, it passes this to OS2KRNL.
OS2KRNL initializes the Page Manager which does one final
check and verifies the RAM which was returned by the BIOS
really is addressable.
Please note that OS/2 does not attempt to find and use any
free RAM in the area between 640K and 1M which is reserved
for hardware.
BIOS calls to determine RAM on non-MCA systems
-------------------------------------------------
INT 12
This is the standard industry call to query the BIOS for
RAM available below 640K. The call returns into the AX
register the number of 1K blocks of RAM the system has
available in this memory area.
INT 15 ;AH=88
This is the standard industry call to query the BIOS for
RAM between 1M and 64M. The call returns into the AX
register the number of 1K blocks of RAM the system has
available in this memory area. The call technically can
support between 1M and 65M but the standard limits it to
64M.
INT 15 ;AX=E801
This is a relatively new call used by Compaq systems as
well as some other systems to query the BIOS for RAM
between 16M and 4G. The call returns into the BX register
the number of 64K blocks of memory the system has
available in this memory area. If there is more than 64M
of RAM in the system then the INT 15 AH=88 call should
only return 16M and the programmer should use INT 15
AX=E801 to find the additional RAM available to the
system. INT 15 AX=E801 will also return in the AX
register number of 1K pages between 1M and 16M so that the
INT 15 AX=E801 call will return all memory above 1M.
Memory allocations
------------------
When an application requests memory the system will give
the application, regardless of the amount request, 4k
blocks of memory. (4096 bytes) out of a 64k segment.
Example: if the process requests 5100 bytes, the system
will allocate a 64k segment of which 8192 bytes can be used
by this process. This means that if applications have a
large number of small memory allocation requests, the
memory being used by this process may not be what is
expected.
Memory allocation limits
------------------------
As documented in the programming guide volume 1
(S10G-6261-00) and the red book volume 1 (GG24-3730-00), it
is theoretically possible to allocate 512mb (Virtual
address space). This, of course is based on the systems
available ram and disk space. This 512mb area is divided
into 3 parts:
--------------- 512 MB
| |
| A (64mb) | Reserved
| |
--------------- 448 MB
| |
| B (64mb) | Shared Virtual address space
| |
- - - - - - - - 384 MB
| |
| |
| |
| |
| |
| C | Private and shared virtual
| | address space
| |
| |
| |
| |
--------------- 0 MB
Section A is reserved for future enhancements to the
operating system and can be used by changing the "protect"
option in meman statement located in the config.sys to
"noprotect". Section A would then be used by section B.
Section B is allocated at bootup time for shared memory and
can grow into section C. Section C is used by private and
shared memory and the more shared memory is allocated, the
less private address space will be available. Please refer
to the red book or the programming guide Volume 1 for
further information.
Swapper grows and will not shrink
---------------------------------
The swapper file will grow when an application is started
and there isn't enough available ram to run. The swapper
file will attempt to shrink back to its original size after
the application is terminated. More than likely the size
of the swapper file will remain bigger.
- Swapper file shrinkage will begin approximately 30
seconds after there is no system activity assuming no
process with higher priority is running.
- SWAPPATH's second parameter, in config.sys, defines the
minimum size of the swapper file. The swapper file will
not shrink to a size smaller than the swap file size
specified by SWAPPATH's second parameter. Note: The first
parameter in the SWAPPATH statement specifies the minimum
amount of free space in KB that can remain on the partition
where the swapper.dat file is located before a warning
notifies you that the swapper file has increased to a size
that leaves less than this amount on the disk. *
- Some utilities for analyzing memory and swapper activity.
a) Theseus2 which comes as part of the SPM/2 product, sold
by IBM, shows the amount of used and free swapper space.
It is fully supported by IBM and has many other additional
functions for analyzing memory and swapper usage. b)
OS20MEMU, which can be downloaded for free from the IBM PC
BBS phone number below) will show the amount of swapper in
use. The difference between that number and the size of
swapper.dat is the free swapper space. c) DINFO, which can
be downloaded for free from the IBM PC BBS, monitors
swapper size and remaining disk space.
- OS/2 determines the optimum initial swapper size
according to the amount of memory in the system. This
value can be overridden by the changing the second SWAPPATH
parameter in config.sys.
Size of swapper file is too big
-------------------------------
- An application is probably using up a lot of memory.
Using a utility program like os20memu can help determine
which program is using an excessive amount of memory.
- There remains the issue where the swapper.dat grows to a
large value (usually greater than 20 Meg), as a result of a
large resource allocating application which when terminated
does not free up all of the memory it requested. This is
termed as a "memory leak" originating from the application.
The manufacturer of the application should be contacted for
assistance.
Memory and Swapper Utilities
-----------------------------
From IBM PC BBS (free) DINFO - Monitor swapper file and
remaining disk space. OS20MEMU - Memory allocation tool.
Utilities from the BBS are provided "as is". There is no
customer support provided for these utilities.
Can be ordered from IBM (1-800-426-2255) SPM/2 - Contains
Theseus2. More sophisticated than OS20MEMU for analyzing
memory and swapper.
2.x BBS
-------
Users can download utilities, address questions to IBM or
other OS/2 users from the following BBS or data services.
IBM PC BBS (free) - (919) 517-0001
TalkLink OS/2 BBS - 1-800-547-1283 for information and
application.
Prodigy - Call Prodigy for information
CompuServe - Call CompuServe for information.
* Refer to the OS/2 Command reference manual for more
information.
12/31/99