(Note: 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.)
TITLE: NLCache
DOCUMENT ID#: FYI.P.6121
DATE: 28Jan93
PRODUCT: NetWare Lite
PRODUCT VERSION: All versions
SUPERSEDES: FYI.P.6075
SYMPTOM: NA
ISSUE/PROBLEM
NLCache
NETWARE LITE CACHING BENEFITS
NetWare Lite Cache makes your computer run 3 to 6 times faster by reducing the time your computer spends waiting for the hard disk. Caching makes your computer run faster and your hard drive last longer.
WARNING
NetWare Lite Cache should not be used concurrently with another caching software. If you choose to use a different cache program instead of NLCache you must disable the cache's delayed writes, in NLCINST under Deferred write delay, together they may cause problems.
HOW NETWARE LITE CACHE WORKS
NetWare Lite Cache keeps copies of data read from the disk in a memory area called a cache. When a disk read is requested, NetWare Lite Cache checks to see if the data is already in the cache. If it is, NetWare Lite Cache delivers the data directly from the cache; if not, the disk read is performed and a copy of the data is put in the cache.
NetWare Lite Cache's LookAhead option adjusts the disk transfers to cache data even before you need it, by reading entire blocks of sectors for future use. LookAhead makes big improvements in disk throughput even with a small cache. When disk writes are requested, NetWare Lite Cache determines if the data is in the cache and if it has actually changed. If it hasn't changed,
(determined by checksum) NetWare Lite Cache doesn't rewrite data to the disk.
NetWare Lite Cache's optional delayed write feature speeds up disk operations even more by combining multiple disk writes into a single write. Also, NetWare Lite Cache can turn off the delayed write feature (in NLCINST) and function as a write-through cache.
If you have a power failure or reset the machine when using the delayed write feature, you may lose data because the data written to the cache in RAM is not written to the hard disk or floppy disk until the delayed write is complete. When using delayed write, always exit programs correctly.
The NetWare Lite NLCINST program helps you select the correct cache program for the type of memory your computer uses.
NLCACHEC is for computers with only conventional memory (memory up to 640 KB).
NLCACHEX is for computers with extended memory (memory above conventional, starting above 1024 KB).
NLCACHEM is for computers with expanded memory (special or paged memory which requires a device driver).
You can use only one disk caching program at a time. If your computer has both expanded memory and extended memory, use either NLCACHEX or NLCACHEM.
INSTALLING NETWARE LITE CACHE
The NetWare Lite Cache programs are copied to your hard drive when you initially install NetWare Lite. If you specify that you want to use the NetWare Lite cache during installation, the proper command will be automatically added to the STARTNET.BAT file--the file which loads the network into memory.
The INSTALL program recognizes the type of memory (conventional, expanded, extended) your computer has and how much memory is available. If your computer has 1 MB or more of free memory, the INSTALL program defaults the "Use NLCACHE and load it from STARTNET.BAT" option to YES. (This option is under STEP 2 "Preview changes to DOS startup files" ). If you want a cache, leave the option set to yes. A NetWare Lite Startup command line, which includes the applicable NetWare Lite Cache program name (NLCACHEC, NLCACHEX, or NLCACHEM) and a number equal to half of the free memory (for the cache), will be included in STARTNET.BAT. When STARTNET.BAT is run, the cache program loads using half of the free memory for the cache area. If you do not want a cache, change the option to no.
To create or modify the cache startup command line from the DOS prompt, type "NLCINST." The current cache startup command line (if any) will be displayed. Follow the instructions on the screen. You can stop modifying or creating the cache startup command line at any time by pressing <Esc> repeatedly until the DOS prompt appears. The new startup selections will take effect the next time you boot your computer.
INSTALLING AS A TSR
If you put the cache startup command in batch file like AUTOEXEC.BAT or STARTNET.BAT, or manually type it at the DOS prompt, NetWare Lite Cache will be loaded as a TSR. When NetWare Lite Cache is loaded as a TSR it can be unloaded by using the /Q option. If you put the cache startup command in CONFIG.SYS, NetWare Lite Cache is loaded as a device driver and cannot be unloaded with the /Q option.
INSTALLING AS A DEVICE DRIVER
You must use DOS 3.0 or higher to load the cache as a device driver. NetWare Lite Cache requires slightly less memory when it is loaded as a device driver than when it is loaded as a TSR. (DOS assigns TSRs a copy of the environment and a 128 byte control block. Device drivers do not have a copy of the environment or the 128 byte control block).
Start NetWare Lite Cache as a device driver by putting one of the following commands in your CONFIG.SYS file:
KEY TERMS
[path]
Directory where the NetWare Lite Cache programs are located.
[size]
Amount of memory (specify kilobytes) you want to allocate to
the cache. If you don't specify a value, NetWare Lite Cache uses all free memory for the cache.
[start]
Starting address in extended memory for the cache. Extended memory addresses begin above 1024KB. If you don't specify a starting address, NetWare Lite Cache uses the first available memory area. This is the best choice for most installations it allows NetWare Lite Cache to put the control tables into extended memory. However, you may specify a specific address for NetWare Cache to use.
[options]
One or more startup command options. See the "Cache Startup Commands" section of this document. If you put the cache startup command in your CONFIG.SYS file, NetWare Lite Cache loads as a device driver each time you boot your computer.
(remember, as a device driver it can not be unloaded with the /Q option)
All other control options work as described in the "Netware Lite Cache Control" section of this document. To Manually Create or Modify the Cache Startup Command as a TSR start NetWare Lite Cache program by entering the cache startup command line at the DOS prompt or by including it in either AUTOEXEC.BAT or STARTNET.BAT.
Example: DEVICE=C:\NWLITE\NLCACHEX.EXE 2048 D000 /T=5 (The cache size would be 2048 KB, the starting address would be D000, and the maximum write delay would be 5 seconds.)
(The cache size would be 1024 KB, the starting address would be D000, and the maximum write delay would be 2 seconds.)
Expanded Format: NLCACHEM [size] [options]
Example: NLCACHEM 512 /T=2
(The cache size would be 512 KB and the maximum write delay would be turned off so the cache becomes a write-through cache.)
CACHE STARTUP COMMANDS
/A= Sector Chain Limit
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Suppresses caching of read/write requests larger than the limit value. The limit value range is from 1 to 128 sectors (128 sectors is the maximum number of sectors DOS allows).
Use to tune the cache for unusual cases where programs are effectively flushing your cache by doing large reads. If you select a sector limit value less than the maximum (128), large reads are not cached.
If this is not used, NetWare Lite Cache selects a best-fit limit value. For cache sizes smaller than 256 KB, a /A= value larger than the best fit value is ignored.
/B= LookAhead Buffer Size
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
The size of the LookAhead buffer (specify kilobytes). The LookAhead buffer requires that you allocate additional conventional memory to the size of the LookAhead buffer.
The LookAhead Buffer is used during sequential disk accesses to improve computer performance. NetWare Lite Cache continually monitors your disk activity and turns LookAhead on and off according to the type of reads being done. When you are performing sequential reads, NetWare Lite Cache reads large blocks of sectors into the LookAhead buffer. This saves time by anticipating future reads and combining them with reads that have already been requested.
The LookAhead buffer size can be from 0 to 16 KB. Consider a LookAhead buffer size of at least 9 KB. If you specify a LookAhead buffer of 0, both LookAhead buffer size (/B) and the deferred write capability (/T) are disabled.
/O Control Table Location
Use with NLCACHEX and NLCACHEM.
Directs NetWare Lite Cache to use cache memory instead of conventional memory for the cache control tables. This means that more of your conventional memory is available for other applications.
The /O option is suppressed if either the HMA (High Memory Area) beginning at address 1024 KB is not available or if the /R options used.
The /O option may reduce cache performance (speed) when used with abnormally slow add-on memory boards.
/P Place LookAhead in Expanded Memory
Use with NLCACHEM.
Uses expanded memory (instead of conventional memory) for the LookAhead buffer.
The /P option may reduce cache performance (speed) when used with abnormally slow add-on memory boards.
/R Disable A20 Latch
Use with NLCACHEX.
Disables the use of CPU latch A20. Use this option ONLY if you have compatibility problems or if your computer hangs for no apparent reason.
The /R option may be selected automatically in some computer configurations.
/S Assign Cache High
Use with NLCACHEX.
Places the cache memory at the top of the extended memory. This may be necessary if you are using programs which reallocate extended memory, such as Windows/386, AutoCAD, and Lotus 123 - release 3. If you use this option, NetWare Lite Cache ignores any starting address specification.
/T= Maximum Write Delay
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Specifies the maximum delay value for deferred disk writes. The delay value may be from 0 to 5 seconds. Write delay is disabled if you enter a delay value of 0 (/T=0) or if the LookAhead buffer is set to 0 (/B=0). If the maximum write delay value is 0 or if the LookAhead buffer value is 0, NetWare Lite Cache operates as a write-through cache.
The deferred write feature speeds up your computer in two ways:
1) It groups multiple small-write requests into fewer large-write requests.
2) It avoids repetitive writes to the same sectors. DOS spends a lot of time writing and rewriting the same File Attribute Table (FAT) sectors on your disk. When deferred writes are pending and a new write request is made for the same sectors, the new write data replaces older data so the physical write is performed once, with the most recent changes.
/U Non-conforming Partition
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Certain schemes for partitioning hard disks larger than 33 MB don't handle the disk BIOS interrupts correctly. If the disk BIOS interrupts are handled incorrectly, use the /U option.
The /U option is not required for normal DOS disk partitions. If this option is used, only the first 256 MB of each physical disk is cached.
/V Disable INT 19 Capture
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Disables normal INT 19 capture. It may solve problems with rare and unusual programs that use INT 19 in a non-standard manner.
/W Disable Duplicate Write Check
Use with NLCACHEX and NLCACHEM.
Suppresses duplicate write-checking that NetWare Lite Cache normally uses to avoid rewriting cached sectors that have not changed. The checking logic may produce false compares when used with abnormally slow add-on memory boards. If your computer stops when the cache is started, try using this option.
/X Disable Memory Diagnostic
Use with NLCACHEX and NLCACHEM.
When you start NetWare Lite Cache, it normally performs a brief memory diagnostic check. If you use this option, the memory check is skipped.
/Y Enable 8088/86 High Memory Transfers
Use with NLCACHEC and NLCACHEM.
Enables the caching of disk transfers to or from memory addresses above B000:0000 on 8088/8086 computers. If this option is not used when NLCACHEC is running, transfers are not cached due to the potential hardware DMA (Direct Memory Access) channel unreliability.
/Z Disable Snooze Alarm
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Disables NetWare Lite Cache's snooze alarm. The snooze alarm generates a low-pitched beep if NetWare Lite Cache is unable to find a safe time slot to complete a deferred write. The alarm sounds every 5 seconds until pending deferred writes are completed.
NETWARE LITE CACHE CONTROL
After NetWare Lite Cache is started, you can control its operation by executing a cache control command. The control command consists of the name of the caching program and a control option. For example, if you use NLCACHEX and want to get help on NetWare Lite Cache options, type:
NLCACHEX /HELP <Enter>
Cache Control Commands
/HELP
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Displays parameters and options that can be used in the cache startup command line and lists the cache control commands.
/Q Quit
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
If NetWare Lite Cache was started as a TSR from the DOS prompt or batch file, this option terminates the NetWare Lite Cache program and attempts to release all memory it was using. If other TSR programs were loaded after NetWare Lite Cache, NetWare Lite Cache's conventional memory may be locked. If this happens, you may be able to quit NetWare Lite Cache by unloading the TSR programs that were loaded after NetWare Lite Cache and trying the /Q command again.
If NetWare Lite Cache was started from your CONFIG.SYS file as a device driver, this option has no effect. Device drivers can't be removed from memory. The only way to take a device driver out of memory is to remove its "device=" statement from your CONFIG.SYS file and reboot your computer.
- Disable & Flush
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Flushes the cache buffers and disables the cache. When the cache is disabled, hard disk reads and writes are performed as if the cache was never loaded. The cache remains in memory and can be enabled with the "+" option.
+ Enable & Flush
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Flushes the cache buffers, resets the cache statistics to 0, and enables the cache if it was previously disabled with the "-"option.
? Status
Use with NLCACHEC, NLCACHEX, and NLCACHEM.
Displays cache status. The top portion of the status screen displays:
1) Cache size
2) Drives being cached
3) Current cache options
In some cases, NetWare Lite Cache may selectively enable certain options, even though these options were not specified on the cache startup command. If the cache has been disabled with the "-" option, the screen displays "cache is inactive." If "cache is inactive" is followed by an error code, a serious problem exists. An error code 99 indicates that some other program is writing into NetWare Lite Cache's control tables. Any other error code indicates a problem with your add-on memory.
The Disk Usage Statistics show:
1) Number of read requests that DOS made
2) Number of physical disk reads that were performed
3) Percentage of reads saved because the data was in the cache
4) Number of write requests that DOS made
5) Number of physical disk writes actually performed
6) Percentage of disk writes saved because they were duplicated writes or the data had not changed
The Error Statistics show:
1) Number of cache memory errors
2) Number of disk transfer errors
3) Number of errors ignored by the user
Memory Errors are tallied whenever an error is detected in your extended or expanded memory subsystem.
Disk errors are tallied whenever an error is reported by your disk drive subsystem.
Errors ignored by users are tallied when a disk error is detected while performing a deferred write and a user enters an ignore response at the "Retry or Ignore" prompt.
MEMORY REQUIREMENT
The resident conventional memory size required by NetWare Lite Cache is the
Note 1: LookAhead buffer size may be controlled with the /B= option.If the /P option is active (see "Cache Startup Commands"), the LookAhead buffer is placed in the EMS memory. No resident conventional (base) memory is required for the LookAhead Buffer.
Note 2: If the /O option is active, cache sizes up to 5.3 MB require no resident control table memory. If your cache size exceeds 5.3 MB, multiply the cache size in megabytes by 4 to get the resident control table size in kilobytes.
Note 3: If the /O option is not active, the resident control table requires 12 KB for each megabyte of cache memory.
COMPATIBILITY
NetWare Lite Cache is fully compatible with the XMS protocol, DOS network protocols, DesqView, Windows 3.1, and earlier Windows versions, and it operates with PC, XT, AT, and PS/2 compatible computers under MS-DOS and PC-DOS versions 2 through 5, DR DOS 6.0, and Windows 3.0 and 3.1.
If you use a "Load High" memory manager such as 386MAX or QEMM, you may load the cache high. Although this can be done, it may seriously impair cache performance when used with abnormally slow add-on memory boards.
ERROR MESSAGES
General Start-up Errors
Already loaded -- NetWare Lite Cache is already loaded.
Amount not numeric -- Invalid size value specified.
Data Compare Error at location hhhhh -- hhhhh is a hexadecimal memory address. An error was detected during the memory diagnostic.
Invalid command line option -- Improper command line option specified.
No compatible fixed disk! -- No compatible disk found.
No Extended Memory available -- Either your computer has no extended memory installed, or another process is using all the extended memory.
A different NLCache is running -- A different version of NetWare Lite Cache caching program is already installed.
Too many drive letter options! -- You are attempting to cache more drives than allowed.
Unsupported sector size! -- NetWare Lite Cache supports only sector between 512 and 16384 bytes.
NLCACHEX Specific Start-up Errors
Insufficient Extended Memory -- There is not enough extended memory available to start the cache.
HMA is not available -- The High Memory Area at location 1024 is in use by another program. The cache control tables will be located in resident conventional (base) memory.
XMS Error Code\ xx -- xx is an error code returned by the extended memory manager. This indicates a serious malfunction in the XMS manager.
The most common error codes are:
80 -- function not implemented
81 -- a VDISK device was detected
82 -- an A20 error occurred
8e -- a general driver error occurred
8f -- unrecoverable driver error occurred
A0 -- all extended memory is allocated
A1 -- all extended memory handles used
A2 -- invalid handle
A9 -- a parity error occurred
NLCACHEM Specific Startup Errors
Expanded Memory content does not match data as written -- An error was detected during the cache start-up memory diagnostics. You may have a hardware malfunction.
Insufficient Expanded Memory free -- All expanded memory is in use by other programs.
No Expanded Memory Manager -- Install the expanded memory manager software you received with your computer or with your expanded memory board.
Status Errors
Cache is inactive: Error 99 at (location) -- The cache tables have been overwritten by another program that is accessing memory outside of its allocated region. This condition may be caused by a faulty TSR (Terminate and Stay Resident) program or by a normal program addressing
memory out-of-bounds. You can identify the offender by removing programs one at a time until the problem goes away.
Cache is inactive: Error xx -- xx is the error code given by the EMM or LIM driver. If NLCACHEM is unable to save the EMS page map due to repeated errors from the EMS driver, the cache shuts down. There may be a serious problem with the EMS board or the EMM driver software.
Errors When Quitting
Cannot release resident memory -- Other programs are loaded above NetWare Lite Cache. You must unload these programs before quitting the cache.
Cannot remove device driver -- NLCache was loaded as a device that cannot be unloaded with the /Q opti