Using a Compressed RAM Disk

▌Overview▐█ 
  Although the technique described here is interesting, its usefulness is
  debatable.  Some experts say that you can get better mileage out of your
  extended memory by using it in a disk cache.  However, a large RAM disk
  used as your TEMP directory will speed up I/O Redirection and Windows
  Print Manager tremendously.

  A compressed RAM disk provides nearly double the storage for the same
  amount of RAM.  The speed difference is negligible (it's still far faster
  than the fastest uncached hard disk).

█▌Prerequisites▐█
  ■ You must install the RAM disk earlier than DBLSPACE.SYS in your
    CONFIG.SYS file.  Otherwise, each time you mount the RAM disk,
    DoubleSpace will modify DBLSPACE.INI to take over its drive ID (and the
    next time you boot, the RAM disk's ID will be one notch higher... ad
    infinitum).

  ■ You must have at least one available DoubleSpace reserved drive ID.
    Use Dblspace /LIST to check this.  If not, run Dblspace, choose Options
    from the Tools menu, and change the setting.

█▌The Simple, Vanilla Technique▐█
  ■ Create a 1.2 MB RAM disk.  For instance..
    DEVICEHIGH=c:\dos\ramdrive.sys 1200 /E   (in CONFIG.SYS)
    DEVICEHIGH=c:\dos\Dblspace.sys           (in this order)

    ...and create a compressed drive....

    DBLSPACE /CREATE D: /NEW=E: /SIZE=0.50   (in AUTOEXEC.BAT)
    DBLSPACE /SIZE /RESERVE=0 E:             (no reserved space needed)

    ...each time you boot.

  ■ This slows-down your boot sequence and you may want to use less than
    1.2 MB for your RAM disk.

█▌The Interesting Technique▐█
  Quick overview:
    Create a "dummy" compressed volume file on a diskette.  Copy it to your
    hard disk.  In AUTOEXEC.BAT, copy it to a RAM disk and mount it.  A
    600K RAM disk will yield about 1 MB of fast RAM disk storage.

  Step-by-step instructions:

   1) Format a 1.2M diskette in drive A...
          Format a: /U /VDbl_RAMDisk

   2) Create a minimum-size CVF on the diskette; for instance,
          Dblspace /COMPRESS A: /res=0
          Dblspace /SIZE=0.56 A:

   3) Unmount the compressed volume:
          Dblspace /UNMOUNT A:

   4) Clear the attributes of the CVF:
          Attrib -h -r -s A:\DBLSPACE.000

   5) Copy the CVF to your hard disk, giving it a different name:
          Copy A:\DBLSPACE.000 C:\DUMMY.CVF

      Note: You no longer need the compressed diskette.

   6) Setup CONFIG.SYS to create a 600K RAM disk; for instance:
          DEVICEHIGH=c:\dos\ramdrive.sys 600 /E

      Put this BEFORE installing DBLSPACE.SYS.  We'll assume that your RAM
      disk is drive D.

   7) Setup AUTOEXEC.BAT.  Add these lines:
          SET RAMDRV=D:                            (create a handy e-var)
          Copy C:\DUMMY.CVF  %RAMDRV%\DBLSPACE.000 (put CVF on RAM disk)
          Dblspace /MOUNT %RAMDRV%                 (make it accessible)

  Reboot.  From now on, drive D (or whatever) will be your compressed RAM
  drive and its host will have a higher letter, such as E or F.

█▌Refinements▐█
  ■ Between steps 2 and 3, pre-load the diskette with often-used programs
    and batch files.  When you mount the pre-filled CVF, the programs will
    be ready for action.

    While you're at it, create a TEMP directory on the diskette.  And in
    AUTOEXEC.BAT, use Set TEMP=%RAMDRV%\TEMP.

  ■ Steps 2 and 6 minimize the memory use of the RAM disk.  The technique
    works fine for larger RAM disks (in fact, you may want to use about 1MB
    to get best performance from Windows Print Manager).

  ■ In step 5, be sure to store the dummy CVF on a compressed disk; since
    it is mostly empty (and it was formatted with /U in step 1), it will
    take very little physical disk storage.

  ■ General tip for using RAM disks: Step 7 creates an e-var to identify
    the RAM disk.  In batch files that refer to the RAM disk drive ID, use
    %RAMDRV%\ in place of D:\.  That way, if you end up changing the drive
    ID of the RAM disk, one change to AUTOEXEC.BAT fixes all of your batch
    files and MAKE files.

   Notes: ■ In nearly all respects, DoubleSpace treats a RAM disk as if it
            were a hard disk.  The one apparent difference is in
            Dblspace /LIST, it will identify a disk as a "Compressed
            RAMDrive" or "Local RAMDrive" only if its volume label is
            "MS-RAMDRIVE".

          ■ By default, Smartdrv will provide disk caching for a compressed
            RAM disk.  This is particularly wasteful (if somewhat
            humorous).  Be sure to disable all caching for your RAM disk;
            for instance, if the RAM disk host drive is E, add E- to the
            Smartdrv command line in your AUTOEXEC.BAT file.

See Also: DoubleSpace (overview)
                                    -♦-