Artisoft Technical Bulletin Updated: 10.26.93 RRR LANtastic Performance NOS 4.0 and Higher Page 1 of 9 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The following information is based on in-house testing of LANtastic. If you are not a registered LANtastic owner, your questions should be directed to our technical sales staff at 800-TINY-RAM Any questions or comments on this bulletin may be forwarded by FAX (602) 884-8665 or mailed to: Artisoft Inc. 2202 North Forbes Boulevard Tucson, AZ 85745 ATTN: Technical Support. GENERAL HINTS AND TIPS - INCREASING PERFORMANCE OF LANTASTIC NETWORKS "What can I do to speed up my LAN?" A very common question, and one to which there is unfortunately, no cut and dried answer. Network performance depends on many things. Getting the best performance out of your particular installation may require a little experimentation. This bulletin presents a discussion of some of the major factors that affect performance, and a few general suggestions for improvement. Choosing your Hardware When you're choosing the hardware for your LAN, keep in mind that the things that make a fast computer are also the basic ingredients of a fast network. A fast processor, fast memory and a fast disk drive all help to provide better network speed. For best performance, you should choose fast, well balanced components. The two biggest factors are CPU speed and hard disk speed. It's fairly easy to find fast computers and fast disk drives out there in the marketplace, but for the best results make sure that the components you buy are well matched. If you install a high performance disk drive in a 4.77 Mhz XT, your network will be slow because the computer's CPU won't be able to move data around fast enough to keep up with the drive, let alone the rest of the network. Similarly, if you install an old 20mb MFM drive in your 386-33, the fast processor will spend a lot of time waiting around for the old drive, as will the rest of your network users. The transmission speed of the adapter cards you choose will also make a difference. With reasonably fast machines, upgrading from a LANtastic 2mbps adapter to a new Artisoft Ethernet adapter can approximately double the throughput of the network. Again, balance is vital. If you have a slow processor, switching to Ethernet may not make much difference -- the 2mbps adapter has a co-processor that handles all the low level NetBIOS processing, whereas the Ethernet adapter relies on the computer to handle everything. Optimizing Software Performance Now that we've dealt with hardware selection; let's see what can be done to improve the performance of existing installations. First, let's tie down what we mean by the "speed" of the LAN. There are really two things at issue here, the physical transmission speed of the hardware, and the effective throughput, or how fast data gets from one place to another on the LAN. Assuming for now that the hardware is fixed and immutable, here are some suggestions for getting the best throughput with your particular application. Optimizing Network Configuration There are two major configurations of the network that will greatly benefit overall network performance. The first is simply using LANtastic's ability to have more than one server on the network. Splitting up network tasks so that different programs are run on separate servers will decrease the load on each individual server, this will improve the servers response (and on a non dedicated server improve the performance of the computer for the person sitting at the keyboard). Another way to distribute the network processing is by putting applications on each node's hard drive [disk space permitting] and sharing data files from servers. This naturally decreases network traffic because the program is local. The next is setting up a dedicated server (while LANtastic is a Peer to Peer network - Artisoft considers a dedicated server to be only a special case of peer to peer networking). A dedicated server can be specifically tuned to optimize the performance of the Network portion of the computer at the detriment of the Workstation (keyboard) portion of the computer. This is done by using the RUN_BURST command line switch (on AILANBIO with versions of LANtastic prior to 4.1, on both AILANBIO and SERVER with version 4.1 and greater). This switch controls the amount of time that the program (either netbios or server) devotes to processing network tasks. The higher the value the longer amount of time allocated. Since both REDIR and SERVER release control if there are no tasks waiting neither switch will conflict with the other. Setting these switches to the max 254 will give optimum performance for a dedicated server. With NOS 5.0 you can also set RUN_BURST on SERVER. This can be done from the command line or from NET_MGR under Server Startup Parameters. If this is a dedicated print server - do not set the server RUN_BURST higher than 128. In a dedicated server, memory no longer is a major consideration so large size for the servers caching and buffers should be experimented with. See server buffering below. Another command that is useful for a dedicated server is the ALONE command included with v4.0 and higher. When the server program is used to access a resource on the server, it first swaps out all the DOS stacks and control memory. It does this so a foreground task can coexist with the server running in the background. On a dedicated server Alone tells the server that there will NEVER be a program running on this machine in the foreground using DOS and so server saves time by NOT swapping into and out of DOS. This means that you cannot run TSR (Terminate and Stay Resident program) on this dedicated server that will use dos calls. General Improvements FASTOPEN Running the DOS FASTOPEN command will improve network speed considerably (except with MSDOS 5.0 because of a reported problem in this version's FASTOPEN). FASTOPEN stores the location on the hard disk of each previously opened file to make repeated access to this file much faster. SEEK CACHE LANtastic 4.1 contains a new cache built into the server program, SEEK CACHE. SEEK CACHE caches each users position within open random access files. Typically a seek cache will significantly affect performance of random access file operations if: 1> Files being accessed are relatively large. 2> The files are kept open and accessed frequently. For these conditions, even a small cache will be helpful, and the larger the cache, the more improvement will be realized. No publicly available benchmarks have been performed, but we have seen throughput improvements as high as 25%. You can compute the optimum size for this cache with the following formula: Add the size of any large frequently used database files (in bytes) and divide this by your hard drives cluster size (normally 4096) This gives the number of clusters used. Each cluster used requires 32 bytes, Each open file requires 32 bytes. Maximum performance is achieved when the cache size is >=32*(number of clusters used + number of files.) RESOURCE CACHE When a user on LANtastic accesses a resource, LANtastic has to check the resources Access Control List (ACL) to see what permissions the user has. This requires loading the resource information from the hard disk and checking it. To improve performance with LANtastic NOS 4.1 and above resource caching can be enabled on a server. This means that as each resource (disk or printer) is accessed its access information is stored in a permanent cache in the server. There should be one cache specified for each commonly used resource. If a server has several resource but only a few are normally accessed the cache number can be set to the number of commonly used resources +1, the caches are flushed and used on a least frequently accessed algorithm so system performance will be only slightly affected. INDIRECT FILE ACL's Indirect files will greatly effect network performance, with LANtastic NOS 3.0x eliminate the I from each disk resources Access Control List. With NOS 4.xx and higher the I ACL has already been eliminated. With the I ACL in place, each time a file is opened the NOS checks to see if the file is an indirect file. If you are not using indirect files eliminating this ACL will save time when a file is opened. SERVER AUDITING Indirectly, server auditing can also have a great effect on network performance. If auditing is enabled and the audit files are not cleared on a regular basis this file can grow very large. This by itself is not a problem; but since auditing requires that an entry be made to this file every time an audited function is used, the time spent seeking to the end of this file will increase as the file size increases. SEND SERVER ID You can reduce the load on heavily used networks by disabling the Send Server ID selection in NET_MGR, Server Startup Parameters. With this selection enabled the server sends out a message once every retry period (55ms x RETRY_PERIOD setting). This message is informs others on the network that the machine is a server. If your system is using batch files this message is not needed. If the server name is known, it can be logged into even if the server has had SEND SERVER ID disabled. DISK CACHING Adding a disk cache to the server also helps performance in almost all situations. Disk caching programs work by storing frequently requested information in memory. This reduces the number of physical accesses to the disk. Since accessing memory is almost always faster than accessing the disk drive, caching can greatly improve the disk performance of your network. The LANtastic disk caching program; LANcache, is specifically designed to work with LANtastic networks. It caches disk writes as well as disk reads and when it actually does have to write to the disk, it does so as a background operation so that CPU operations can continue. Choosing the Best Buffer Settings Beyond these general changes, getting the best performance out of your specific application is a matter of fine tuning several parameters. LANtastic has four sets of buffers, each of which can affect performance in specific situations. REDIR Buffers It takes the network about the same amount of time to send 1 byte of data as it does to send 256 bytes of data. Every packet sent over the network takes time to construct and time to process. Given this, it makes sense to include as much data as possible in each packet -- it keeps the network overhead impact to a minimum and reduces network traffic. The REDIR program accomplishes this by buffering network requests at each machine. Here's an example of REDIR's buffering in action: You are creating a file of customer names on the server and adding data to it. You type in the names one at a time and your program writes the names to the data file one at a time. Rather than issue a network send for each name, the data gets stored in the local REDIR buffer until you close the file or fill the buffer. At that point, REDIR issues a single request to send the entire buffer. REDIR buffers read requests similarly. If you request an amount of data smaller than the REDIR buffer, REDIR requests one buffer full of data from the server. Then, if you request the next sequential piece of data, REDIR can supply it to your program without even making a network request. REDIR buffers are only used for small (small means smaller than the REDIR buffer size) sequential reads or writes to files that are NOT opened in the sharable mode. If you read or write blocks of data larger than the REDIR buffer, the network software bypasses it and moves data directly from the applications buffer directly to the NetBIOS. The ideal REDIR buffer size then, would be about the average size of the packets that your network typically sends and receives. You can set the size of the REDIR buffers with the SIZE= command line switch. The number of REDIR buffers can also affect the performance of many applications. If you allocate multiple REDIR buffers using the BUFFERS= command line switch, the network tries to associate each file opened in the non sharable mode. Network printers are handled just like other files. Ideally, you should have a buffer available for each open non sharable network file. If you have more files than available buffers, the network flushes the least recently used buffer and assigns into the new request. WordPerfect is a good example of a program that is affected by the number of buffers. If you have only one buffer allocated, printing can be very slow because WP has to read the document and send data to the printer with the same buffer. The buffer gets continually filled and flushed, back and forth, with printer data and document data. In this situation, allocating just one more buffer allows WP to use one buffer for document reading and another for printing. Server Buffers and Tasks A server buffer is at the other end of a REDIR buffer. When, for example, a workstation makes a read request, the server reads one server buffer full of data, beginning with the information requested. If the workstation then asks for the next piece of the same information, the server can get it from the buffer instead of physically reading the hard disk. The server buffer size can be changed from the Server Startup Parameters option in the NET_MGR program. Be aware that bigger isn't necessarily better -- as with REDIR buffers, the optimal size is somewhere around the average size of the packets that will be transferred across the network by your application. One server buffer of whatever size you select is allocated for each network task. Large network buffers will greatly effect the speed when moving large amounts of sequential data across the network. Loading programs, using a word processor, and using a cad program are all examples of the type of applications and use that can benefit from large server buffers. When a workstation submits a request to a server, the server will work on the request until the task is finished, or the timeslice allocated to the server is over. If the server is set up with only one network task, instead of switching, the server will run the request to completion and other incoming tasks will be queued up behind it. If server tasks are higher, the server can process several tasks in one active period. One task can actually be buffered in the server while another in being processed.If you're a using network adapter with a co-processor, like our Enhanced 2mbps adapter, increasing the number of network tasks (with the Server Startup Parameters option of NET_MGR) will give you a big performance boost. While the co-processor is busy working on one task, the server's CPU can work on another. This advantage is multiplied if you have more than one co-processor equipped adapter in a server. In fact, with three or four 2mbps boards in a dedicated server and a corresponding number of network tasks, you can achieve a continuous throughput comparable to that of an Ethernet network with an equal number of stations. As a plus, you've got built-in redundancy -- the workstations connected to each adapter will function as separate networks. If one segment fails because of cabling or adapter problems, the rest will still operate. SERVER REQUEST SIZE With NOS 4.xx and higher a new parameter has been added to change the size of the server request buffer. The REQUEST_SIZE= is set to 14 bytes by default. If a request from a workstation is smaller than this buffer, the server will be able to act directly on this request. If the request is larger than the request buffer. it must be buffered by the SERVER's initial send buffer, and system overhead is increased. The value of 14 is chosen specifically for LANtastic. This 14 byte buffer is large enough to tell the server what type of operation and how many bytes the total operation will take. There are some natural breaks in the size of this buffer. The default will handle only the very smallest network tasks, lock, unlock, closing a file, etc. At 60-70 bytes most network activity except reads and writes are processed without additional buffering, and from 600-2048 small reads and writes are processed without additional server buffering. This parameter should NOT be set larger than the AILANBIO Initial Send Buffer. One request buffer is allocated for each user in MAX USERS (LOGINS= command line switch). LOCK HOLD TIME Artisoft has discovered that setting the lock hold time higher than 0 with LANtastic v4.1 can have an adverse effect on the time required to open a file. This parameter should be used cautiously, If your use of the network entails opening and closing a large number of files then this parameter should be set to a low value. If your use of the network involves accessing a large common data file, then increasing the value of this parameter will help performance. NetBIOS and Adapter Card Memory With LANtastic v4.xx and higher and ethernet cards, you can increase the netbios packet size. This can have an effect on the system speed when loading programs and performing large sequential reads and writes. Increasing the PACKET_SIZE beyond 1500 bytes moves the network out of IEEE802.3 standards and may cause problems if you are using third party IEEE devices like routers or bridges. With our AE-Series and NodeRunner adapters, there's an easy way to get a performance boost on heavily loaded networks. You can upgrade the adapter from its default 16K or 32K configuration to a full 64K of RAM. It is fairly easy to tell when this upgrade is needed. Start the network if after 10 minutes of use lancheck shows network resource exhausts, increasing the memory on the adapter will help network performance. Effects of Changing Buffer Sizes Keep in mind that on systems with only two or three stations, changing the buffer configuration may not have any measurable impact on speed. In any case, increasing the size and number of REDIR and SERVER buffers uses memory and can slow down programs running on the server. If your application performance is critical, consider setting up a dedicated server for your most used application programs and printers. Running Applications on the Server To get the best performance out of your network when you run applications on a server, you should always use the server as though it was a remote workstation: log in and access the application through network drives. Using the server locally, without logging in, places you in contention with the rest of the users and network performance can suffer. If you log in, the server will schedule you along with the rest of the network users and everyone will get good performance. This does NOT mean that you should issue NET USE commands that use a drive over itself, IE NET USE C: \\SERVER\C-DRIVE. This can cause problems. It is better to create a common network redirection ie NET USE G: \\SERVER\C-DRIVE and have ALL workstations even the server access the program off of G:. Increasing Print Speed One of the slowest things about printing to a network printer is spooling to the hard disk. With LANtastic NOS 3.0 and above you can easily increase the print spooling speed by spooling to a RAM disk. To change the spooler's location, use the Change Spool Location option of NET_MGR's Queue Maintenance function. You must be sure that the ramdisk is large enough to hold both the largest file printed and all print requests that may be submitted at one time. The spooler will exit with an error if there is not enough space available on this drive. NOTE: Mail is sent to the spool area also and may be lost if the server is rebooted without saving the *._SP files from the ramdrive. PRINTER BUFFERS As with REDIR and server buffers, increasing the size of your printer buffers can improve printing speed. If your server has more than one printer attached, increasing the number of printer tasks will allow it to print to more than one printer simultaneously. Artisoft has determined through testing that with some applications running on the server optimum printing is achieved with printer tasks set to 1 no matter how many printers are attached to the server. Notably these applications are Windows 3.x, Clipper 5.0, and Lotus products. If you notice slow printing when running one of these programs on a print server you can increase print speed by setting printer tasks to 1 and setting cps in the printer resource to 9600. ARTISOFT, Inc. makes no warranties as to the completeness or accuracy of this document. LANtastic is a registered trademark of ARTISOFT, Inc. Brand names and product names are trademarks or registered trademarks of their respective companies. Network Performance Issues