[comp.os.vms] What good are VMS RAMdisks anyway?

JWMANLY@AMHERST.BITNET (John W Manly) (04/13/88)

Hi everyone.  I have a few questions about some software that I have seen
advertised recently and would like to hear from anyone who has anything to say
on the subject of RAMdisks for VMS.

BTW, I want to make it clear that I am not talking in particular about the
PDDRIVER supplied with VMS, as I understand that it does character-by-character
data transfers and hence is rather slow.  I am talking about the supposedly
sleeker items like TurboDisk and more to the point about the theoretical
advantages of such virtual devices.

Basically, what is it that these items are supposed to get you?  "Improved
performance through faster access to data and programs" is the phrase I keep
hearing, but does this really help?  For images, what does this get you that
INSTALL doesn't?

Perhaps I don't understand INSTALL very well, but my impression was that when
you INSTALL something, a permanent global section is created for the readonly
image sections, which means that when someone wants to activate the image, they
just map to the global section, and thus only incur "soft" (memory to memory)
faults.  Certainly, the actual disk blocks must be read in once when the first
user invokes the image, but after that it is, in some sense, memory resident.

A RAMdisk, on the other hand, looks like a disk, so image activation proceeds
normally, generating page reads from memory to memory.  So it is not clear to
me what good the RAMdisk is doing.  Also, would there be any point in
installing an image on a RAMdisk?

But what about reading and writing data files?  I have never had occasion to,
so I am not sure what the results of installing such files are, so this might
be a place where the RAMdisk is a help, though presumably you eventually have
to copy the data from RAMdisk to real disk for permanent storage.

Also, to create a RAMdisk, a certain amount of memory must be dedicated to this
function. Is the theory of RAMdisks that VMS does not manage its memory very
well, and this dedication results in a performance win?  If this is true, is
VMS just not very good at memory management, or does it write things back to
disk too often (like image rundown)?

Anyone have any thoughts?

PHONE:  (413)-542-2526            - John W. Manly
BITNET: JWMANLY@AMHERST             System Manager
                                    Amherst College

pstevens@pioneer.arpa (Paul Stevens RCE Sterling) (04/19/88)

In article <8804180208.AA04234@ucbvax.Berkeley.EDU>  (John W Manly) writes:
>Hi everyone.  I have a few questions about some software that I have seen
>advertised recently and would like to hear from anyone who has anything to say
>on the subject of RAMdisks for VMS.

>  I am talking about the supposedly
>sleeker items like TurboDisk and more to the point about the theoretical
>advantages of such virtual devices.
>

Interesting you should ask about RAM disks and Turbodisk in particular.
We are just doing some studies and tests using Turbodisk to boost
performance on one of the heaviest use nodes on our cluster here:
An 8650 with 60-80 users on average and up to 100 at peak times.

Now about, INSTALL vs RAM disks,  If you INSTALL with OPEN/HEADER
all that has been done is to keep header information available in
memory for locating the image from the file.  This means that one
less disk I/O needs to be done at image activation when the page tables
are mapped.  If you go all the way and (for a re-entrant routine) also
make it SHARED then *IF* the image is already in memory then all subsequent
processes will map to those shared pages.  However, this does not mean
that the image will always be in memory.  This will depend upon how
often the image is invoked, wether the entire image gets mapped (i.e. If
it pages within itself) and how much memory you have.

Turbodisk helps you to make the right decisions in this area by use of
something they call recording mode.  This alows you to collect statistics
about disk activity (not image activity) for all image files on your
system.  Therefore, you can find out which of your files (even those
declared OPEN/HEADER/SHARED are generating lots of disk I/O, for whatever
reason.  These are the good candidates for RAM disk.  I believe DEC has
something called HOTFILES which does essentially the same thing, but
someone here claims Turbodisk's version is better (I don't really know
either way).

Turbodisk does not save anything back to disk, so putting something
like SYSUAF.DAT, though a high activity file, has the disadvantage of
the possibility of losing data (like everyone's password change for the
last N days since the RAM disk was installed :-( !)

As far as memory goes, yes, RAM disks in general are of greatest benefit
when your system is not thrashing due to lack of memory.  It's hard to
give any real figures, but I would guess that even for a small system
there would be a optimum (though small) size for a RAM disk that would
still give a performance improvement.

Sorry, for the longwinded talk, but I thought others might be interested too.
If you want some details about our results (when they're ready) email
to me and I'll send a quick summary.  I am not endorsing Turbodisk, merely
stating what we're doing with it; other RAM disks may be equally good or
better.
-----------------------------------------------------------------------
Paul Stevens - NASA Ames Research Center Moffet Field CA
               Mail Stop 233-10
               (415)694-4887
	       pstevens@ames-pioneer.arpa

root@helios.toronto.edu (Operator) (04/22/88)

In article <7544@ames.arpa> pstevens@pioneer.UUCP (Paul Stevens RCE Sterling) writes:
> [...]
>
>Turbodisk does not save anything back to disk, so putting something
>like SYSUAF.DAT, though a high activity file, has the disadvantage of
>the possibility of losing data (like everyone's password change for the
>last N days since the RAM disk was installed :-( !)
>
Turbodisk *does* have a mechanism for saving things back to disk - *if*
you tell it to do so. Using it, however, brings in the issue of "at what
point does saving things back to disk cancel out the performance improve-
ments gained by having it in the first place?". You can tell TurboDisk
to BACKUP the contents of the RAM disk (back to the original files?) at
a fixed, manager-adjustable, frequency (e.g. every 10 minutes, every hour,
every 24 hours, etc.). Since I only tested the free demo, I don't recall
whether you can specify certain files which should be written out, or if
it always does the whole thing. If the latter, and it's a large chunk of
memory, you probably don't want to do it very often. But it can be done,
at least as a BACKUP saveset. So if the system crashed you would only
lose the changes made since the last copy operation.

However, TurboDisk is really designed to hold files which are read a lot,
so I don't think it would help to put high-write-activity files on it.

>Paul Stevens - NASA Ames Research Center Moffet Field CA
>               Mail Stop 233-10
>               (415)694-4887
>	       pstevens@ames-pioneer.arpa

-- 
 Ruth Milner          UUCP - {uunet,pyramid}!utai!helios.physics!sysruth
 Systems Manager      BITNET - sysruth@utorphys
 U. of Toronto        INTERNET - sysruth@helios.physics.toronto.edu
  Physics/Astronomy/CITA Computing Consortium

CALIFFM@BAYLOR.BITNET (Michael Califf) (04/22/88)

Here at Baylor we use a 2Mb RAMdisk on a VAXStation 2000 to hold
several data files which are accessed infrequently (only 1-2 times
a second) and which can be (and are) replaced many times a day.
The hard disk on the VS2000 is so slow that accesses to the
indexed files took seconds - this on an Student ID system which
is supposed to grant 0.5 second response.  Changing to a RAMdisk
(just the PDDRIVER type) decreased file access times to the
hundreths of a second and placed response time down into the
proper range.

This is just one case where a RAMdisk saved our skins.  Any other
stories out there?

Mike Califf
Communications Software Coordinator
Baylor  University
CALIFFM@BAYLOR
-------