Arachne RAMDISK (and memory use) Howto                      00/07/20
Written by Clarence Verge

The most likely reason to consider running Arachne on a RAMDISK (RD)
is to improve running speed. Another possible reason could be to run
a portable install without accessing the Hard Disk.

This Howto will focus on the need for speed.

You must have a MINIMUM of 4Mb total ram to consider the use of an
RD for Arachne to be a viable option.
Memory must be divided between:
1) The first meg. You need this for DOS and any drivers you load high.
2) Your HD cache. The HD will be required for normal operations and
   to load to, and save from, the RD.
3) Free XMS. Arachne needs XMS memory to work properly.
4) The Ramdisk itself.


PART 1 - MAKING the ramdisk

Regardless of other considerations, the first thing needed is a way
to make the RD and the necessary RD install instructions.
If you use MSDOS or Windows, you probably already have RAMDRIVE.SYS.
An alternative shipped with other OSs may be VDISK.SYS (Virtual Disk)

There are many other possibilities, each with it's own advantage.
The above mentioned must be installed via config.sys and cannot be
re-sized or removed. The likelihood that you might want to do that
is small, but this feature could be helpful in managing memory by
swapping it from HD cache to RD and back if memory supply is short.

A candidate for command line install and removal is:
XMSDSK:
ftp://ftp.simtel.net/pub/simtelnet/msdos/ramdisk/fu_rd19i.zip


Other freeware RD drivers claim to be faster than the standard RDs.
This excerpt from documentation for TDSK (Turbodsk) says it all:

                                    RAMDRIVE       VDISK      TURBODSK
                                  (WINDOWS 3.1) (DR-DOS 6.0)    v2.1
Maximum size                          32 Mb        32 Mb        64 Mb
Conventional memory support            Yes          Yes          Yes
EMS support                            Yes          Yes          Yes
Extended memory driven by INT 15h:      No          Yes           No
XMS memory support                     Yes           No          Yes
Files in root directory               4-1024       4-512       1-65534
Sector size supported               128-1024     128-512      32-2048
Dynamic memory allocation               No           No          Yes
Programmable cluster size               No           No          Yes
32-bit bus used with 386 and 486:       No           No          Yes
Conventional mem. used MS-DOS 5.0:  1184-1232    2096-2608     432-608

MS-DOS 5.0 Data transfer rate (Kb/sec)
Sectors are 512 bytes type.
386-25 MHz (no cache)  RD in XMS:     17105         6838        17095
486-25 MHz (8Kb cache) RD in XMS:     10278         7370        10278

TDISK.zip is available at:
ftp://ftp.simtel.net/pub/simtelnet/msdos/ramdisk/tdsk21.zip


If the user has plenty of available RAM, (more than 8Mb) then it's
just a simple matter of installing the RD of your choice and xcopying
or unzipping your WORKING install to the RD.

Usually though, older and slower computers don't have as much ram as
we might like. Sometimes no more can be added.  We must be selective
in not only WHAT we put on the RD, but even how MANY files and/or
directories we use, because a single directory entry or a file with
only one byte in it takes up a FULL cluster.
So programmable cluster size is important too.

To create an RD with Ramdrive.sys, place a line similar to this in
your config.sys file near the top, but after the line that specifies
your expanded memory manager:
device=DRV:\PATH\Ramdrive.sys 2496 512 512 /e

The first number is the size in kb allocated to the ramdisk and is a
minimum suggested if you only have 4Mb total unless you COMPRESS it.
The remaining 576k can be split up as 512k free XMS and a 64k cache.
The cache won't be used at all when on the ramdisk so it is minimized.
You should have about 15 buffers assigned.  Too many will slow down
the RD response.
If you have 5Mb total, like in a HP, assign 64k more to the cache,

128k more to XMS and the balance to RD for a total of 3328k.
If you have 8Mb total memory available, I recommend a breakdown of
800k - 1600k HD cache optimized by speedchk for efficient use on
your HD, with 4608k RD and the balance, 960k to 1760k, free XMS.
With more than 8Mb, split the additional 50-50 between RD and XMS.

The second number is the sector size. Changing this can't help unless
cluster size is also programmable to reduce total empty space wasted
by very small files.

The third number is the number of directory entries permitted in
the root. A value of 512 will permit placing the main Arachne dir
at root level, thus shortening the paths for some commands.
There has been a problem with long path names in the past.

The last item specifies that the ramdisk be placed in extended
memory. That's the only useful way to go !

