Swap space considerations
The standard desktop Solaris machine in Rutgers DCS is configured with
250M of swap space.
This disk partition serves two purposes: swap and
Swap space on disk adds to the amount of virtual memory available to
Files put in
also reside on this partition.
/tmp is a tmpfs
In our standard configuration,
is not a regular local filesystem; it is a
<!#><! was "http://www.cs.rutgers.edu/cgi-bin/man2html.cgi?tmpfs.7">
That is, space for it is allocated out of swap space.
Therefore, swapping and
files compete for the same resource.
tmpfs man page:
tmpfs should be aware of some constraints
involved in mounting a
The resources used by
tmpfs are the same as those
used when commands are executed
(for example, swap space allocation).
This means that large sized
tmpfs files can affect the
amount of space left over for programs to execute.
Likewise, programs requiring large amounts of memory use up
the space available to
Put simply, this means if a program runs the machine out of swap
will fill up,
and if large files fill up
programs will not be able to get any memory to run.
If this restriction becomes a problem for you, a separate disk
partition can be allocated for
Why do we set up /tmp this way?
If it has the potential for leading to the troubles outlined above,
why do we do it at all?
Because space needed for
and swap are variable.
They are both allocated out of the same limited resource (local disk
By sharing the swap partition, if swap usage is low, you get more
space to use in
Conversely, if your
usage is low, you get the space to use for swapping.
Also, since regular disk partitions require waiting for I/O for file
creation/deletion and read/writes, a partition kept in (virtual)
memory is much faster.
Local scratch area or separate /tmp partition
If you need a separate partition for
or need a local scratch directory which is not cleared when the
machine is rebooted, the swap partition can be split in two to get a
The typical size for a local scratch area it 100M.
This leaves only 150M for swap (see restrictions above), but as long
as you're aware of that, it should be no problem.
These local scratch areas are
not backed up.
This page last updated March 4, 1997.