TITLE: Configuring NWCACHE DOCUMENT ID: TID14926 DOCUMENT REVISION: 2 DATE: 27APR94 ALERT STATUS: Yellow README FOR: NA NOVELL PRODUCT and VERSION: Novell DOS 7 ABSTRACT: NA --------------------------------------------------------------------- DISCLAIMER: THE ORIGIN OF THIS INFORMATION MAY BE INTERNAL OR EXTERNAL TO NOVELL. NOVELL MAKES EVERY EFFORT WITHIN ITS MEANS TO VERIFY THIS INFORMATION. HOWEVER, THE INFORMATION PROVIDED IN THIS DOCUMENT IS FOR YOUR INFORMATION ONLY. NOVELL MAKES NO EXPLICIT OR IMPLIED CLAIMS TO THE VALIDITY OF THIS INFORMATION. --------------------------------------------------------------------- ISSUE: NWCACHE loads with parameters specifying the maximum cache size, the minimum cache size, whether memory lending is enabled, and whether write delays are enabled. These and other parameters can be specified when NWCACHE is loaded; NWCACHE /? will show the possible values. If no values are specified, NWCACHE will determine the type and amount of memory available on your system and load with the appropriate values. By default, write delays will be set to off. If the necessary memory is available, memory lending will be set on, and the maximum and minimum cache size will differ by the amount of memory that NWCACHE can lend. SIZE OF CACHE Using the DPMS specification, NWCACHE moves a portion of its code into extended memory. It also automatically attempts to put some code in upper memory. Therefore, you do not need to use HILOAD or HIINSTALL when loading NWCACHE. The NWCACHE code "footprint" is 5 KB (10 KB if DPMS is not used), and the look-ahead buffer typically requires 4 to 16 KB. If you are using expanded memory (EMS) for the cache buffer, use the /BE switch if you wish to minimize the effect of NWCACHE on your conventional and upper memory. This switch locates the look-ahead buffer into EMS memory. If you are using extended memory (XMS), load DPMS.EXE before NWCACHE and use the /MLX or /MUX (default) switch when loading the cache program. The memory optimization described above for EMS and XMS will not necessarily yield the most efficient (fastest) cache configuration for every system, so you will need to experiment to see what works best on your system. The maximum allowable size for the NWCACHE buffer is 7 MB. If you specify a cache buffer greater than 7 MB, only 7 MB will be allocated to NWCACHE. USING NWCACHE AND WINDOWS 3.1 Disk caching with NWCACHE is recommended for improved performance with Windows. NWCACHE needs to be loaded before starting Windows, DesqView /X, or any other multitasking software. While Windows is active, diskette drives are temporarily switched from buffered write to write-through mode. Although, NWCACHE attempts by default to use all available extended memory (up to 7 MB), it lends back memory to applications, as requested. The amount of memory that NWCache can lend to an application is determined by the difference between the maximum size of the cache and the minimum size of the cache, as allocated when NWCache is loaded. For example, if the maximum cache size is set to 4096 and the minimum cache size is set to 1024, the amount of memory available for lending to other applications is 4096 to 1024, which equals 3072 KB or 3 MB. Windows is unique in that it allocates all extended memory when it is loaded. Other applications use varying amounts of extended memory as they need it. Windows needs 2 MB or more of memory to run efficiently in enhanced mode. If your system has less than 4 MB of memory, you need to force NWCACHE to lend at least 2 MB of extended memory back to Windows. To do so, set the minimum cache size to be at least 2048 KB smaller than the maximum cache size, and set the /LEND switch to /LEND=ON. An example of this configuration would be to load NWCACHE with the following parameters: NWCACHE 3072 1024 /LEND=ON If you run several applications through Windows and run out of memory, you can increase the amount of memory that NWCACHE can lend by decreasing the minimum cache size. For example, to lend 4 MB of memory, make the minimum cache size 4096 KB smaller than the maximum cache size (and set the /LEND switch to ON). If your system has a lot of memory (8 MB or more) and you use Windows extensively, turn off lending completely and set a maximum size for the cache buffer, leaving ample memory free for Windows. For example, on a system with 10 MB total memory (9 MB extended), load NWCACHE with the following switches: NWCACHE 3072 1024 /LEND=OFF. This allocates 3 MB of memory to the cache, leaving 6 MB of extended memory untouched, so that Windows can have 6 MB for its own use. If you find that Windows is still running out of memory, enable lending (/LEND=ON). USING NWCACHE WITH NETWORKS NWCACHE can be used on a DOS network workstation or on a PERSONAL NetWare Server. Some disk caches that do delayed writes will cause hanging or corruption on a PERSONAL NetWare server; however, NWCACHE has been specifically designed to be aware of Novell's peer-to-peer server software. Load NWCACHE before any network is started. NWCACHE will not cache remote network drives (such as, drives across the network). If you are running NWCACHE on a system that runs peer-to-peer network server software OTHER THAN Novell's PERSONAL NetWare server, you should consult that network's documentation for information on running with a disk cache. GENERAL TIPS Do not use the Novell DOS VERIFY=ON command when using a network, as it will negate any gain from caching. In AUTOEXEC.BAT, set VERIFY= to VERIFY=OFF. When using NWCACHE, set the FASTOPEN command in the CONFIG.SYS file to FASTOPEN=0. A BUFFERS setting of 4 (BUFFERS=4) in the CONFIG.SYS file is adequate. NWCACHE should be loaded early in the AUTOEXEC.BAT file before the network is loaded. Any TSRs loaded after NWCACHE must be unloaded from memory before NWCACHE can be unloaded (with the /Q or /U switch). TROUBLESHOOTING NWCACHE As is the case with any software cache, NWCACHE should not be run concurrently with other disk caches. If NWCACHE is enabled, verify that no other disk cache is running. If the factors listed here have been eliminated and NWCACHE does not function, adjusting the parameters used when loading NWCACHE is probably necessary. Begin with the simplest settings. For example: NWCACHE /LEND=OFF /DELAY=OFF If an application seems to need more memory, increase the amount of memory that NWCACHE can lend to applications. This can be done by setting /LEND to /LEND=ON, and decreasing the minimum cache size. If it appears that NWCACHE is the cause of an upper memory conflict, use the NWCACHE /L, /ML, and /BL switches to force all parts of NWCACHE into conventional memory for testing purposes. If you are experiencing problems reading a drive or if you are getting data corruption, try disabling delayed writes. This is done by placing /DELAY=OFF on the NWCACHE command line. Alternatively, you can use /x:- switch (where x is the drive letter), to disable caching on that drive. If your drive controller or adapter has a built in disk cache, you should consult its documentation or technical support for information on using software disk caches. Most likely, you will not benefit from NWCACHE. In any case, if you run NWCACHE, you should disable the controller's cache. However, you will get better use of memory if you allow the controller to cache the drive; you will be able to use your extended or expanded memory for other purposes. Some SCSI drives may require that your cache supports double buffering of disk transfers. To enable this, load the DBLBUF.SYS driver in the CONFIG.SYS file. The DBLBUF.SYS driver will require 2 KB of conventional memory, and it needs to be loaded in the CONFIG.SYS file after any lines that load memory device drivers or network device drivers. Do not load DBLBUF.SYS high. The following information was taken from a technical discussion of some situations when double buffering might be needed. Our technical support department has no clarification for the information presented below. Keep in mind that this information has NOT been verified by Novell: Only some older SCSI controllers that do not use the Virtual DMA services require DBLBUF.SYS to be loaded before NWCACHE; newer SCSI controllers are safe. Multimaster disk controllers and hard disks that use DMA for disk transfers, such as PS/2, might also require double buffering. INSTALL does not test the system for such controllers. NWCACHE will do a simple test by reading one sector both into upper and conventional memory and will refuse to load if any differences in data read were found, but this may not yield conclusive results. The general advice would be: if NWCACHE displays the message that DBLBUF.SYS is required, load DBLBUF.SYS at the beginning of CONFIG.SYS (before or after EMM386.EXE). Otherwise, load DBLBUF.SYS if you experience problems reading/writing to the disk. It would be wise to do a CHKDSK or similar read-only operation that cannot trash the disk before you find out that double buffering is required. If NWCACHE is not loaded into upper memory (/ML[X] and /BL), double buffering will not be required. If using MS Windows or TASKMGR, however, double buffering might be required even if the cache is loaded low or not loaded at all. Previously, there was a "safe-but-slow" setting for disk deblocking in IBMBIO.COM. This has been changed to a "fast-but-dangerous" setting (as used by MS DOS). The old default value at which IBMBIO started single sector deblocking was A000 (that is, 640 KB). This had a speed penalty for things loaded into upper memory (such as STACKER, SERVER). You could always say DEBLOCK=FFFF in CONFIG.SYS. The new default value is FFFF, so you get the higher performance. The down side is you may get disk corruption. Be especially wary of multi-master disk controllers, hard disks that use DMA (PS/2's mostly), and anything to do with floppy transfer. You may have drivers supplied with the card (such as ASPI4DOS.SYS); if so, use them. You can also use the double buffering driver supplied with NWCACHE, or add DEBLOCK=A000 in CONFIG.SYS. SUMMARY This document covered some of the configuration options for use of NWCache. Step-by-step information can be found in the NWCache HotStart. Further information can be found in the Novell DOS 7 User Guide, in DOSBOOK, and in the Novell ASK Information System. --------------------------------------------------------------------- Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information. ---------------------------------------------------------------------