> I've always been under the impression that the best configuration for
> Linux/390 guest swap is to make the virtual machine storage
> as large as it
> SHOULD need under normal operating conditions, and give the guest
> practically NO swap.

Not quite. The idea is to keep the virtual machine size as small as
possible, *and* allow Linux to swap via the most efficient method
possible if it's necessary. Linux dies horribly if it hits a burst of
activity and can't find enough swap to handle the load.

> Since Linux wants to "exploit" his
> memory and swap
> space as if he were a "stand alone" machine - the intent is
> to not give him
> more than he absolutely needs to prevent him from doing
> "clever things" with
> it, no?

True for virtual memory. Swap gets used when no virtual memory is
available, so you need to make sure that if you constrain the machine by
reducing virtual machine size, then you also make sure that the virtual
machine has sufficient swap to survive a sudden demand for virtual
storage within the Linux machine.

Since you need usage information to size that, if you start with a
relatively large amount of swap and a small virtual machine (let's say,
using my rule of thumb, a 64M virtual machine, and 142M of swap), then
you should be able to quickly determine what the average swap
utilization will be under load. You can then either adjust the virtual
machine size to avoid swapping, or you can accept some amount of
swapping and keep the maximum working set size for the virtual machine
small, and expend the real storage on VDISK for swap, which gets
allocated only if it's really needed.

I'm sure that others will have different views, but I tend to try for
solutions that allow CP to do as much optimization as possible without
Linux having to know or care about it, and I think that allowing the
Linux guests to swap to VDISK is overall somewhat more efficient use of
resources, as VDISK pages are pageable, and CP can coordinate that
process much more efficiently than Linux does. Increasing the virtual
machine size tends to make CP scheduling more awkward in that it
essentially permanently increases the WSS committed to that virtual
machine (and allows Linux to try to be clever, but end up failing and
increasing the WSS to the maximum possible for that virtual machine
size). VDISK is allocated only when actually needed, released when not
in use, and is a pooled resource that CP can manage across virtual
machine boundaries.

Another note: note that the 2x+32M is a *starting* figure, which gets
adjusted over time. If you start with too much, you'll be able to get a
better read on what you really need w/o risking a crash-and-burn
scenario if you run out. This will never be a "set and forget" deal --
you'll need frequent measurement to keep this balanced. In a lot of real
cases, if I have a 64M machine, I rarely end up with more than about 16M
of swap based on actual measurement of what the applications *do*, but I
have no way of knowing that until I get some real data on it. On the
other hand, if I know the machine will be running a piggy app like WAS
which will have a large WSS, then the extra virtual machine size is
probably worth it (and that machine will probably need the swap
anyway...8-)).

-- db

----------------------------------------------------------------------
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