On Dec 3, 2007 2:43 PM, Romanowski, John (OFT)
<[EMAIL PROTECTED]> wrote:

> It seems hasty to say that "Because of the Linux algorithm for using
> swap, a VDISK used for swap even a little will eventually be used
> completely".
>  That's the same as saying a linux swap area used even a little will
> eventually be used completely.  Why would linux do that?   That's not
> what my SLES9 guests do.

Maybe our idea of "eventually" is different. ;-)  But yes, in order to
optimize the Linux I/O (reduce seek times, allow I/O's to be merged,
etc) Linux prefers to pick a "virgin" pages in the VDISK rather than
ones that have been freed by swap-in. In the view of z/VM, the freed
pages are still "used" because there is something in them and Linux
has not told VM can forget it. So with some amount of swapping going
on, eventually all pages of the VDISK have been used and VM views them
as in-use, even though Linux still has only a small amount of pages
swapped out.

If your performance monitor shows use
 - linux number of swapped pages
 - vdisk number of resident pages
 - vdisk paging rates
then it becomes very clear that this is happening.

> Now that the swap topic's open again:
>
> What is the basis for advising z/VM VDISK users to have a hierarchy of
> multiple linux swap areas of increasing sizes?   Are there feature(s) of
> the swapping algorithm that make that hierarchy principle optimal?

Exactly the thing above. When you have one big VDISK and the oldest
frames get paged out by VM, every page that Linux selects for swap-out
will first require a page-in by z/VM (useless, because Linux does not
need that data).
Ideally you want your top swap disk to be large enough that it does
not overflow even when Linux needs most memory. And small enough that
it remains resident on z/VM. If there's different levels of
utilization in Linux during the day, you may need multiple levels of
VDISK to fit those requirements. At the beginning of such a level of
high resource requirements you will find z/VM page in the VDISK, but
then it remains resident during the period of high usage.
The idea with the stack of VDISKs in different size (and with
different swap priority) is to get started when you have no clue about
the requirements. When you have measured, you can probably come up
with something smarter.

Rob van der Heij
Velocity Software, Inc
http://velocitysoftware.com/

Reply via email to