On 10/12/07, Romanowski, John (OFT) <[EMAIL PROTECTED]> wrote:

> I'm not familiar with fine points of linux swapping:
> you imply linux reports some previously used but now unneeded swap disk
> blocks as allocated even though they could be freed? That behavior

Correct. The Linux idea behind that is to minimize head seeks on the
disk and avoid fragmentation (so you can swap out many pages in one
I/O to consecutive blocks on disk).

And if you think those issues don't apply to VDISK, you're right too.
The VDISK has no head movement to worry about. Actually, no mainframe
DASD these days has head movement you can worry about. The Linux s390
device drivers do have the self-imposed restriction of only reading or
writing consecutive blocks, so that does mean it will build larger I/O
requests when space is not fragmented. In a shared environment this is
a trade-off, and doing large I/O is not necessarily a good thing.

> matches my recent experience swapoff-ing a 80% full swap partition and
> not seeing its blocks end up allocated on remaining swap partitions when
> swapoff finishes.

That's caused by something else. When a page is swapped back in but
not modified yet by the program, the copy is both in memory and on
swap. When you swapoff the device, those pages don't have to be
swapped in again because they already are in. The rest of the pages
does need to be swapped in, but to make room for that, Linux can
probably drop cached data. So you might see that amount drop when you
swapoff.

>   That will make discovering my maximum swap requirement even harder as
> the reported swap blocks allocated can be much greater than swap blocks
> needed.

Right. So you make an educated guess for what you think you need, and
define an additional large VDISK as the next level of swap. You use
the performance monitor to alert you when that next level of swap gets
used (which means you overflowed the first one, so that should be made
larger).
You also need other metrics from your performance monitor to
understand when the first swap disk is too large (that's when z/VM
needs to page-in the VDISK frequently). So the right size of swap disk
depends both on application requirements and on available resources in
z/VM. Because a change in VDISK size changes the behavior of the
application, you can not really predict these things. You need to
measure and act on that.

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

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to