From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 9-JUN-1992 12:26:55.14 To: "info-vax@crvax.sri.com" CC: Subj: RE: Looking for PD Ramdisk (the varieties of ram disks) There are a number of types of ram disk availabie. 1. Some types of ram disk grab parts of nonpaged pool (which must generally be enlarged to make this useful) and present that as a disk. The DEC PDdriver does this, but inefficiently. Gerald Newman's ramdriver, and John Osudar's MDdriver, do this operation far more efficiently and are available on the sig tapes. Obviously a reboot is needed to enlarge nonpaged pool, and if one turns off the driver, the physical memory remains unavailable for user mode processes. These are however blindingly fast. (I should add for nonclustered machines that Paul Sorensen's CDdriver implements a disk cache which intercepts start-IO on another driver and also uses nonpaged pool, but its' cache size can be dynamically changed. Where a driver on a single machine is the sole path to a disk, this can be used reasonably. It has no notion of cluster locks or access however, so must not be used on disks that are on HSCs, dual ported, or the like. (Paul's CDdriver was on the Fall '89 tapes.) 2. Some commercial ramdisks (including, I believe, Raxco's) grab memory off the normal vms free space list for their storage and hang onto what is requested as long as it's needed. This is also blindingly fast, and when the disk is freed, the space becomes available for other use again. When you tell disks of types 1 or 2 that you want 30 MB of disk, though, they'll take 30 MB of memory. Obviously if these are abused your system can be made to suffer. If you want a ramdisk instead of a cache, though, one of these techniques needs to be used. 3. A somewhat different compromise is provided by some of the host processes for FDdriver. The fddriver lets a process handle all actual storage, presenting that storage as a disks to the rest of the system. Some of the host processes implement disks using process virtual address space for the actual storage, most of which is demand-zero pages until used. This means the amount of memory is controlled by the quotas of the host process (and quotas like WSEXTENT which allow lots of memory to be used if and only if it's free), yet seek time is low and you still get memory storage. The fddriver solution is not as high speed as techniques 1 and 2 however, since it involves context switches between the host process and the client. Bear Systems has a variant in which they use global sections and remove a fair bit of this overhead, with the storage still being in process virtual space so that it interacts with VMS memory demands using normal VMS scheduling. FDdriver does not use global sections to move all the data transfer to FDT time mainly because it is a generic driver and was coded rather conservatively. Since source code is available it could of course be modified. Ultimately, though, the choice depends on whether you want your memory disk to be guaranteed to be ultrafast (techniques 1 and 2 only need apply) or whether you want it to be relatively fast only, depending on what might have to get paged in from the page file and on access patterns. In the extreme case, type 3 becomes a virtual disk that lives in part of the pagefile and runs at disk speeds. The other extreme is for it to act as a class 2 disk, but a bit slower in general since there's a bit more access checking to be done. Things like an ESE20 are hardware memory disks, using their own memory rather than VAX system memory, and they have nothing to do with this discussion of driver types. They too can be blindingly fast, but the memory in that case is not on the normal VAX memory bus, and data transfers to or from that memory proceed by DMA techniques, not by processor moves (which use movc3/movc5 in all cases I know of except pddriver.) Thus the ESE20 can impose less processor load than a memory disk, provided the overhead to set up DMA is less than the memory copying overhead. That too is an interesting study. (One tends to be prejudiced by experience...I tested BOSS vs. SWIM for instance on a VAX11/785. A Vax 9000 user would possibly consider the difference in CPU usage negligible, which is NOT how it appears on the 785. Drivers like John Osudar's mddriver were written to be faster than normal disks on a 780.) A conclusion is: You can get type 1 and 3 drivers free on the sig tapes, and can get demos of type 2 either free or close to it. You should try them on your system, and see what matches your needs. Glenn Everhart@Raxco.com