Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following commands will create the RAM disk, keep events on the hard drive, and ensure permissions are not lost.   These commands should also need to be added to a script that runs at boot time.  On Centos 6 /etc/rc.d/rc.local works well.

Info

When creating the RAM disk the size parameter may be a number expressed with the suffix k, m or g (kilo, mega, and giga).  It may also be expressed with the % sign.  For example if you'd like to allow the ramdisk to consume up to 25 percent of the available RAM the following technique could be used.


mount -t tmpfs -o size=25% tmpfs /media/ramdisk/

Keep in mind that the ramdisk will not immediately consume the amount of RAM specified. This is the most it will be allowed to consume should it need to. Also keep in mind that if the RAM is oversubscribed the ramdisk could be pushed into swap. If the ramdisk find's itself in swap space it defeats the purpose of this expedition, so do try to avoid this situation.
Code Block
mount -t tmpfs -o size=1000M tmpfs /media/ramdisk/
mkdir -p /media/ramdisk/nmis8/var
ln -s /data/nmis8/var/events /media/ramdisk/nmis8/var
/usr/local/nmis8/admin/fixperms.pl

...