SunSolve Internal

Infodoc ID   Synopsis   Date
17638   Configuring disk-based swap space on today's large systems, the essentials   16 May 2000

Description Top

Keywords: large swap configuration configuring swapspace space 2gb 
  "enterprise server" disk partition vfstab


These are the biggest gotchas with regard to disk swap space, and they
become even more important on large systems.

For detailed configuration and sizing hints, see these Sunworld Online articles: 

  Swap Space
	  part 1
   http://www.sunworld.com/swol-12-1997/swol-12-insidesolaris.html
	  part 2
   http://www.sunworld.com/swol-01-1998/swol-01-insidesolaris.html
	  Clearing up questions
   http://www.sunworld.com/sunworldonline/swol-07-1998/swol-07-perf.html

   And this book is excellent: -- Adrian Cockcroft and Richard Pettit's new book,
   Sun Performance and Tuning, 2nd Edition.

Here are the some important points that I see many many people tripping over:

When you do swap -l it lists each swap area you have configured on a
disk.  Either a partition or a file.  No single area should exceed 2Gb!

If the primary swap partition exceeds 2gb by even 1 byte, AFTER the
system has rounded in making it, you cannot get a system core dump pair
in case of a panic, on 2.x systems, except for 2.6 with patch 107490 or its
x86 equivalent, or 5.5.1 with 108083. (This is fixed in Solaris 7.)
The "primary" swap partition is the first one in the vfstab file. See Symptoms
& Resolutions doc 6467 for details.

To calculate space, take the number under the "blocks" column and multiply
by 512 (bytes).  This gives you total bytes allocated for that swap area.
You can exceed 2Gb but only the first 2Gb of that area will be used.
So you are wasting disk space if you are over 2Gb for a single area.  To
calculate if you will be able to get a corefile, you should use the calculations
in SRDB 6467 as mentioned above.

Since most of swap is used for paging activities, i.e. in units of `pagesize`,
usually 8k, there is no advantage to a few swap partitions over more 
small ones as long as the total is the same.  The only exception to this
would be specialized applications that need to make huge files in
/tmp.  In that case, you're using the space above 2gb on those swap partitions
for tempfiles, but not for swap.

Say you wanted to add a 9Gb disk to your swap area. You should slice it up 
into 2Gb chunks.  Then put seperate entries in /etc/vfstab for each slice.

You get a very large performance benefit from having these partitions be
on separate disks, however.

In Solaris 7 (2.7) the corefile portion of this will be changing a lot!
See man dumpadm.

See also: 


srdb    16646 No suitable partition from swapvol to set as the dump device
Infodoc 17638 Disk base swap space, the essentials
Infodoc 17731 Running savecore from the command line
srdb     10170     To save crashdump when machine panics at kadb prompt
srdb     17314     How to retrieve a crash dump from a SunScreen SPF-200
infodoc  11816     How to force crashes on Solaris X86 machines
srdb     14530     Can't Crash Dump to Autoclient Swap File
infodoc  13258     Enabling deadman kernel code
infodoc  15484     Limiting the size of a panic dump under Solaris 2.5.1
srdb     15376     Need to install package SUNWtoo on Netra to use savecore
infodoc  17152     watchdog FAQ
infodoc  11827     How to enable savecore under 4.1.X
srdb     14172     How come a system corefile was created when the system did
                   not crash?
bugids 1179011,4215692

(and srdb 6467, savecore is enabled, but a coredump is not produced)

srdb stands for Symptoms and Resolutions DataBase.


      
Applies To Hardware, Operating Systems/Solaris/Solaris 2.x
Attachments (none)

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team