Discussion:
Locking v-disk in storage
(too old to reply)
Rob van der Heij
2006-02-02 10:13:43 UTC
Permalink
On 2/2/06, Stefan Raabe <***@deutsche-boerse.com> wrote:

> Is it possible to lock the pages of a v-disk in storage?

I don't think so. The address space is owned by system. The virtual
machine gets to the contents only through virtiual I/O, not through
address space functions.

What are you trying to achieve by locking the pages? Is it for
performance reasons that you want to do this? If CP could, then it
would be a Bad Idea (TM) especially before z/VM 5.2.

If you want to be able to peek inside the vdisk, you could define the
VDISK in the directory entry of the virtual machine and link to it
from another virtual machine.

Rob
--
Rob van der Heij rvdheij @ gmail.com
Velocity Software, Inc
Rob van der Heij
2006-02-02 11:00:38 UTC
Permalink
On 2/2/06, Stefan Raabe <***@deutsche-boerse.com> wrote:

We should probably take the Linux discussion to the LINUX390 list...

> i thought it could be possible to lock the v-disk because the performact toolkit shows
> "residend" "locked" and "dasd" page numbers on the vdisk display.

Yes, the pages of a VDISK life in the z/VM paging subsystem and rmay
reside in main memory, expanded memory, on disk or nowhere... I
expect pages are locked only when they are involved in an active I/O.

> I already locked the pages of the linux guests because i found it was fighting for
> the storage with the MDC. (i know i can limit the MDC too, but i decided to lock
> the linux guest pages). this reduced paging from several hundred pages per second
> to almost zero. there is only one linux guest in this vm system.

Locking pages for performance is normally a Very Bad Idea (TM). Don't
do that. If you really want, you could steer CP a bit with SET
RESERVED but you probably need to look at other options.

Yes, the defaults for CP typically give too much main memory to MDC.
My preference is to adjust the BIAS on the SET SRM command but some
others set a maximum on MDC.

> i am afraid that this fight for storage starts again when i use v-disk for linux swap (V-DISK vs MDC)

MDC is not effective for swap because Linux will normally not read a
page a 2nd time. Why do you think you have a "fight" for memory?

> Whats the best practice for this? limit MDC size so there is enough "free" storage for the v-disk?

You should probably limit MDC in main memory by a maximum or with a
bias. Set the maximum MDC for XSTORE at 0M.

> While i am on this: what is the recommendation for the linux swap size? same as linux storage size? half of
> linux storage size?

That number is a myth. From what I know it stems from the days where a
bug in BSD prevented you from having more swap space than half the
memory size, so you'd aim for the maximum.

What you want is sufficient "memory" (virtual machine plus swap) to
allow the concurrent processes to allocate virtual memory. The tuning
option you have is to decide what portion of memory you allocate as
virtual machine size. This really depends on the application workload
and the importance (and somewhat on the physical resources that you
have). You probably need to measure that for each type of system and
adjust accordingly.
YMMV I know people who run their 1G virtual machine with 16G of swap space.

Rob
--
Rob van der Heij rvdheij @ gmail.com
Velocity Software, Inc
Rob van der Heij
2006-02-02 11:41:55 UTC
Permalink
On 2/2/06, Stefan Raabe <***@deutsche-boerse.com> wrote:
>
> > Locking pages for performance is normally a Very Bad Idea (TM). Don't
> > do that. If you really want, you could steer CP a bit with SET
> > RESERVED but you probably need to look at other options.
>
> vm has 2gb storage, there is only one linux guest with 1gb storage defined, no other guests
> (except some system stuff like tcpip etc. and some administration users).

That's a pretty uncommon situation with your z/VM real memory larger
than the total virtual memory.

> before i locked the pages of the linux guest i saw paging rates between 200 and 800 per
> second, mdc size was about 1.2gb (if i remember right).
> my first action was to reduce mdc to 600mb, which reduced paging, but vm still paged out
> some pages of the linux guest so i still had some paging when the linux was busy.

I am surprised to see you got so much data eligable for MDC. If that
is due to Linux reading a lot of data then MDC is probably wasted
there, and you could consider to disabled MDC for those disks in
addition to setting the maximum to the point where you like it.

> I thought this was a "very good" setup when you only have to serve one guest to serve,
> and not a "very bad" one?!?

Upto z/VM 5.2, most installations with Linux on z/VM are constrained
under the 2G. Locking pages (or anything that lives under the bar) is
making things worse. You're an exceptional case since you're not
constrained and you have all under the bar.

Rob (happy I did include "normally" with my Bad Idea)
--
Rob van der Heij rvdheij @ gmail.com
Velocity Software, Inc
Rob van der Heij
2006-02-02 11:51:46 UTC
Permalink
On 2/2/06, Stefan Raabe <***@deutsche-boerse.com> wrote:

> thats why i asked again and showed my memory settings, i was hoping that i was not "normal" :-)

ROTFLA. Who am I to judge that ...

I assume you do realize that when you define the virtual machine as 1G
and give it 1G swap space in VDISK, you *are* actually starting to
overcommit memory on z/VM. In that case your original claim does not
hold anymore. And I can certainly point out pages of Linux virtual
machine memory that I care less about than an average VDISK page.

Rob
--
Rob van der Heij rvdheij @ gmail.com
Velocity Software, Inc
Loading...