
                      [32;41;1m Disk Caching Programs [0m

                           [43;3mby Dave Hooton [0m


[32m    36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 [0m


  The main purpose of the exercise was to test the usefulness of disk
  caching programs in improving input/output (I/O) to either hard disks
  or floppy disks.  A cache is an intelligent buffer.  You might be
  familiar with buffers via the AddBuffers command, knowing that the
  more buffers you add, the better the performance of your drive. You
  typically have 20 buffers on a floppy and 30 buffers on a hard drive.
  This equates to about 10k and 15k respectively of memory, usually
  chip memory. A cache is much larger, typically 512k! And it applies to
  a device e.g. you will have one cache for HD0: and HD1:, whereas each
  drive will have 30 buffers of its own. A cache can work in conjunction
  with buffers.

  A speed testing program like DiskSpeed 4.2 will show a staggering
  improvement in data transfer speed with any well designed cache. The
  downside is little or no improvement in file create speed. But, no
  matter how much I may respect a program like DiskSpeed, the real test
  is how it affects typical operations that I perform. So I ran a suite
  of tests involving copying and searching of data on hard drive and
  floppy. The results surprised me! So much that I re-ran the suite to
  verify their accuracy. The best I can say is that an intelligent cache
  is bound to take some time compared to simple buffers.

  I have a A1200 with 85MB Maxtor hard drive and 4MB fast RAM. Naturally
  enough, this uses Workbench 3.0. The programs I tested are FastCache and
  ClockCache, both available in the Public Domain on HotPD10a from Prime
  Artifax. Another PD cache program is SmartDisk (Fish 754) and then
  there is a commercial program called HyperCache Professional. The latter
  two were tested by Amiga Review in their August 1993 issue.

  As FastCache came in two varieties, I needed to know which was the
  faster for my computer and to find a cache size under 512k that was
  just as good. The misnamed FastCache68030 worked a bit better on my
  68020 CPU, and I settled on 340k as roughly established below:-


    [33mCopy WORK:Falconmission to WORK:Falcon ALL Quiet
         [33m(2 sub-dirs, 109 files/1,452,300 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68000  512k    Y     30.2
    FCache68000  340k    Y     30.2

    FCache68030  512k    Y     30.0
    FCache68030  340k    Y     30.0

    FCache68030  340k    N     19.6

    None**          -      -   15.0

       ** None usually means 30 normal buffers for a hard drive
          and 20 buffers for floppy drive.

    ================================================

    The rest of the tests on my hard drive follow:-

    ================================================


    [33mCopy WORK:Falconmission to RAM: ALL Quiet    (AmigaDOS Copy command)
         [33m(2 sub-dirs, 109 files/1,452,300 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    Y      7.9
    FCache68030  340k    N      7.9

    None          -      -      6.5



    [33mCopy RAM:Falconmission to WORK: ALL Quiet
         [33m(2 sub-dirs, 109 files/1,452,300 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    Y     16.8
    FCache68030  340k    N     10.8

    None          -      -      8.5



    [33mCopy RAM:Falconmission to WORK:
         [33m(1 file/353,152 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    Y      1.1
    FCache68030  340k    N      1.4

    None          -      -      1.2



    [33mCopy RAM:NIV.1 to WORK:
         [33m(1 file/803,947 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    Y      9.1
    FCache68030  340k    N      2.2

    None          -      -      2.1



    [33mAmi-Back scan of WORK:           (Backup utility Scan)
           [33m(30 sub-dirs, 700 files)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    Y     10.8
    FCache68030  340k    N     10.7

    None          -      -     10.2



    [33mSearch WORK: Siesta FILE         (AmigaDOS Search command)
           [33m(30 sub-dirs, 700 files)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  340k    N      9.2

    None          -      -      8.0

    ========================================================

    Now that my hard drive is suffering from over work, it's
    time to see if the floppy drive can reap any benefit.

    ========================================================

    [33mCopy RAM:Falconmission to DF0:
         [33m(1 file/353,152 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  128k    Y     26.0
    FCache68030  128k    N     34.5
    CacheClock   128k    -     33.5

    None         5 buff  -     35.2
    None        20 buff  -     32.6



    [33mCopy DF0:Falconmission to RAM:
         [33m(1 file/353,152 bytes)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    FCache68030  128k    Y     17.6
    FCache68030  128k    N     17.6
    CacheClock   128k    -     16.9***

    None         5 buff  -     17.8
    None        20 buff  -     16.7


    *** the file was corrupted - not on the initial copy, but on
        the SUBSEQUENT copy, when it thought most of the file was
        in the cache and took <1 second! Goodbye CacheClock.



    [33m"Find" DF0:SmallFonts1  Siesta FILE     (a file finder utility)
           [33m(96 sub-dirs, 258 files)

       [31;1mCache     Cache Write   Time
      [31;1mProgram    size  Delay   (sec)

    CacheClock   128k    -       78
    FCache68030  128k    Y       41

    None        5 buff   -      109
    None       20 buff   -       78



    [33mCopy files to/from floppy       (e.g. Copy RAM:smallfile to DF0:)
    [33m-------------------------

       [31;1mCache     File  Cache Write     Time       Time
      [31;1mProgram    Size  size  Delay    Initial   Subsequent

    FCache68030  3677  128k    Y     1.5 (1.5)    <0.5*
    None         3677          -     2.8 (1.5)    +
    FCache68030  7744  128k    Y     2.0 (1.7)    <0.5*
    None         7744          -     3.3 (1.7)    +
    FCache68030 44504  128k    Y     2.0 (3.4)    <0.5*
    None        44504          -     6.1 (3.1)    +

         () time from DF0: to RAM:
         *  same to/from DF0:
         +  same times as Initial



  [33;4mSummary

  FastCache provided best improvement on my floppy drives, which is
  where I have used it for an extended period. The overall benefit is
  that it saves a lot of drive thrashing because a reasonable number
  of files fit in the cache! I found 128k worked well - you may need
  a larger cache. I found it best to remove (Add)buffers from the floppy.

  One trap of updating caches that IBM PC users are well aware of, is
  that the update of the disk may never take place if you exit too
  rapidly. The only way this will happen on a multi-tasking computer
  like the Amiga is if you:-

  1. remove the (floppy) disk too soon; or
  2. reset the computer too soon.

  So choose the write delay interval wisely. 1 second minimum is best,
  with a 60 second maximum. If there is no I/O, it will update in 1
  second, but it can never take more than 60 seconds to update.

  The only time I had problems was when using backup programs, or any
  program that takes over trackdisk.device e.g. SuperDuper, Ami-Back.
  Simply remove FastCache for such!


[32m    36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 -+- 36 [0m

