System Administration Guide: Devices and File Systems

Planning for Swap Space

The most important factors in determining swap space size are the requirements of the system's software applications. For example, large applications such as computer-aided design simulators, database management products, transaction monitors, and geologic analysis systems can consume as much as 200–1000 Mbytes of swap space.

Consult your application vendors for swap space requirements for their applications.

If you are unable to determine swap space requirements from your application vendors, use the following general guidelines based on your system type to allocate swap space.

Allocating Swap Space for UFS-Based Systems

After you have assessed the swap requirements of your applications, use the following general guidelines to allocate swap space and dump device size for systems that run a UFS root file system.

System Type 

Swap Space Size 

Dedicated Dump Device Size 

Workstation with about 4 Gbytes of physical memory 

1 Gbyte 

1 Gbyte 

Mid-range server with about 8 Gbytes of physical memory 

2 Gbytes 

2 Gbytes 

High-end server with about 16 to 128 Gbytes of physical memory 

4 Gbytes 

4 Gbytes 

In addition to these general guidelines, consider allocating swap space or disk space for the following:

Allocating Swap Space for ZFS-Based Systems

During an initial installation of a ZFS root file system or a Solaris Live Upgrade from a UFS file system to a ZFS root file system, a swap area is automatically created on a ZFS volume in the ZFS root pool, generally in the 512 Mbyte to 2 Gbyte range. In the case of a UFS to ZFS migration by using Solaris Live Upgrade, a swap volume is created based on the sizes of existing swap areas.

In a ZFS root pool, swap devices are not pre-allocated to fixed-size slices, so it is fairly easy to modify the swap size later.

After you assess the swap requirements of your applications, you can use the default swap size or adjust the swap volume size during an initial installation or after the installation, if necessary.

During an initial installation, the default dump volume size is calculated by the kernel based on dumpadm information and the size of physical memory. During a Live Upgrade migration from a UFS root file system to a ZFS root file system, the default dump volume size is set to half the size of physical memory, between 512 Mbytes and 2 Gbytes, in the ZFS BE.

In a ZFS environment, file systems consume space from the pool so the /var/crash directory will consume what it needs depending on how many crash dumps are saved.

For more information about adjusting swap and dump sizes during or after installation in a ZFS environment, see this site:

http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Resizing_ZFS_Swap_and_Dump_Devices