* swap: the amount of disk space set aside to copy physical memory to
when copying it out of RAM

From Jeff
set swap= this is VM - the total address space available to the zone

Bob and I used different definitions of the word 'swap.' Because there are
different definitions out there, I provided mine solely for use in my description.

While we're here, I'll further clarify my earlier response. For the purposes
of the swap cap, when Solaris is counting up the memory pages used by the
processes in a zone, it does not count shared program pages (called 'text
pages' in Unix lingo).

In Solaris, these non-writable pages are shared by all users running the same
program. This reduces physical memory usage and I/O traffic. There is no need
to ever page them out because they already have a copy on disk - the file system.

The same is true for users in the global zone and sparse-root zones - all
users in those environments use the same /usr/bin/ls, and share the same text
pages for that program. When a swap cap has been applied to a zone, those
text pages are not counted, because there is no swap reservation for them.

Therefore: a slightly more accurate way of answering "what is a swap cap" is:
the maximum amount of space used by physical memory and disk-based swap in use
by a zone, *minus* the size of the text pages in use by that zone.

Jason Bradfield wrote:

Thanks Bob and Jeff...
Therefore here is my confusion..

I have 16GB physical and 16GB disk as swap giving me a total of 32G of
virtual memory..
For simplicity I then create 4 zones each with 4G physical and 8G swap
(VM in zone)
From what Jeff confirmed is this will give me 4G physical and 4G disk
as swap.
From Bob I'll have 8G per zone "amount of disk space set aside to
copy physical memory to when copying it out of RAM" but the system
only has 16GB total..

Also if swap is the amount of disk able to be swaped to then why does
swap -s give me 32G when really it should be 16G.

Bob Bownes wrote:

>> Can anyone, in lamens (ex linux) terms explain the differences
between