Using the ioDrive as Swap Space
Using the ioDrive as Swap Space under Linux
For instructions on using an ioDrive as swap space under a different
operating system, consult the user guide for that operating system.
Follow the instructions based on the version of your driver.
Instructions for
Driver Versions 2.1.x
Instructions for
Driver Versions 1.2.x
Using Multiple Devices
under Linux
Instructions
for Driver Versions 2.1.x
To safely use the ioDrive as swap space requires passing the preallocate_memory
kernel module parameter. The recommended method for providing this
parameter is to add the following line to the
/etc/modprobe.d/iomemory-vsl.conf file:
options iomemory-vsl preallocate_memory=1072
Where 1072 is the serial number for the device obtained
from fio-status.
For multiple devices separate serial numbers with a comma. However,
using
multiple swap targets under linux results in reduced performance,
and is not recommended.
Notes:
- Be sure to provide the serial numbers for the ioMemory Modules,
not the adapter.
- A 4 KB sector size format is required for swap—this reduces the
driver memory footprint to reasonable levels.
- The preallocate_memory module parameter is necessary to have the
drive usable as swap space. This will ensure the drive is crash-free
during operation. See the appendix Using
Module Parameters in the ioDrive
Linux User Guide for more information on setting this parameter.
- You must have 400 MB of free RAM per 80GB of ioDrive capacity
(formatted to 4 KB block size) to enable the ioDrive with
pre-allocation
enabled for use as swap. Attaching an ioDrive, with pre-allocation
enabled, without sufficient RAM may result in the loss of user
processes and system instability.
- The preallocate_memory parameter is recognized by the ioMemory
VSL at load time, but the requested memory is not actually allocated
until the specified device is attached.
1. Enable swap support in /etc/modprobe.d/iomemory-vsl.conf by adding
the options line. Replace
<your_iodrive_serial_number_here>
with the actual serial number of the ioDrive to be used as swap space.
options iomemory-vsl
preallocate_memory=<your_iodrive_serial_number_here>
2. Restart the computer or unload and reload the ioDrive driver to
enable the
preallocate_memory driver option.
3. Add an entry for the ioDrive (/dev/fioa) in /etc/fstab, assuming
/dev/fioa is to be used as swap space.
/dev/fioa none swap sw 0 0
4. Initialize the ioDrive as swap space.
$ mkswap /dev/fioa
5. To disable/reenable the swap space, run these commands:
$ swapoff -a
$ swapon -a
swapon -s, cat /proc/swaps, cat /proc/meminfo, or top can be used to
monitor swap usage.
Instructions for
Driver Versions 1.2.x
Swap
support is deprecated for 1.2.x drivers. For best performance,
we recommend upgrading the driver to 2.1.x.
Using Multiple
Devices under Linux
Using multiple swap targets under linux results in reduced performance,
and is not recommended.