*
The syntax for VDISK is almost identical but some VDISKs use a very
different way to claim XMS memory. These must be loaded BEFORE the
memory manager and the manager only uses what remains.

The parameter /e:n is used to specify placing the Vdisk in extended
memory and the :n specifies the number of sectors (1-8) to transfer
as a block.



PART 2 - LOADING the ramdisk

To simplify this HOWto we will start with the install to a large
ramdisk and then chop it down to size for smaller disks.

But first, if you have less than 4Megs TOTAL ram, maybe only 2Megs,
Arachne was designed to make use of a small TEMP dir on a ramdisk to
make your computer faster.  Create a ramdisk of at least 200kb, copy
your command.com to the ROOT of that RD and make a subdirectory on it
called TEMP.  Place these lines in the batch file that calls Arachne:

SET COMSPEC=RD:\COMMAND.COM
SET ARACHNETEMP=RD:\TEMP
where RD: is the name of your ramdrive.
Install Arachne on your HD and in Arachne.cfg specify: Cache2TEMP Yes

This technique is also useful to make a fast computer even faster when
the complete Arachne install stays on HD.
Make sure you set your comspec back to C: if you want to shutdown your
ramdisk.

With a supersize RD, you can make the initial install directly to the
ramdisk but FIRST, create RD:\ARACHNE and RD:\ARACHNE\TEMP and put a
copy of command.com in RD:\ARACHNE.   Do the install with the source
file on hard disk or floppy, NOT on the ramdisk.
Temporily, SET ARACHNETEMP=RD:\ARACHNE\TEMP - this will change.

Get Arachne working properly and then exit.
In Arachne.cfg set the following:
Cache2TEMP No
Hotlist HD:\ARACHNE\HOTLIST.HTM
CookieFile HD:ARACHNE\COOKIES.LST
DownloadPath HD:\ARACHNE\DOWNLOAD\

Delete the contents of RD: \TEMP, \CACHE and \DOWNLOAD.
Remove directories \DOWNLOAD and \BACKUP. Empty \CACHE\HEADERS.
On the RD, delete cache.idx, history.lst and *.tmp.
On the HD make an ARACHNE directory and a DOWNLOAD subdirectory.
Xcopy \MAIL\*.* HD:\ARACHNE\ /s /e and Deltree \MAIL.
Copy Hotlist.HTM and Cookies.LST from RD to HD:\ARACHNE.
Delete the copies on the Ramdisk.

Now, from the MAIN directory of the ramdisk execute the line:
PKZIP -rp HD:\ARACHNE\ARCN16x.ZIP .\*.*
This will place a complete and hopefully working copy of your install
in the ARACHNE dir of the HD.
When you re-start, you will be starting with empty cache, no history.
If the cache is on RD there is no need to have Cache2TEMP Yes.

Here is a batch file to load Arachne to RD and start her. If you exit
and re-start, the Cache contents and history for the day will persist.

SPIDER.bat (sometimes called simply A.bat)
@Echo off
If not "%ARACHNETEMP%"=="" goto RERUN
PKunzip -d HD:\ARACHNE\ARCN16x.ZIP RD:\
SET ARACHNETEMP=RD:\TEMP
Xcopy HD:ARACHNE\MAIL\*.* RD:\ /s /e
:RERUN
SET COMSPEC=RD:\COMMAND.COM
RD:
Call Arachne
Xcopy RD:\MAIL\*.* HD:\ARACHNE\ /s /e
HD:
SET MYIP=
SET REMIP=
SET NETMASK=
SET PEERMRU=
SET COMSPEC=HD:\COMMAND.COM

All cookies and download transactions will be made to the HD.
Mail transactions are uploaded to RD and download to HD by the .bat.
The ramdisk and it's contents can just evaporate when you're finished.

For more mail safety in the event of crash or power failure, or for a
smaller ramdisk, make these changes to ARACHNE.cfg before zipping up:
Cache2TEMP Yes
MailPath HD:\ARACHNE\MAIL\
and delete the Xcopy commands in SPIDER.bat.

The Cache2TEMP line will improve mail performance while leaving the
mail directory on the HD.

In the above scenarios, changes made to your configuration while
running will not be saved. If this is not suitable, do the following:

