

              NOVELL TECHNICAL INFORMATION DOCUMENT

TITLE:              Configuring NWCACHE
DOCUMENT ID:        014926
DOCUMENT REVISION:  A
DATE:               27FEB94
ALERT STATUS:       Yellow
INFORMATION TYPE:   Issue
README FOR:         NA

NOVELL PRODUCT and VERSION:
Novell DOS 7

ABSTRACT:

NWCACHE is a disk cache with many different configuration options
available.  This document discusses some of the configuration
options available for NWCACHE.

------------------------------------------------------------------
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 as possible 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 Lookahead 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 lookahead 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.

     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 files after any lines
     that load memory device drivers or network device drivers. 
     Do not load DBLBUF.SYS high.

     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.


     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.
