Technical article 105153

How can I increase swap space without reconfiguring existing divisions?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

I need more swap space. How can I increase swap space without reconfiguring existing divisions?

Cause

The default value presented at install time may not be large enough for some systems, therefore it may be necessary to increase the total amount of swap space available after installing.

Solution

In older releases of SCO UNIX Operating System, this would require
using divvy to adjust the filesystem sizes.  In SCO OpenServer 5,
use `swap -l` to show how much swap is configured.  You will see
output like this:
path               dev  swaplo blocks   free
/dev/swap          1,41      0 100000  68952

Next, create a regular file that can be used for extra swap space using the touch command:

touch /swap1

Then, to add the number of bytes needed, use this swap command:

swap -a /swap1 50000

The command above adds 50000 512 byte blocks to available swap. Adjust that value up or down according to what is needed.

Finally, verify that the extra swap is available to your system:

# swap -l
path               dev  swaplo blocks   free
/dev/swap          1,41      0 100000  68952
/swap1            76,1       0  50000  50000
If you want this extra swap space to be available after a reboot,
add the `swap -a /swap1 50000' command to a startup script
in /etc/rc2.d directory.  For example, you could call it S09AddSwap.
Or, you can edit the /etc/rc.d/8/userdef script.  You may also want
to "zero out" the /swap1 file occasionally in order to keep the
filesize small.  The command `> /swap1' can be put in the userdef
file, along with the other commands, to empty the file at boot time.
NOTE:     This swap configuration will not work to hold panic dump if RAM is
          larger than the original swap division.  To set up an alternate dump
          device, use the dump bootstring and point to a dump device as large
          or larger than the amount of RAM.

See also

swap(ADM) man page;
SCO OpenServer Performance Guide p. 179-80;

SCO OpenServer System Administration Guide p. 385-8.

TA105921, "How can I move swap space to a drive that already has filesystems on it in OpenServer 5.0.x?".

From the Xinuos technical article database, record 105153. Reproduced with permission. The original is at www.sco.com/ta/105153, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.