Prior to the initial zipup copy ARACHNE.cfg and ARACHNE.pck to HD and
delete the RD copies. If you expect to create or change .ACFs, do the
same to *.ACF. Add these lines to SPIDER.bat after the 1st Xcopy line:
Copy >nul HD:ARACHNE\ARACHNE.* RD:\
Copy >nul HD:ARACHNE\*.acf RD:\
and after the 2nd:
Copy >nul RD:\ARACHNE.* HD:\ARACHNE
Copy >nul RD:\*.acf HD:\ARACHNE


All the RD installs follow the same basic procedure. As you move to
smaller RDs (less than 3.5Mb) you will have to begin deleting unused
or seldom used files on the RD and then move functions to the HD.

Since the Wizards only get used for setup, they will go first.
In the \SYSTEM\GUI\ subdir, delete WIZ*.*.
In \SYSTEM\DGI\ delete Wizard.exe.
Then, for more space:
In the RD root, delete *.GIF and *.ACF.
Copy Arachne.cfg to the .ACF name found under it's [Profile] heading.

If you still have less than 500k free on the RD with empty cache then
the cache dir must be moved to HD. Make these changes to ARACHNE.cfg:
CachePath HD:\ARACHNE\CACHE\
Cache2TEMP Yes

Then Xcopy RD:\CACHE\*.* HD:\ARACHNE\ /s /e and Deletree RD:\CACHE.
Copy RD:\CACHE.idx to HD:\ARACHNE
Add this to SPIDER.bat where the 1st Xcopy command was: (delete it!)
Copy >nul HD:ARACHNE\CACHE.idx RD:\
and where the 2nd was: (delete it too!)
Copy >nul RD:\CACHE.idx HD:\ARACHNE


Ramdisk too small for even the initial install ?  Difficult !!
Perhaps you should consider using most of your memory for HD cache.

If you still want to try a Ramdisk, these instructions should help,
but you will need at least 4Mb total memory for a 2312kb ramdisk and
you will have to COMPRESS it with Stacker or Doublespace. See SQUEEZE.
You will allocate 184k to disk cache leaving 576k for XMS.

Do an initial install to HD:\ARACHNE.   Zip it up into a different
directory. (Important)  PKZIP -rp HD:\DUMMY\ARCN16x.ZIP .\*.*

Delete EVERYTHING mentioned above, including: deletree .\MAIL,
and .\CACHE, .\DOWNLOAD, .\DOC, and .\EXAMPLES.
Also, deletree .\SYSTEM\PKTDRVRS, and .\SYSTEM\APM.DB.
Delete .\*.txt.  Examine the remainder for anything you are SURE
you don't need and delete it.  Xcopy what remains to an RD that
already has COMMAND.COM on it and nothing else - including no dirs.

The command is:  Xcopy HD:\ARACHNE\*.* RD:\ /s /e
Check the space available. It will be used for TEMP. It should be
greater than 256k - preferably greater than 500k. If you have the
minimum, manually edit ARACHNE.cfg to this state:

[system]
Hotlist HD:\ARACHNE\HOTLIST.HTM
History .\HISTORY.LST
CacheIndex .\CACHE.IDX
CookieFile HD:\ARACHNE\COOKIES.LST
CachePath HD:\ARACHNE\CACHE\
Cache2TEMP Yes
MailPath HD:\ARACHNE\MAIL\
DownloadPath HD:\ARACHNE\DOWNLOAD\

[auto-added]
POP3log No
SMTPlog No
KeepHTT No
VFAT No
CacheFonts Yes
XMS4allGIFs 0
XMS4oneGIF 0
MinDiskSpace 128

Then in the directory HD:\ARACHNE, do deletree .\*.*  and
from the ROOT directory of the ramdisk execute the line:
PKZIP -rp HD:\ARACHNE\ARCN16x.ZIP .\*.*
This will place a compressed copy of your distilled install in
the ARACHNE dir of the HD.

Finally, referring to the directory containing the INITIAL install,
PKunzip -d HD:\DUMMY\ARCN16x.ZIP HD:\ARACHNE . This makes the deleted
document files available to you by surfing the HD.

Create SPIDER.bat as shown above, without the Xcopy commands.
In their place put 1st:
Copy >nul HD:ARACHNE\ARACHNE.cfg RD:\
Copy >nul HD:ARACHNE\*.pck RD:\
and where the 2nd was:
Copy >nul RD:\ARACHNE.cfg HD:\ARACHNE
Copy >nul RD:\*.pck HD:\ARACHNE

Type SPIDER and if we didn't miss anything, you are off to the races!

8-)

