----------------------------------- Tuning OS/2 Servers and Netstations using the 3Com NetBIOS Protocol %VER 1.1 ----------------------------------- Introduction ============ This document is intended to aid you in general tuning of 3+Open OS2 netstations and servers using the 3Com NetBIOS Protocol (NBP). This document covers tuning that may be done easily without intimate knowledge of network protocols or of the exact applications being used. The following chapters are included: Relevant Parameters Tuning the DOS Box Memory Tuning Adapter Performance Tuning Server Performance Tuning OS/2 Netstation Performance Examples The Examples chapter is somewhat independent of the others, and provides a number of specific tuning configurations. If one of these configurations is satisfactory, you may skip the earlier material. Relevant Parameters =================== CONFIG.SYS ---------- These parameters are stored in the CONFIG.SYS file in the root directory of the boot disk. The descriptions, ranges, sizes, and defaults given here are for MS OS/2 1.0. Additional information can be found in the MS OS/2 Setup Guide which is part of the 3+Open Documentation Set. DISKCACHE=n This command sets the size in K of the local hard disk cache. The range is 64 to 6900 and the default is 0. Typically the 3+Open installation software will set this to 384 in the CONFIG.SYS file. As data is read from the hard disk sector by sector, it is remembered in the cache. If the data is needed again, it can be retrieved from the much faster copy of the sectors in memory. 3+Open servers also implement a form of caching called 'lazy write.' Writes to the disk are held in the cache and only written to disk every second or so. This allows the sectors to be sorted and grouped together to speed up the actual writing to hard disk. Part of the memory allocated for the cache is used for control information so the cache size will generally be somewhat less than is specified here. Disk caching can substantially improve the performance of most network applications. PROTECTONLY=YES or NO RMSIZE=n This determines whether or not OS/2 will support a DOS compatibility box (also called real mode, the opposite of the 80286 processor's protect mode). The DOS box can be used to run many DOS 3.x applications under OS/2. The 3+Open installation will set this to YES for servers, meaning that a DOS box is not supported. The RMSIZE parameter sets the memory to reserve for the DOS box, in K bytes. The range is 0 to 640, and the default depends on how much memory is in your machine. RMSIZE is ignored if PROTECTONLY=YES. DEVICE=d:\path\filename This command causes a device driver with the given filename to be installed. The standard OS/2 installation will include a number of these, with more added by the 3+Open installation program. Some of these will be explained in the section "Tuning the DOS Box Memory," later in this document. LANMAN.INI (Server Section) --------------------------- These parameters are specified in the LANMAN.INI file in the section starting with [server]. The LANMAN.INI file can generally be found in the C:\3OPEN\SERVER\LANMAN subdirectory. The descriptions, ranges, sizes, and defaults given here are for 3+Open LAN Manager version 1.0. These parameters will affect the performance of the server and any clients connected to it. Additional information can be found in the 3+Open Network System Guide. NUMBIGBUF=n This sets the number of big buffers the server will use for large network transfers (such as file copies and program loads). Increasing this number will improve performance when multiple clients are performing such operations. The range is 0 to 128 and the default is 3. Since each buffer occupies 64K, you should be careful when increasing this value that you have enough memory. NUMFILETASKS=n This sets the number of processes that will be run to handle file and print requests from netstations. Increasing this number may improve performance if the server is I/O bound. The range is 1 to 8 and the default is 4. NUMREQBUF=n This sets the number of buffers the server will use to hold requests from netstations. Increasing this number may improve performance if the the server is often heavily used by many netstations at the same time. The range is 5 to 408 and the default is 15. LANMAN.INI (Workstation Section) -------------------------------- These parameters are specified in the LANMAN.INI file in the section starting with [workstation]. The LANMAN.INI file can generally be found in the C:\3OPEN\SERVER\LANMAN subdirectory for servers and the C:\3OPEN\OS2WKSTA\LANMAN subdirectory for netstations. The descriptions, ranges, sizes and defaults given here are for 3+Open LAN Manager version 1.0. These parameters will only affect the performance of OS/2 netstations, though they will occupy memory on an OS/2 server. Additional information can be found in the 3+Open Network System Guide. MAXWRKCACHE=n This sets the size in K bytes of the buffer used for large network transfers (such as file copies and program loads). Increasing this number may improve performance for file-intensive operations such as copying large files. The range is 0 to 640 and the default is 64. NUMWORKBUF=n This sets the number of buffers used for files open on network drives. At most one buffer is used per file open on a network drive. Performance may be improved by increasing this parameter if large numbers of network files are often in use at the same time. The range is 1 to 255 and the default is 16. These buffers are roughly equivalent for network files to the buffers specified by the BUFFERS command in CONFIG.SYS for local disks. SIZWORKBUF=n This sets the size in bytes of the buffers used for open files on network drives. Generally, increasing this parameter will improve performance if the network files are accessed in a forward sequential fashion or in highly localized areas. The range is 1024 to 16384 and the default is 4096. The size must be a multiple of 512 bytes. SIZCHARBUF=n This sets the size in bytes of the buffers used for redirected character devices (such as network printers) and pipes. Generally, increasing this parameter will improve performance for shared communication devices. The range is 64 to 4096 and the default is 512 bytes. NUMCHARBUF=n This sets the number of buffers used for redirected character devices and pipes. Depending upon the device, more than one buffer may improve performance. The range is 0 to 15 and the default is 5. PROTOCOL.INI (NBP) ------------------ These parameters are stored in the PROTOCOL.INI file in the NBP section. The PROTOCOL.INI file can generally be found in the C:\3OPEN\SERVER\LANMAN\DRIVERS subdirectory for servers and the C:\3OPEN\OS2WKSTA\LANMAN\DRIVERS subdirectory for netstations. The descriptions, ranges and defaults are for NBP version 1.1. DEFAULTS=class This specifies that default values for a particular class of netstations should be set up. This has the same effect as setting values for SESSIONS, COMMANDS, RXBUFSIZE, and other keywords. The assignments take effect when the DEFAULTS line is parsed, so they will override any previous lines, and will in turn be overridden by any following. The four most likely OS/2 classes are: USER, POWER-USER, SERVER and POWER-SERVER. For example: defaults = power-server The defaults for each class are: +----------- Class ------------+ USER POWER- SERVER POWER- USER SERVER --------------------------------------------- SESSIONS 6 16 64 128 COMMANDS 12 32 96 192 RXBUFSIZE 1488 4464 16384 32768 MEMORY USED DOS BOX 256 256 256 256 OS/2 HIGH 25K 32K 59K 98K This parameter is optional. USER is assumed. The defaults for each class should be appropriate for most users, but you can set parameters individually if you wish. POWER-USER allows more connections and may have better performance than USER in certain tests. SERVER is a good choice for a general purpose server. POWER-SERVER can be used if more sessions are needed or to improve performance over SERVER. NBP loads most of itself into high (or protect mode) memory--only 256 bytes of the DOS box (or real mode) memory will be consumed. COMMANDS=n This specifies the maximum number of Network Control Blocks (NCBs) that may be outstanding to NBP at any given time. An NCB is associated with each request the NetBIOS application (e.g., LAN Manager) makes to the NBP driver. The default is 12. The valid range is 0 to 255. If set to zero, the default is assumed. For example: commands = 42 Each command consumes 52 bytes. SESSIONS=n This specifies the maximum number of simultaneous NetBIOS sessions that can be established with this station. A session is a two-way conversation between one station and another. LAN Manager establishes a single session for all network file system access from a netstation to a server. Additional sessions may be used by other NetBIOS applications. This parameter defaults to 6, which is usually sufficient for a netstation. The valid range is 0 to 254. If set to zero, the default is assumed. For example: sessions = 42 This parameter may need to be increased if the message: The network BIOS session limit was exceeded is displayed by the redirector or if a NetBIOS application displays a similar message which implies that more network sessions are needed. Each session consumes 162 bytes. RXBUFSIZE=n This specifies the size in bytes of the receive packet buffer cache. The receive cache is used to hold packets that are received out of sequence or before a Receive request is posted. The cache is also used to hold packets which are being transferred by multiple receive requests. The default value is 1488. The valid range is 512 to 65440. This parameter affects the performance of heavily loaded stations and servers. For example: rxbufsize = 4242 Since NBP will not use a packet size larger than the receive cache, it may be desirable to increase this parameter to 2008 or larger for token ring networks (2008 is the maximum allowed by the original IBM Token Ring Adapters after accounting for overhead). The value of 4464 is known to work well in 16 Mb token ring adapters. Generally, servers should set this parameter somewhat larger (the default for class SERVER is 16384), since it can improve performance substantially if multiple client sessions are active simultaneously. Tuning the DOS Box Memory ========================= Enabling the support of DOS 3.x applications under OS/2 requires the use of the PROTECTONLY and RMSIZE commands in the CONFIG.SYS file. Setting PROTECTONLY=NO enables the DOS 3.x box. Setting RMSIZE then determines how much memory to reserve for that DOS box. Generally, RMSIZE should be set to at least 512, and often 640 will be necessary to run some of the latest memory-hungry versions of some applications Desktop publishing and database programs generally require a full 640K of memory. Conversely, if no DOS 3.x application support is required, setting PROTECTONLY=YES can reduce the amount of memory required to run OS/2 and/or make more memory available to OS/2 for the network or applications. The DOS box starts out with somewhat less available memory than DOS 3.30 but it has certain advantages. Many of the OS/2 services load into high (or protect mode) memory and do not affect the amount of memory available in the DOS box--for example the DISKCACHE parameter can be set without impacting the memory in the DOS box at all. NBP has been designed to load almost entirely into high memory. Only about 256 bytes of DOS box memory is used. Since this is independent of the NBP configuration parameters, the tuning of NBP parameters is much less critical than under DOS. For example, the USER and POWER-USER configurations differ by approximately 7K. Under DOS, that 7K might determine whether you can run a particular application. Under OS/2, it will likely not be missed. Therefore, tuning OS/2 machines can be much less conservative than tuning DOS machines. If the amount of memory available in the DOS box is important, there are a few things that can be done to increase the available memory (beyond setting RMSIZE=640). The OS/2 and 3+Open installations include various DEVICE= commands in the CONFIG.SYS file which may not be necessary in a particular installation. Following are some example lines (yours may look slightly different), what the device driver is used for, and how much DOS box memory the device consumes. DISKCACHE, BUFFERS, and VDISK do not consume any DOS box memory. DEVICE=C:\OS2\DEV\MOUSEAxx.SYS DEVICE=C:\OS2\DEV\POINTDD.SYS These two drivers are needed for mouse support. The first statement may reference MOUSEA00.SYS through MOUSEA04.SYS depending on the kind of mouse installed on your system. These drivers together consume about 22K. DEVICE=C:\OS2\DEV\COMxx.SYS This device driver supports the serial ports on your system, used to hook up a modem, mouse or perhaps a serial printer. This single driver supports multiple serial ports. The drivers include COM01.SYS for AT compatible machines and COM02.SYS for PS/2 machines. This driver consumes about 5K. DEVICE=C:\OS2\DEV\EGA.SYS This device driver is needed if EGA graphics will be displayed on an EGA video adapter in the DOS box. It allows the screen to be properly saved and restored when you switch away from a DOS box application in EGA graphics mode. The driver is not necessary for VGA adapters. This driver consumes about 2K. DEVICE=C:\OS2\DEV\ANSI.SYS This device driver supports ANSI escape sequences in the DOS box. ANSI support is automatic in the OS/2 sessions. This driver consumes about 2K. DEVICE=C:\3OPEN\SERVER\LANMAN\NETPROG\NAMPIPE.SYS /I:C:\3OPEN\SERVER\LANMAN [The above must be on a single line in the actual CONFIG.SYS file.] This device driver supports named pipes, a method of transferring data over the network that may be used by OS/2 network-aware applications. This driver consumes about 9K. Tuning Adapter Performance ========================== It is impossible to provide specific guidelines here for all of the possible adapters that might be used on a 3+Open server. However, a few specific observations can be made. Refer to the 3+Open System Guide or your network adapter documentation for further details. All of the 3Com MAC drivers support a keyword called MAXTRANSMITS. This keyword, given in that driver's section in PROTOCOL.INI, specifies the number of transmit requests the MAC driver can queue internally. For netstations, the default value (usually around 8) is generally sufficient. However, increasing this parameter will generally improve server performance. For NBP, the optimal value of this parameter can be determined by the following calculation: Effective Adapter Bandwidth --------------------------- + 1 2 X Maximum Frame Size The Effective Adapter Bandwidth is the rate at which this adapter can transmit full-size packets, in bits per second. The Maximum Frame Size is the maximum size packet, in bytes, which may be transmitted by this adapter (e.g., 1514 for Ethernet). This parameter will be set for you automatically by the 3+Open installation software for any 3Com adapters. For other vendors, refer to your vendor for information. The range for MAXTRANSMITS is generally 2 to 50. Setting MAXTRANSMITS much larger than the value computed above may degrade performance. The 3Com Etherlink II (3C503) adapter will generally run 10-15% faster when configured for shared memory rather than I/O mapped operation when using NBP. Tuning Server Performance ========================= This section provides some general guidelines for tuning 3+Open server performance using NBP. Although there are many parameters, a small subset accomplish most of the work in performance tuning. See the 3+Open Network System Guide for more details. In general, the more memory available to the server, the better. A reasonable starting value would be 4 megabytes, though you may be able to start a 3+Open server with less. If more memory is not available, disabling the DOS box (see "Tuning the DOS Box Memory" earlier in this document) can provide more memory to the server. A reasonable starting value for NUMFILETASKS is 5. If the server is particularly fast (a 20 MHz CPU or better), increasing this value may improve performance if the server is often used by many clients simultaneously. A good starting value for NUMREQBUF is 50. If the server is particularly fast and often heavily used, increasing this value may improve performance. The two most critical parameters for tuning 3+Open server performance are the DISKCACHE and NUMBIGBUF parameters. DISKCACHE determines the size of the cache used to buffer hard disk I/O. The OS/2 installation program will often set this quite low (often 64K), when in fact a 3+Open server will perform much better under load with a cache of at least 1 megabyte in size. NUMBIGBUF determines the number of large buffers the server will use for large network transfers (such as file copies and program loads). Generally, a 3+Open network server will operate best if there are 2 or 3 big buffers allocated per active client. Since each buffer is approximately 64K in size, this may not be achievable with limited memory if the server is heavily used. Generally, there is little point in setting NUMBIGBUF to more than 2 or 3 times the number of active users. If NUMBIGBUF is constrained by the amount of memory available on the server, a reasonable guideline is to allocate twice as much memory to DISKCACHE as to NUMBIGBUF. This means that for each megabyte of memory available DISKCACHE can be increased by about 640 to 704 and NUMBIGBUF by 5 or 6. Some good starting values for a 4 megabyte machine with no DOS box are DISKCACHE=1024 and NUMBIGBUF=9. The DEFAULTS parameter defines the class of a machine to NBP and specifies the value of a set of NBP parameters. In general, most server machines need only set SERVER as the default. If large numbers of users (more than 50) will be accessing the server simultaneously, then the POWER-SERVER default should be used. RXBUFSIZE sets the amount of receive buffer cache in NBP. Generally, the SERVER or POWER-SERVER defaults will provide excellent performance. If a server is under constant heavy load from many netstations, increasing this value may improve performance. It should be noted here that the use of a RAM disk can help in certain cases. Memory can be set up as a RAM disk using the OS/2 supplied VDISK.SYS driver. Putting the most commonly referenced files (such as applications loaded over the network) on a shared RAM disk can speed network throughput substantially. Tuning OS/2 Netstation Performance =================================== This section provides some general guidelines for tuning a 3+Open client netstation running OS/2. See the 3+Open Network System Guide for more details. The DEFAULTS parameter defines the class of a machine to NBP and specifies the value of a set of NBP parameters. In general, most OS/2 client-only machines should use POWER-USER. The difference in memory consumption from USER to POWER-USER is usually not noticed under OS/2. RXBUFSIZE sets the amount of receive buffer cache in NBP. In general, increasing RXBUFSIZE to at least the maximum framesize which the local network adapter can handle (minus overhead) is more important than any other tuning parameter for large file data movement (such as program loads, files copies, etc.). For Ethernet this value is 1488 bytes, and for most 4 Mb token ring cards this value is 2008 bytes. For 3Com TokenLink and the IBM 16/4 token ring adapters the value of 4464 bytes has been found to work very well. Increasing the value past the maximum framesize can continue to improve performance particularly with the faster media types (Ethernet and 16 Megabit Token Ring). On OS/2 clients, unless multiple sessions to multiple servers are used simultaneously, the point of diminishing returns is usually reached at around 4464 for all media types. Examples ======== A 4 Megabyte Server ------------------- A Compaq 386/20 with 4 megabytes of memory using a 3Com Etherlink II adapter is to be configured as a 3+Open server with the NetBIOS Protocol. The 3+Open installation process has been completed. This server will service approximately 15 users. No DOS applications will be run on the server. For improved performance, the following files should be modified to contain the following information: CONFIG.SYS | PROTOCOL.INI | LANMAN.INI | | . | . | . . | . | . . | . | . DISKCACHE = 1024 | [NBP] | NUMFILETASKS = 5 PROTECTONLY = YES | DEFAULTS = SERVER | NUMREQBUFS = 50 . | . | NUMBIGBUFS = 9 . | . | . . | . | . . | . | . | | A 6 Megabyte Server ------------------- An IBM PS/2 Model 70-A21 (25 MHz) with 6 megabytes of memory using a 3Com Etherlink/MC adapter is to be configured as a 3+Open server with the NetBIOS Protocol. The 3+Open installation process has been completed. This server will service approximately 40 users. No DOS applications will be run on the server. For improved performance, the following files should be modified to contain the following information: CONFIG.SYS | PROTOCOL.INI | LANMAN.INI | | . | . | . . | . | . . | . | . DISKCACHE = 2048 | [NBP] | NUMFILETASKS = 8 PROTECTONLY = YES | DEFAULTS = SERVER | NUMREQBUFS = 100 . | . | NUMBIGBUFS = 18 . | . | . . | . | . . | . | . | |