SUMMARY:virtual ram disk

From: Carl Ma <carl_ma_at_scotiacapital.com>
Date: Mon Nov 18 2002 - 12:13:29 EST
Hello all,

Thanks for the responses from

Karl Vogel
Mike Salehi
Wanke Matthias
John Leadeham
Riddoch  John
William Hathaway
Jay Lessert
King Brooke
Graham Wood

Almost all the people suggest using tmpfs even it may be swapped & paged out,

mount -F tmpfs -o size=200m swap /ramdisk

Karl Vogel also raised an idea that the ramdisk may be configured in a 
pseudo-device tree.  "man pseudo" shows the sample. I failed to write a driver 
to create this pseudo device, will try again.:-)

Thanks & have a good day,

carl


========================

Carl,
      I do not have an answer on ramdisk, but you can do the same with
shared memory to man shmctl
Mike Salehi  

========
Hi Carl,
  the info you are looking for can be found in the mount_tmpfs man page.

In Solaris 8, /var/run is a memory based filesystem, if you grep tmpfs
in /etc/init.d/*, you will see how to create one of these on the fly

/sbin/mount -F tmpfs swap /var/run


In my case, I added one to /etc/vfstab, which looks like:

swap -  /apps/iplanet/server5/msg-maxint-1/imta/tmp  tmpfs - yes  -

If you want to limit the max space, you can use something like 
size=200m 
as a mount option (replacing the last '-').

Good luck!

William Hathaway
=========

Probably the best answer is to use a tmpfs.  This will be kept in memory 
and/or swap as required.  You can use the '-o size' to create a limited size 
partition instead of using all the available.

Hope this helps,

Graham.

==========
Sort of, with tmpfs, which is a type of file system taken from your virtual
memory and swap space. /tmp, by default, is like this.

You can specify the size with "-o size=200m" on the mount command line or in
the mount options in /etc/vfstab.

King, Brooke

==========
Sure.  Chances are, your /tmp is already tmpfs, like this:

% df /tmp/.
Filesystem            kbytes    used   avail capacity  Mounted on
swap                  512000    1968  510032     1%    /tmp

By default the size is unlimited except by RAM+swap.  To limit
the size, use the size= option, like this from my vfstab:

swap	-	/tmp	tmpfs	-	yes	size=500m

-- 
Jay Lessert      
===========

/tmp is actually virtual memory, so you could create a directory there for
them.  Alternatively, mount a seperate partition in the same way where you
want this ram disk to be.  Check the syntax in /etc/vfstab and copy the /tmp
line.


John Riddoch
============
Use tmpfs. man tmpfs, man mount tmp_fs for details.
tmpfs is a memory-based filesystem.
/tmp is already (unless you've changed it) mounted on tmpfs.

To mount a tmpfs filesystem:
# mkdir /mountpoint
# mount -F tmpfs -o size=200m swap /mountpoint
(The "swap" is just part of the incantation and doesn't mean swap on it.)

Then you probably want to add it to /etc/vfstab so it will
be mounted on reboot, and so you can just say mount /mountpoint
and here the /tmp line can be used as a template:
swap    -    /mountpoint    tmpfs    -    yes    size=200m

John.
=============
tmpfs is your solution. look at the way /tmp is mounted in your /etc/vfstab.
you can limit the size of a new tmpfs-Filesystem with the size-Option when
mounting, so like

mount -F tmpfs -o size=200m swap /ramdisk

read the manual for details! :)

Wanke Matthias
===============
 Maybe.  "man pseudo" describes a pseudo-device driver for a ramdisk, but
   I've never tried it.

   "fastfs" turns off synchronous file system operations:
   http://www.sunmanagers.org/pipermail/summaries/2002-January/002200.html

   I'd definitely mount all the filesystems with the "noatime" and
   "logging" options; it speeds up file operations tremendously.

   Using tmpfs might be more effective as it won't ask for all the RAM
   straight away, and also if the machine becomes very busy the RAM is
   freed and swap is used.  Solaris has /tmp set up as tmpfs by default.
   This will create a 64-Mbyte tmpfs area:

      root# mkdir /fastfs
      root# mount -F tmpfs -o size=64m swap /fastfs


Karl Vogel    



---orignal post----
Hello everyone,

We have two applications running on a E450 server(4G RAM, Solaris 8 with latest 
patch). These two applications need to exchange a lot of, small size files with 
each other. My idea is creating a 200M virtual memory disk, which can provide 
better write & read performance, like ramdisk in linux. Is this doable? 

Because there is a RAM disk during workstation jumpstart, I guess there may have 
a way for this. Will summarize if I can find solution.


Thanks & have a good day,

carl
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Nov 18 12:26:41 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:58 EST