Ref: 18960014
Title: How 3OPT Calculates CIOSYS Data Area Bytes
Date:  2/22/91

Copyright 3Com Corporation, 1991.  All rights reserved.

CIOSYS in 3+Share uses a single data segment to contain user-configurable
parameters for disk access.  In addition, there is overhead used by CIOSYS
itself.  With larger server configurations, you may run out of CIOSYS data
area.  This article will help you understand how this data area is
used and what you can do to optimize CIOSYS.

The following configurable parameters use these amounts of memory:

.LT
CIOSYS PARAMETER:       AMOUNT OF DATA AREA BYTES USED
 Byte Range Locks           16 each
 File Descriptors           46 each
 File Handles               28 each
 Threads                    (threads + 1) * 1074
 File Sharing Processes     10 each
 I/O Request Blocks         42 each


BUFFER POOLS:

Each buffer pool you define uses 272 bytes of CIOSYS data area.  Each
buffer within a buffer pool uses 38 bytes of CIOSYS data area.


DISK PARTITIONS:

Each drive uses 126 bytes of CIOSYS data area.  Drives A: and B: are
counted in this total, as are local drives.


FAT CACHEING:

The File Allocation Table (FAT) for each network drive will be cached into
memory.  CIOSYS will allocate buffer space to fit each of the FATs.  Each
buffer uses a 38-byte descriptor in the CIOSYS data area.

Example calculation using a standard 32 MB partition (512 bytes per sector,
4 sectors per cluster, 2048 cluster size):

Fat size = 33,554,432 (32 MB) / 2048 clusters * 2 bytes (size of FAT entry)
         = 32768 bytes.

Each buffer holds one cluster, therefore:  32768 (size of FAT) / 2048 (size
of buffer) = 16 buffers to hold FAT.

CIOSYS data area usage = 16 buffers * 38 bytes/buffer = 608 bytes.


OVERHEAD:

CIOSYS has a certain amount of overhead for its own internal variables and
data structures.  This varies depending on the type of server you are
using:

.LT
SERVER TYPE         CIOSYS DATA AREA OVERHEAD
 3S400/3S500            4288
 3S200/3Server3         4272
 PC Server              4272
.EL


OPTIMIZATION OF CIOSYS DATA AREA:

The 64 KB limit of the CIOSYS data area can limit the configurability of
3+Share.  CIOSYS usually limits you in one of two ways:  the inability to
configure enough open files (file descriptors and file handles), or the
inability to configure enough buffers (affecting server performance and
3+Backup).

One of the heaviest uses of CIOSYS data structures (both data area and
expanded memory) is FAT cacheing.  If you reduce the number of partitions,
you reduce the number of FATs that must be cached.  This will free up to
32 KB of expanded memory and 734 bytes of data area.  Paritioning a large
drive into numerous 32 MB paritions is extremely wasteful of expanded
memory for FAT cacheing and CIOSYS data area.

Another area that you can make some tradeoffs is in the number of threads
configured on the server.  Threads are used for concurrent access to
CIOSYS.  If a process cannot get a thread, it will queue up waiting for one
to become available.  If you reduce your threads from 10 to 9, you pay at
most a 10% performance penalty, and then only at times of extreme server
loading.  Lowering your threads by one will gain 1074 bytes of data area
that you can allocate to other CIOSYS parameters.

When you are tuning your server for your applications, consider the
resources that the applications will be using.  Database applications make
heavy use of byte range locks.  Word processors do not use byte range
locking at all.  Each open file and open subdirectory on the server
requires one file descriptor for all users.  Each time a file is opened,
a unique file handle is used.  Therefore, there will only be one file
descriptor for a file, but potentially many file handles.  Database
applications have multiple users opening each file, so file handles are a
more critical resource.  Word processing will tend to use more file
descriptors (one for the file, and one for each subdirectory in the path
for the file).

Optimization aside, the 64 KB CIOSYS data area limit is a serious limitation
to 3+Share.  If you cannot tune CIOSYS to meet your needs, you may need to
migrate to a new network operating system.

