home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DSKCACHE / CACHE22.ZIP / CACHE22.DOC < prev    next >
Encoding:
Text File  |  1988-09-05  |  3.4 KB  |  79 lines

  1.  
  2.  CACHE Version 2.2.   by Quick and Dirty Software, Inc. Origional logic by
  3.  ----- -----------    Steven Holzer of PC Magazine (8/85)
  4.  
  5.  CACHE establishes disk caches. The default cache is for all PC, XT, and AT
  6.  real (not virtual) drives other than the AT hard disk.
  7.  
  8.  FORMAT:  [d:] [path] cache [[size] disk]
  9.  
  10.  [d:] [path] before CACHE to specify drive/path that contains CACHE.COM.
  11.  
  12.  [size]  Size of cache in 512-byte sectors.  Number must be between 24 and
  13.          124, or it will be adjusted.  Default: 64. CACHE takes less than 256
  14.          bytes, plus 518 bytes per sector.
  15.  
  16.  [disk]  Disk to be cached, if single disk cache is being allocated. Default:
  17.          all real disks.  But there may be times to avoid cacheing a specific
  18.          disk, or to cache larger than 62K bytes.
  19.  
  20.  CACHE can be invoked more than once to create a larger cache or to set
  21.  individual disk caches for each disk.
  22.  
  23.  Caches are searched in reverse order of allocation.  If you are allocating
  24.  more than one cache, allocate the most heavily used cache LAST. If you are
  25.  allocating a general cache, it makes sense to allocate it FIRST in most
  26.  cases, so it becomes a "cache of last resort".  The overhead for skipping
  27.  individual caches is small, but the overhead for a search failure is large.
  28.  
  29.  Only single sector reads and writes are cached. Therefore, loading large
  30.  programs will not be affected.
  31.  
  32.  What will be affected:  databases with records smaller than 512 bytes, batch
  33.  files, and source files for language processors that scan the input file
  34.  more than once.
  35.  
  36.  The disk file directory and file allocation tables are cached, and always
  37.  resident once read from disk. Other files have their sectors purged if they
  38.  are not frequenly accessed.
  39.  
  40.  When the cache is allocated, its segment location is listed out.  The DOS
  41.  DEBUG command can be used to read out data areas of interest, while the
  42.  cache is running.  The data areas start at offset 114h.  They are each one-
  43.  word (two bytes) long:
  44.  
  45.                  offset           data
  46.  
  47.                  114      Cache size in sectors
  48.                  116      Total Number of disk I/O's
  49.                  118      Number of cache hits
  50.                  11A      Number of free slots in cache
  51.  
  52.  Remember that these numbers are hexadecimal and stored low-order byte first,
  53.  so the default size of 64 is stored as:  40 00 
  54.  
  55.  To access this data, first write down the sector address typed out when
  56.  CACHE initializes.  Let's say it is 909. Type the following commands:
  57.  
  58.  DEBUG
  59.  d 909:114
  60.             '  (analyze the displayed data)
  61.  q
  62.  
  63.  
  64.  Typically, about half of all disk I/O's result in cache hits.  All data in
  65.  cache backed up on disk immediately, so only disk reads assisted by cache.
  66.  
  67.  The cache should be sized so you will not reduce the number of free slots to
  68.  zero the first time you perform your most frequent operation.  Size your
  69.  cache by booting up, issuing the CACHE command for a 124-sector buffer,
  70.  performing your "typical" batch file, compile or data base access, running
  71.  DEBUG, determining how much CACHE remains free, and downsizing as required.
  72.  
  73.  If you can't allocate a single large cache that does the job, then create
  74.  caches for heavily used disks.
  75.  
  76.  Place CACHE commands first in your AUTOEXEC.BAT file because CACHE will make
  77.  it run faster.  Also, notice that DIR commands run without pausing, and the
  78.  disk will stop running about halfway through the second time it is issued.
  79.