22.2 Types of Swap Space

   

Depending on the physical location of the swap space and how it is used with the rest of the file system, there are two major categories of the swap. The first one is the device swap and the second one is the file system swap. These two categories are briefly explained next .

Device Swap Space

If you are using an entire disk exclusively for the swap space, or an entire file system in the LVM, it is called device swap. In the whole disk approach of the file system, you can leave space for the device swap area at the end of a disk by using the newfs command. Device swap may be used in the following ways.

  1. If you are using a swap area of 200 Mbytes at the end of disk device c2t5d0 and rest of it for a file system, the newfs command can reserve this space as follows .

     newfs -R 200 /dev/rdsk/c2t5d0 
  2. In case you use a complete disk for the device area, you can enable that disk for use with swap using the swapon command directly.

  3. If you are using LVM, you can use an entire logical volume as device swap. After creating logical volumes , use the swapon command on the designated logical volume.

Device swap is more efficient than file system swap, and it should be created on a disk that has better throughput than the others.

File System Swap Space

The file system swap area can coexist with other files on a file system. It can be configured dynamically and is usually used when device swap space is full. Usually, a low priority level is attached with file system swap. You can use a directory in a file system that is used for file system swap. Also, you can put an upper limit on the file system swap if you don't want it to grow beyond a certain limit.

Primary Swap Space

The primary swap is the swap area that is available at boot time; at least one primary swap area must be available. It is usually located on the same disk used as the primary boot device for the system. If you are using LVM, you can designate a logical volume as the primary device swap.

Secondary Swap Space

A file system swap is always a secondary swap area. You can also use other device swap areas as secondary swap space. However, it is always a better idea to keep additional swap areas on different physical disk drives .


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net