Besides all the things that Bill mentioned, which as far as I see can
be activated by LE run time options, there is one additional technique
which requires some input into the ENV string (environment), which is
also a runtime parameter; you can replace the normal LE heap manager
by the so called "heap manager for memory checks"; its module name
is CEL4MCHK.
This heap manager does some bookkeeping of all storage allocation requests
together with the call stack that was active at the time of the allocation
and informs you at the end of the process (when the LE enclave stop) about
all storage areas that have been allocated but not freed. This can be
very helpful
if your application consumes storage over time and gets in trouble because
storage is never freed (for example in an online region or in a stored
procedure
which stays resident etc.; but even batch programs with large input may
have
a problem).
I detected and solved a lot of storage problems in applications at several
customers' sites of mine, using this technique. You will need some
program that
compresses the generated reports and collects the (many) allocations which
have the same origin and counts them, so that you are able to recognize
the critical places where the allocations come from. I've done this,
using a
REXX program which captures the output from CEL4MCHK in some large stems
and then does some analyzing on them (which areas remain "unfreed" most
often,
which have the largest sizes etc.).
See the book "LE Vendor Interfaces" for details; there is a (short)
description
of CEL4MCHK and how to use it. If you need more information (or
consulting),
contact me offline.
Like with the other techniques: don't use this in production; it will
significantly
slow you application (of course) because of the bookkeeping activities
at every
single storage allocation.
Very important: I discovered recently, that the parameter ALL31(ON) is
needed
in the LE parms, otherwise the LE enclave will start looping already at
startup
(this was a problem which I first had to solve, before I could use CEL4MCHK
at my actual customer ... no hint in the manuals, but with ALL31(ON), all
worked well).
Kind regards
Bernd
Am 23.07.2016 um 17:14 schrieb Bill Woodger:
Here's the link I failed to include, the suggested reading:
http://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ceeam00/clsthp.htm
An overview, but, for the willing reader, follow the references and go as deep
as you want.
LE can report on storage used, and storage (like heap) definitions can be tuned
from the reports. You don't (you can, occasionally, but probably mostly not at
all) run in Production with the reporting on, due to overheads. It is an LE
run-time option, so no recompiles or anything needed.
You can use the report to make the initial heap allocation sufficient for the
enclave. Then you only get one OS request to get the storage, and LE managing
the storage thus acquired. When servicing more complex memory requirements
(non-batch, large amounts of memory, need for release) the definitions can be
more complex.
If you have some heap which gets corrupted, you can get LE to check everything
as it goes along, and tell you as soon as something goes awry. Effective way of
finding out around about where it gets tangled. You do this only when you know
you already have a problem. It heavily impacts performance of heap usage,
checking each reference made to heap storage to confirm all is still consistent
for LE. Again LE run-time option.
Don't use all this type of stuff regularly, just because you can. These things
are not proactive monitoring tools, but analysis (storage report) and
determination (heap busted) tools. Know what is available, so you know what to
use when/if needed.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN