Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp.hpux FAQ
Section - 5.3.2 Is it possible to create a RAM disk?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Cities ]


Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.3.1 How can I enable long file names?
Next Document: 5.3.3 What happened to DUX and context dependent files (CDFs)?
See reader questions & answers on this topic! - Help others by sharing your knowledge

Yes, HP-UX 9.00 and later include a RAM disk driver.  The driver is NOT
officially supported by HP for customer use.  Comments in the header file
"/usr/conf/sio/ram.h" describe how to add RAM disk support to the kernel,
as well as how to create a RAM disk.

Here are several reasons why using RAM disks is RISKY business:

1. As stated above, RAM disks are unsupported by HP.
2. It is unclear (to me anyway) how "locking" down memory interacts with
   normal memory management, including pageouts and memory pseudo-swap.
   The comments in /usr/conf/sio/ram.h says say:
     "Depending on the availability of memory, allocating large amounts
      of memory for RAM disk volumes may cause system failures (panics
      or hangs)."
3. RAM disks can waste memory space.  The "usable" yield of disk space
   from memory allocated may be less than 100%.  (1 GB of real memory
   may yield less than 1 GB on "disk space".)
4. RAM disks aren't saved over a reboot, and require special action to do
   so.
5. You must write a C program to delete them from a running system.

Here are the basic steps make a 128 MB RAM disk on HP-UX 10.x/11.x:

1. Modify your kernel to include the RAM disk driver:

  # cd /stand/build
  # /usr/lbin/sysadm/system_prep -v -s system
  # kmsystem -c y -S system ram
  # mk_kernel -s system
  # mv ../system ../system.prev
  # cp ../vmunix ../vmunix.prev
  # mv system ..
  # mv vmunix_test ../vmunix
  # cd /
  # shutdown -r

Note: "ramdisc" is an alias for "ram" that is also recognized.

2. Set up the device files and mount the RAM disk filesystem:

  # mknod /dev/rram1 c 9 0x008001
  # mknod /dev/ram1 b 9 0x008001
  # newfs -F hfs /dev/rram1
  # mkdir -p /ramdisk
  # mount /dev/ram1 /ramdisk

Another way
===========
There is a better, but not free, way to _simulate_ a RAM disk under HP-UX
10.20 or later...

You must first purchase and install the optional OnlineJFS product, the
advanced bundle for the VxFS file system.  This enables a number of
extra mount options for VxFS filesystems.

To configure a VxFS filesystem so that most buffer cache flushes are
prevented, specify the following options when mounting the filesystem:

  "tmplog,mincache=tmpcache,convosync=delay"

The first two options can be configured with sam, but the convosync
option must be edited into /etc/fstab by hand.

A description and pricing info for the OnlineJFS product is available at
<http://software.hp.com/> (just search for "onlinejfs").

A third way
===========
AppMate Performance Software sells a software product for HP-UX called
RamDisc Plus. For more information see their web site:

  o <http://www.ramdisc.com/ramdsk.html>

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.3.1 How can I enable long file names?
Next Document: 5.3.3 What happened to DUX and context dependent files (CDFs)?

Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hpux.faq@gmail.com





Last Update March 27 2014 @ 02:11 PM