WAS Advanced Topics

ovalscissorsInternet και Εφαρμογές Web

30 Ιουλ 2012 (πριν από 4 χρόνια και 10 μήνες)

1.070 εμφανίσεις


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
1

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

Unit 11.

WAS Advanced Topics

What You Should Be Able to Do

After completing this unit, you should be able to:



Understand the relationship between WebSphere and WLM



Application Environments



Workload Classification



Classification inheritance



Learn about the performan
ce problems that can occur if WLM is not tuned
correctly for WebSphere



Identify the configuration changes that should be in place for WLM to
provide the desired levels of service

Student Notebook


11
-
2

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.


















Figure
11
-
1

Unit
Objectives

ESNEG1.0

Notes:





Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
3

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.


















Figure
11
-
2

WAS WLM Considerations

ESNEG1.0

Note
s:




©
Copyright IBM Corporation 2005
IBM zSeries
3
WAS WLM
Considerations

Student Notebook


11
-
4

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.


















Figure
11
-
3

Workload
Manager Requirements

ESNEG1.0

Notes:

WebSphere
V5 for z/OS and WLM

WLM Routing services can provide recommendation of which system and server instance to
choose

Application Environments to support each server

Workload classification and goal management

Overview



Workload Manager (WLM) Overview



Componen
t of z/OS that allocates system resources



Operates based on rules you define



You classify similar business applications into workloads



You define importance (priority) goals for each workload



WLM allocates resources based on priority goals

©
Copyright IBM Corporation 2005
IBM zSeries
4
Workload Manager Requirements


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
5

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

WLM Service Clas
ses

Classification rules assign a workload to a Service Class

Service Class priority can be assigned as:



Percentage Response Time (transaction
-
based work)



Velocity (non
-
transaction
-
based work)



Discretionary (low priority)



Supports multiple performance peri
ods with unique priorities





Student Notebook


11
-
6

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.


















Figure
11
-
4

Workload Classification

ESNEG1.0

Notes:

CB (IWEB is gone) subsystem classification rules (option 6 WLM panels)

WLM CB rules use three ways to classify



by generic server name (J2EE server)



by USERID



Transaction class (protocol(s)_http_transaction_class; HTTP Transport Handler)

Enclave



A
"business transaction" without address space boundaries

What is an Enclave?



A "business transaction" without address space boundaries



Two types: depend
e
nt / independ
e
nt



Exist in both goal and compatibility mode



System or sysplex scope



Independent enclave

©
Copyright IBM Corporation 2005
IBM zSeries
5
Workload Classification


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
7

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



T
rue SRM transaction



Separately classified and managed in service class or performance group



Dependent enclaves



Logical extension of an existing address space transaction

Inherits service class/
PGN

from its owner's address space


Student Notebook


11
-
8

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.


















Figure
11
-
5

CB Classification

=
tebpphere=呲ansact楯is
=
bpkb䜱.M
=
Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
6
CB Classification
-
WebSphere Transactions


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
9

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
6

CB Classification

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
7
CB Classification

Student Notebook


11
-
10

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
7

WebSphere Server Instance Structure

ESNEG1.0

Notes:

How WebSphere Servers are structured on z/OS:

WebSphere applicat
ions are deployed within a WebSphere “server” or “cluster” of servers.

Each server “process” consists of a “Controller region” and one or more “Servant regions.”

The Controller regions are started by the Deployment Manager or by an MVS operator
command as
MVS Started Tasks. The Servant regions are started by WLM as needed. (See
the paper called “How to Manage the Number of Servant regions in WebSphere for z/OS
Version 5” on Techdocs.)

WLM Application Environments:



A feature of WLM used by WAS and other subs
ystems



Composed of a Queuing Manager and Server Managers

©
Copyright IBM Corporation 2005
IBM zSeries
8
WebSphere Server Instance Structure


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
11

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

Queuing Manager: Usually only one



Receives work and passes it to WLM



WLM passes work on to a Queue Server

Queue Server (servant): Usually multiple; running in separate address spaces



Accepts work fr
om Queuing Manager and WLM



WLM will start the first one when work arrives



WLM will start/stop others to meet Service Class goals



May be started across the Sysplex



Implemented using Enclaves


Student Notebook


11
-
12

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
8

WLM Application Environment

ESNEG1.0

Notes:

Application Environments:



Named group of similar server programs which execute in
a server address space



Transactions are processed in the server address space under an enclave task in their own
service class



WLM maintains and monitors transaction queues



For each application environment there is one queue per transaction service class



A

variable number of server address spaces is associated with each queue to process
transactions

WLM starts / stops server address spaces based on goal
fulfillment

and demand.


Subsystems that exploit application environments:

WLM Subsystem Type (for
c
lassification)

DB2 Stored Procedures





Depends on caller (such as DDF)

WebSphere







CB (component broker)

Scalable HTTP Server






IWEB

©
Copyright IBM Corporation 2005
IBM zSeries
9
WLM Application Environment


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
13

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

MQSeries Workflow







MQ



Two types of application environments:



Static



Dynamic


Student Notebook


11
-
14

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
9

WLM Application Environments

ESNEG1.0

Notes:

The WLM application environment definition tell
s WLM how it can start servant address
spaces in order to manage the number of servants for the environment. The administrator
defines a name, the subsystem type of the application, the name of the start procedure for the
server address spaces and optional
ly parameters which are passed to the application server.

WLM manages the Servants within the environment (in other words, starts new Servants when
the workload gets heavy; distributes work evenly across available Servants; and so on)

Defining static ApplE
nvs for WAS:



Defined in WebSphere and WLM



Application Environment name = WAS Server name



The subsystem type will always be CB



Must specify the PROC name to be started by WLM



Set number of servers to 'No limit'



May want to specify '1' just during new applic
ation testing

©
Copyright IBM Corporation 2005
IBM zSeries
10
WLM Application Environments


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
15

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



Required if you need more than one server region per system



Required if you have multiple Service Classes for that J2EE Server defined

Service Class Recommendation



Within the type CB classification rules...



Define a default Service Class with

high priority



Avoids problems during classification



Otherwise, default is SYSOTHER (low priority)


Student Notebook


11
-
16

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
10

Using Static Application Environments

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
11
Using Static Application Environments


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
17

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
11

Exploiting Dynamic Application Environments

ESNEG1.0

Notes:

Dynamic Application Environments (DAE):



Provided with fix for APAR OW54622



Definitions made only in WebSphere

Changes SERVER class profiles from:

<subsys_type>.<
subsys_name>.<appl_envir_name>

to:

<subsys_type>.<subsys_name>.<appl_envir_name>.<cell_name>



©
Copyright IBM Corporation 2005
IBM zSeries
12
Exploiting Dynamic Application Environments

Student Notebook


11
-
18

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
12

Transaction Classification and Distribution

ESNEG1.0

Notes:

How WebSphere Transactions are classified in z/OS:

The classification can be based on the following WLM classification criteria:



Server name (CN)


This is the
“server_generic_short_name” or “Cluster Transition Name”
(which is also the application environment name.)



The Server instance name (SI)


This is the “server_specific_short_name”. This is usually
not very useful because you cannot control which server ins
tance runs a transaction within
a cluster.



User ID assigned to the transaction (UI)



Transaction class (TC)
-

This can be assigned to a transaction using the transaction class
mapping file for the server.


©
Copyright IBM Corporation 2005
IBM zSeries
13
Transaction Classification and Distribution


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
19

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
13

Classification of Server Address Spaces

ESNEG1.0

Notes:

Controller Region Classification:

There is a certain am
ount of processing in the WebSphere application control regions to
receive work into the system, manage the HTTP transport handler, classify the work and do
other “housekeeping.” Therefore, control regions should also be classified with a high
importance a
nd velocity goal.

Service Class Assignments for WAS Controllers



Use a high
-
velocity Service Class (such as SYSSTC)



Assign Service Class to all WebSphere related address spaces as



Run
-
time servers



Daemon



Deployment MGR



JMS...



Application servers



J2EE Server

Controllers

©
Copyright IBM Corporation 2005
IBM zSeries
14
Classification of Server Address Spaces

Student Notebook


11
-
20

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

Servant Region Classification:

You should classify the WebSphere Application server regions to a high STC importance

service class so that they can be initialized quickly when WLM determines they are needed.

The service class chosen will also

determine the WLM goal when other work such as Java

Garbage Collection (GC) which are not part of the enclave work that can be running which can

be CPU
-
intensive. Also, any threads that are spun off in the servant regions will not be

running
under the enc
lave will be run under the servant region’s classification. You don’t want

to set it
higher in the service class hierarchy than more important work such as production

WebSphere
enclaves, CICS, or IMS transaction servers.



Use a high
-
velocity Service Class f
or startup



Classify work into Service Class based on



Application Server name (CN)


This is the “server_generic_short_name” or “Cluster

Transition Name” (which is also the application environment name.)



The Server instance name (SI)


This is the “server_s
pecific_short_name”. This is

usually not very useful because you cannot control which server instance runs a
transaction within a cluster.



User ID assigned to the transaction (UI)



Transaction class (TC)
-

This can be assigned to a transaction using the tra
nsaction class
mapping file for the server.



Transaction Service Class should be response
-
time based



Work running under server regions



Subsystem type=CB



Percentage response time goal is recommended



Ex. 80% of transactions < 0.5 seconds



SUBSYS IWEB is gone



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
21

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
14

WLM

=
C污ls楦y楮i=tebpphere=Address=ppaces
=
bpkb䜱.M
=
Notes:

S
TC Classification Rules:

Here is a simple example of the WLM Classification Rules for “STC” type work that covers the
controller and servant regions’ started tasks:



Control Regions
(Daemon, Node Agent, Deployment Manager, Application Servers)



Classify as S
YSSTC or high velocity



Controllers also need high OMVS classification for STEP1 (apply PTF)



Application Server Regions



Classify with velocity goal, high enough to get started quickly



Work is actually classified under the application environment



Garbage Col
lection runs under this service class



Don't make it too high because GC is CPU
-

and storage
-
intensive


©
Copyright IBM Corporation 2005
IBM zSeries
15
WLM
-
Classifying WebSphere Address Spaces

Student Notebook


11
-
22

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

Server Startup

Java garbage collection runs under this classification. Java GC is a CPU and storage intensive
process, so if you set the velocity goal to
o high GC could consume more of the system
resources than desired. On the other hand, if your Java heap is correctly tuned, GC for each
server region should run no more than 5% of the time.

Also, providing proper priority to GC processing is necessary sinc
e other work in the server
region is stopped during much of the time GC is running.

JSP compiles run under this classification. If your system is configured to do these compiles at
run
-
time, setting the velocity goal too low could result in longer delays w
aiting for JSP compiles
to complete.



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
23

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
15

Controller Start
-
up Pro
cedure with WAS V5.0.1

ESNEG1.0

Notes:

Controller Region Classification with Service Level W500104 and later:

An additional step was added to the control region start
-
up procedures (e.g., BBO5ACR) with
PTF UQ79825 (APAR PQ77961) in WAS V5 for z/OS at Serv
ice level W500104. This can
greatly elongate the startup of a control region because the BPXBATCH shell script does not
inherit the service classification of the started task. It will be classified on the OMVS rules and
if not handled appropriately on a bu
sy system will cause multiple minutes delay before
BBOCTL gets control.

The purpose of the additional step is to check the service level delivered, applied, and pending
for WebSphere, and log the results in the following file:

<websphere_root_directory>/<A
ppServer>/properties/service/logs/applyPTF.log

©
Copyright IBM Corporation 2005
IBM zSeries
16
Controller Start
-
up Procedure with WAS V5.0.1

Student Notebook


11
-
24

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

Recommendation
: This can be mitigated by classifying the BPXBATCH step using the WLM
Workload Classification Rules for OMVS work. Use the started task job names (TN in the
WLM panels) to classify this work in
to a sufficiently high service objective. (In our case, we
classify these processes in the 'EBIZ_HI' service class which has an importance of 1, and
Velocity of 50.)

Additional steps added to Control Region Proc:



APPLY step
-

applyPTF.sh checks to see if s
ervice has been applied to WebSphere and
run the "update files" for the new service.



Output written to .../properties/service/logs/applyPTF.out'



Classify server job names with WLM OMVS Classification rules



Apply step performance improved in V.5.0.2



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
25

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
16

WLM

=
C污ls楦y楮i=tebpphere=呲ansact楯is
=
bpkb䜱.M
=
Notes:

Subsystem

type = CB using the following criteria:



Server name (CN)



Server instance name (SI)
-

not useful because instances share work



Userid assigned to the transaction (UI)
-

not useful unless RUNAS=USER



Transaction class (TC)
-

assigned from environment variable
s or a "URI mapping file":



WAS Variables > protocol_http_transactionClass= (default for server or SI)



server > Advanced Settings > Transaction Class Mapping =>
protocol_http_transport_class_mapping_file= (points to HFS file
-

see next foil)



Percentage resp
onse time goal is recommended

©
Copyright IBM Corporation 2005
IBM zSeries
17
WLM
-
Classifying WebSphere Transactions

Student Notebook


11
-
26

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



Example: 80% of trans less than 0.5 seconds (or high velocity default service class)



Avoid multi
-
period goals
-

second and subsequent periods are not aggressively managed.



Response time goals better than velocity goals in a tr
ue production environment.



Velocity goals need to be re
-
calibrated with environmental changes (CPU, workload)



Default is SYSOTHER (discretionary)

Other considerations:



Requests that already have enclave tokens, run under these enclaves, and with the servic
e
class assigned for this enclave.



Example: IHS scalable mode requests are classified by Subsys=IWEB



Control region maintains "internal queues" based on the service class



A server region may switch queues if needed to, based on demand



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
27

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
17

WLM Address Space Management and Replication

ESNEG1.0

Notes:



Application Servers

> server name > Servant Instances



Minimum = nn: the number of server regions to be kept running once those server regions
have initialized



Maximum = nn: the maximum number of server regions that WLM can start in a server
instance



Replication
-

Managing th
e Number of Servant Regions



Admin

console: Appl
ication

Server >> "Server Instances"



Check "Multiple Instances Enabled"



Otherwise, WLM will only start 1 servant region for this application server

©
Copyright IBM Corporation 2005
IBM zSeries
18
WLM Address Space Management and Replication

Student Notebook


11
-
28

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



"Minimum number of Instances"



Useful for avoiding delays to s
tart up server regions



To keep work from coming in thru the protocol handler before SRs are ready, use
protocol_accept_http_work_after_min_srs=1



"Maximum number of Instances"



Useful for limiting excessive server regions during server instance start
-
up or i
f you have
limited real storage.



WLM Static Application Environments not used if DAE APAR OW54622 applied



Caution!

The
m
aximum number must be
greater than or equal to the n
umber of service
classes used by this application's transactions, or
else the
trans
actions will time out.

WLM Ad
d
ress Space Management
and

Replication:



WLM manages performance at Address Space level



SRs are assigned to "internal queues" based on the SC



For each internal queue, WLM will assign a number of SRs equivalent to MIN_SRS (ex
wlm
_minimumSRCount=2)



Each of these SRs will have the same SC



wlm_maximumSRCount=2 may interfere with WLM management



MAX has to be at least MIN*#SCs



#SCs
-

number of expected Service Classes



Consider having MAX=multiple of (MIN_SRS#SCs) to give WLM more room
to work



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
29

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
18

GUI: Setting Min/Max for WAS5

ESNEG1.0

Notes:

The m
aximum should be at least as large as the number of different service classes that might
be used by transactions run in the server. Don’t forget to account for the “default CB
-
type
service class” and enclaves that may originate outside WebSphere servers an
d are classified
by other classification rules such as the “IHS”.


©
Copyright IBM Corporation 2005
IBM zSeries
19
GUI: Setting Min/Max for WAS5

Student Notebook


11
-
30

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
19

Transport Handler Classification

ESNEG1.0

Notes:

Note: If you enable TC mapping via this file WAS will disable your default TC mapping.

Transaction Class Mapping:

Use the admin console under Application Servers > (server
-
name) > Web Container >
Adva
nced Settings > “Transaction Class Mapping” to specify a full path
-
qualified file name
such as /wasv5config/t5was/trMapFile.txt

This sets the following variable in the server’s was.env file:

protocol_http_transport_class_mapping_file=/wasv5config/t5was/trM
apFile.txt


©
Copyright IBM Corporation 2005
IBM zSeries
20
Transport Handler Classification
Transaction Class
Mapping file


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
31

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
20

Details...

ESNEG1.0

Notes:

Note:
You cannot use
wild
-
card characters in the host or port fields unless you use it for the
entire field as shown above.

Syntax
:

TransClassMap host:port uritemplate tclass



host
-

Fully qualified host domain name or *



port
-

Receiving port number or *



uritemplate
-

Matched a
gainst incoming request URL



tclass
-

transaction class name (1
-
8 chars)

Use admin tool to activate mapping file for the application server:



Servers > Application Servers > servername > Web Container > Advanced Settings



Set field "Transaction Class Mapping"

to name of the mapping file displayed as
environment setting in server start up

protocol_http_transport_class_mapping_file=/u/oz85/web/transact.class.txt

©
Copyright IBM Corporation 2005
IBM zSeries
21
Controlled by WebSphere Environment variables:
private_http_transport_class_mapping_round_robin=true
protocol_http_transport_class_mapping_file=/wasv5config/.../AZSR
02ClassMap.txt
Transaction Class Mapping file format:
#TransClassMap <host>:<port> <uritemplate> <tclass list>
TransClassMap www.ibm.com:80 /Webap1/myservlet AZSR021 AZSR02
2 AZSR023
CB Classification Rules:
Qualifier Qualifier Start Service Report
# type name position Class Class
-
---------
--------
--------
--------
--------
Default: CBMED RCBDEFLT
1 CN AZSR02* 1 AZSRO21 RAZSR02
2 . TC . AZSR021 AZSR021 RAZSR02
2 . TC . AZSR022 AZSR022 RAZSR02
2 . TC . AZSR023 AZSR023 RAZSR02
1 CN AZSR%%% 1 CBSLOW RTSTEST
Examples:
a
www.ibm.com
:80/Webap1/myservlet => TCLASS = AZSR021 or AZSR022 or AZSR023
Details...

Student Notebook


11
-
32

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
21

WLM Classification Rules

ESNEG1.0

Notes:

Here is a simple example of the WLM Classification Rules for “CB” type work:

How you define the service objectives (goal
s) for each service class is beyond the scope of
presentation. See the
z/OS MVS Planning: Workload Management

book, SA22
-
7602 or the
WLM page at
http://www.ibm.com/servers/eserver/zseries/zos/wlm/

for
guidance.


©
Copyright IBM Corporation 2005
IBM zSeries
22
WLM Classification Rules


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
33

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
22

Workload Manager Tuning

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
23
Workload Manager Tuning

Daemon, WAS System Servers, Application Control Regions

Classify in high started task service class using STC rules

Application Servant regions

Classify with appropriate velocity goal using STC rules

Affects region start
-
up and garbage collection

WebSphere transactions

Subsystem type = CB

Percentage response time goal is recommended

Ex. 80% of transactions < 0.5 seconds

Provide a high velocity default service class for CB transaction
s

Default is SYSOTHER

Set your Application environment to "No Limit"

Required if you need more than one servant region per app server

Results reported in RMF monitor I workload activity report

Transactions per second

Response times

How much of the machine you are using

Student Notebook


11
-
34

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
23

Transaction Class
-
> Service Class

ESNEG1.0

Notes:



Results reported in RMF monitor I workload activity report



Transactions
per second (not always the same as client tran rate)



Response times (Goal achieved
?)



How much of the machine you are using


OVERVIEW(REPORT)

SYSRPTS(WLMGL(SCPER))

SYSRPTS(WLMGL(RCPER))


©
Copyright IBM Corporation 2005
IBM zSeries
24
Transaction Class

Service Class


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
35

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
24

RMF WLM Report

ESNEG1.0

Notes:

Where is CPU
t
ime
a
ccounted?



Controller
r
egion



Communications
e
nd
-
point:
r
eceives IIOP/HTTP/SSL req
uest



Classifies &
q
ueues
r
equest to WLM queue



WLM



Manages queued requests



Starts/stops
s
erver
r
egions as necessary



Monitors system resources



Manages to installation goals



Server
r
egion



Selects work from WLM for a given
s
ervice
c
lass



Java
g
arbage
c
ollection



JNI calls



Enclaves



J2EE
a
pplication code executes under an enclave (in JVM)



Use SDSF ENClaves panel, or RMF Monitor to display

©
Copyright IBM Corporation 2005
IBM zSeries
25
RMF WLM Report

Student Notebook


11
-
36

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
25

WLM

=
C污ls楦楣at楯i=

=
bxamp汥lN
=
bpkb䜱.M
=
Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
26
WLM

Classification

Example 1


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
37

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figu
re
11
-
26

WLM: Table of Possibilities 1

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
27
WLM: Table of Possibilities 1

Student Notebook


11
-
38

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
27

WL:M

=
C污ls楦楣at楯i=

=
bxamp汥lO
=
bpkb䜱.M
=
Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
28
WLM

Classification

Example 2


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
39

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
28

WLM: Table of Possibilities 2

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
29
WLM: Table of Possibilities 2

Student Notebook


11
-
40

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
29

WAS Threading

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
30
WAS Threading
How many Server Regions?

Only one:

Cannot recycle servers for leaking memory

More than one:

session externalization or session affinity

Too many:

high warm
-
up and JITting times

High storage consumption (1 JVM heap per SR)

Unnecessary resource consumption

Not enough:

Queuing at a high arrival rate (see also # threads)

Not enough heap for keeping sessions in memory

Cannot connect address space to WLM queue


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
41

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
30

One Tra
n or Multiple Trans?

ESNEG1.0

Notes:

You also have a choice of running server regions with an isolation policy of one tran per server
region or multiple trans per server region. From a performance perspective, running more
threads in a server region will
consume less memory but at the cost of thread contention. This
contention is application
-
dependent. We generally recommend the use of multiple trans unless
you run into contention problems.

Note: Control region thread pool size: 25 (fixed).


©
Copyright IBM Corporation 2005
IBM zSeries
31
One Tran or Multiple Trans?

Specify the threads setting using the
server_region_workload_profile. The variables include:

ISOLATE
-
sets the value to 1 thread.

CPUBOUND max((num_of_cpu
-
1),3)

IOBOUND
-
default: min(30,max(5,num_of_cpu * 3))

LONGWAIT
-
40

Student Notebook


11
-
42

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
31

HTTP Session In
-
Memory Issues

ESNEG1.0

Notes:

WebSphere runs on the hot se
rver principle.



Last server to get a request will get the next request



if a thread is available, and



the request is eligible to run in the servant



and queue delay is not significant



Slowly arriving work with long http session duration causes



Requests to
pile up for one servant



Can lead to poorly performing server

WLM will provide PTF which will allow distribution of HTTP requests without affinity to be
spread across the servant regions.

©
Copyright IBM Corporation 2005
IBM zSeries
32
HTTP Session In
-
Memory Issues

WebSphere runs on the hot server
principle.

Last server to get a request will get the next
request

if a thread is available, and

the request is eligible to run in the
servant

and queue delay is not significant

Slowly arriving work with long http session
duration causes

Requests to pile up for one servant

Can lead to poorly performing server

WLM will provide PTF which will allow
distribution of HTTP requests without
affinity to be spread across the servant
regions

WAS provides a less functional solution
using TCLASS URL mappings:

A single url is associated with multiple
TCLASS values

Each TCLASS value gets mapped to a
separate service class

The number of servant regions must be at
least as large as the service classes

Each servant will service a single service
class.

Details in Techdocs database
Server_X
CR
SR
SR
SR
a
b
c
d
e
f
g
h
Server_X
CR
SR
SR
SR
a
b
c
d
e
f
g
h
Desired Distribution
Observed Distribution


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
43

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

WAS provides a less functional solution using TCLASS URL mappings:



a

single URL is associated with multiple TCLASS values



Each TCLASS value gets mapped to a separate service class



The number of servant regions must be at least as large as the service classes



Each servant will service a single service class.

Details are pr
ovided in the Techdocs database.

Student Notebook


11
-
44

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
32

Topic Summary

ESNEG1.0

Note
s:




Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
45

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
33

WAS Performance Monitoring

ESNEG1.0

Notes:

Today, there
are many performance testing options, so there is no single answer to the
question of which tool (or tools) you need. Since performance is important at each stage in the
development lifecycle, we will take a look at the tool requirements and options for ea
ch
development stage.


©
Copyright IBM Corporation 2005
IBM zSeries
34
WAS Performance
Monitoring

Student Notebook


11
-
46

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
34

Administrator Tools/Monitoring

ESNEG1.
0

Notes:

Selecting WebSphere performance tools

Five years ago, in the early days of WebSphere®, if asked what tools to use for debugging
performance problems, the answer was a quick one. In those days, we were lucky to get a
basic profiler to run, and as
far as looking at performance under load, a JVM thread dump or
print statements in the application was the only recourse. Today, the answer is very different;
there are so many options, and every Java™ magazine includes lots of ads for tools promising
to s
olve your performance woes. In addition, IBM's recent acquisitions of Candle® and
Cyanea, both offering WebSphere performance tools, along with existing capabilities from
Tivoli®, Rational®, and WebSphere, likely have you asking the questions: Where do I s
tart,
what tools do I need, and what's the difference between all these products?

Of course, there is no single answer to which tool (or tools) you need, so let's discuss the
different types of tools and the primary problems each tool solves. Since perform
ance is
important at each stage in the development lifecycle, we will look at tool requirements for each
stage, starting with development.

©
Copyright IBM Corporation 2005
IBM zSeries
35
Administrator Tools/Monitoring

Use code profiling to examine path lengths, serialization, memor
y

Development activity

Tivoli Performance Viewer

Observing JVM, thread pools, session size

Useful in testing, but lacks thresholds and alerts for productio
n monitoring

Thread Analyzer

Available via download

Useful for analyzing thread dumps

WebSphere Performance advisors

Useful in tuning

Monitoring tools for production alerts

Tivoli Monitor for Transaction Performance (TMTP), Tivoli SLA

Wily Introscope and other business partner tools

IBM Tivoli OMEGAMON
®
XE for WebSphere
®
Application Server on
OS/390


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
47

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

Choose a good code profiler and use it during application development. A code profiler helps
identify and optimize co
de hot spots, and really helps in understanding object usage and
potential memory leaks. Entering the which
-
code
-
profiler
-
is
-
best debate is a little like the age
-
old which
-
is
-
the
-
best
-
editor debate. The good news is there are now several excellent profiler
s
for use with WebSphere applications. In addition to using a code profiler, J2EE Code
Validation Preview for WebSphere Studio (a new technology preview) can be run against your
application to identify common performance and correctness problems in your im
plementation.

While it is advisable to use profiling, there are some performance problems that are not
typically caught during the development profiling stage. For example, common scalability
problems, including synchronization issues and database contenti
on, do not surface until load
tests. Anticipate these types of problems and invest in a good load test environment, as close
to the production environment as possible. Web site load testing tools are quite mature, with
many excellent options available. Dev
eloping load test scripts is a significant investment, as is
the associated training, so make sure to do a thorough evaluation of your requirements prior to
selecting a load driving tool, as the cost to switch tools later can be high.

Once you move into a
load test environment, you will need views of your application beyond
what traditional profilers provide. Most profilers introduce extremely high performance
overhead, and so are not designed to effectively showcase performance data in a highly
concurrent
environment. Therefore, analyzing performance at this stage requires different
tools. There are a couple of "free" tools available for WebSphere which are sufficient for the
performance testing needs of many load test environments. One is the Tivoli Perfor
mance
Viewer, packaged with WebSphere Application Server, which graphically displays WebSphere
performance data (PMI), including information on WebSphere resources such as pools and
caches, J2EE application metrics such as response time and number of reque
sts, and basic
system metrics. Use this data to determine likely bottleneck locations, tune the system, and to
understand particularly slow and frequently used servlets or EJB components for additional
analysis and profiling.

If the problem remains a myst
ery after analyzing the PMI data, a set of thread dumps of the
JVM often pinpoints synchronized methods and other common problems. WebSphere Thread
Analyzer is available for free download to quickly display your thread dump in a more visually
appealing man
ner.

Tivoli Performance Viewer and thread dumps may be sufficient for what you need but, if not,
there are now extremely powerful tools available from both IBM and other vendors to really
see inside the application under load conditions. These tools, which

I think of as run time
profilers provide detailed views of where time is spent in your application and often include
capabilities to view performance down to specific SQL calls, and also pinpoint the cause of
memory leaks. IBM WebSphere Studio Application

Monitor (also known as Cyanea/One], as
well as partner tools such as Wily Introscope and Quest PerformaSure, provide these types of
capabilities.

While good load testing prevents many production performance problems, production
environments often present
unique challenges
--

especially as changes are introduced to
many different interacting applications and back
-
end systems. Having a good production
monitoring strategy remains a necessity. A Web site monitoring strategy requires the ability to
Student Notebook


11
-
48

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

view perform
ance from the end
-
user perspective, understanding the health of all the systems
within the Web site (including WebSphere Application Server as well as database servers,
directory servers, and other componentry), and understanding the health of the specific

applications. Products such as Tivoli Monitoring for Transaction Performance provide the
capability to monitor your site from the end
-
user perspective, and, in combination with
WebSphere's request metrics instrumentation, also provides views into applicat
ion
performance. For looking at the health of all your servers, consider the capabilities of Tivoli
(Candle) OMEGAMON® or similar vendor solutions. When additional granularity is desired,
products such as WebSphere Studio Application Monitor, which was dis
cussed above for load
testing, are also useful in production environments.

Over time, I expect to see significant integration efforts across Tivoli Monitoring for Transaction

Performance, Candle OMEGAMON, and WebSphere Studio Application Monitor to provide

even stronger WebSphere production monitoring solutions. In addition, we can look forward to
integration with the Rational development and testing solutions to provide more capabilities
across the life cycle. Until then, select the specific products for y
our performance needs, and
look forward to getting even better capabilities in the future.



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
49

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
35

Monitoring

ESNEG1.0

Notes:

The WebSphere® Studio Application Monitor (WSAM) family of products enables customers
to perform in
-
depth problem determination and performance analysis of mission
-
critical
enterprise Java™ 2 Enter
prise Edition (J2EE) applications. The technology allows enterprises
to open the Java "black box" to see what is happening within the applications, as well as track
and analyze their performance and resource consumption patterns over time.

The WSAM data c
ollectors for CICS® and IMS™ allow J2EE administrators, application
support analysts, and subject matter experts to profile "composite" transactions that originate
in J2EE and branch off to CICS or IMS.

WSAM monitors heterogeneous environments and provide
s both high
-
level and detailed views
of transactions, in real
-
time, without requiring the modification of application byte code. WSAM
also captures and stores resource utilization data at a transactional level, to help the IT staff
analyze historical trend
s and plan for future application growth.

©
Copyright IBM Corporation 2005
IBM zSeries
36
Monitoring

Performance Monitoring (diagnosis of performance problems)

WebSphere Studio Application Monitor

Provides instrumentation data for WebSphere Applications

Does not require modification of the application

Gets information from runtime via SMF and JVMPI

Low overhead

Wyle Introscope

Provides instrumentation data for WebSphere Applications

"Power Pack" allows performance data to be gather without modifi
cation of
application

Applications can be instrumented for detailed data gathering

Low overhead

IBM Tivoli OMEGAMON
®
XE for WebSphere
®
Application Server on
OS/390

Application Monitoring (monitor application and take action when
out of norm)

Tivoli Application Monitor

Active design underway between Tivoli and WebSphere development

Monitoring information similar to WSAM, plus additional informat
ion

Able to raise events that allow other Tivoli components to take
appropriate
action

Student Notebook


11
-
50

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

WSAM consists of two components:



A central
Managing Server
receives application information sent by the Data Collectors,
monitors individual or groups of applications, generates operational performance alerts,
s
tores all performance and availability metrics in a database, and manages software levels.



Data Collectors
collect application information and send this information back to the
Managing Server. Data Collectors are available for the WebSphere Application S
erver, for
CICS and for IMS. WSAM monitors transactions spanning J2EE, CICS, and IMS that use
MQ as a transport mechanism.

IBM Tivoli OMEGAMON® XE for WebSphere® Application Server on OS/390:



More than 800 tracked performance metrics enable users to better

understand what is
happening within WebSphere Application Server



Memory management capabilities track JVM garbage collection rates, heap allocation
failures, and memory allocation requests



Workload analysis provides a real
-
time snapshot of overall Web a
pplication performance
--

measuring performance issues across all types of Java components



Performance metrics presented in intuitive charts and tabular data; drill down to uncover
slowdowns, analyze them, and fix them



Workspaces can be customized and st
ored to contain views of critical events and
conditions with user
-
selectable charts and reports



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
51

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
36

WAS Monitoring Tools: The (Near) Future in 2005

ESNEG1.0

Notes:


©
Copyright IBM Corporation 2005
IBM zSeries
37
WAS Monitoring Tools: The (Near) Future in 2005

Student Notebook


11
-
52

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
37

Enabling Tivoli Performance Viewer

ESNEG1.0

Notes:

Tivoli Performance Viewer (which is shipped with WebSphere) is a Graphical User Interface
(GUI) performance monitor for WebSphere Application Server. Tivoli Perfo
rmance Viewer can
connect to a local or to a remote host.

Download the utility package that contains the Tivoli Performance Viewer.

This file can be found in (assuming recommended install directory):
/usr/lpp/zWebSphere/V5R0M0/bin/setup.exe


Download it
as a binary file and execute it on your Windows machine. Only the Windows
platform is supported at this time.

Start the Tivoli Performance Viewer. This can be done in two ways:

©
Copyright IBM Corporation 2005
IBM zSeries
38
Enabling Tivoli Performance Viewer

Uninstall AAT and client development kit

Install "IBM WebSphere Client
Development Kit for z/OS" on your
workstation
(/usr/lpp/zWebSphere/V5R0M0/lib/setup
.exe)

Enable Performance Monitoring

Restart your Server

From Start > Programs > IBM
WebSphere Client Development Kit for
z/OS > Tivoli Performance Viewer

Edit host & port or

c:
\
Programs
\
IBM
\
WebSphereClientDeve
lopment
KitforzOS
\
bin
\
tperfviewer
wtsc59.itso.ibm.com 38880 soap


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
53

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



Start performance monitoring from the command line. Go to the
product_installa
tion_directory
/bin directory and run the tperfviewer script. You can specify
the host and port in Windows NT, 2000, and XP environments as:

tperfviewer.bat
host_name

port_number

connector_type




On the AIX and other UNIX platforms, use

tperfviewer.sh
host_n
ame

port_number

connector_type


For example
:

tperfviewer.bat localhost 8879 SOAP

Click
Start

>
Programs

>
IBM WebSphere

>
Application Server v.50

>
Tivoli Performance
Viewer
. Tivoli Performance Viewer detects which package of WebSphere Application Server
you are using and connects using the default SOAP connector port. If the connection fails, a
dialog is displayed to provide new connection parameters.

You can connect to a remote host or a different port number, by using the command line to
start the perfo
rmance viewer.

Question:

What PMI metrics are the best to use for looking at performance?

Answer:

PMI has over 100 different performance metrics. When looking at performance, I like
to start with four key areas: system performance, application performance,

flow of work
through WebSphere, and JVM performance. My "Top 10" counters for this are:



System performance (you can get these from operating system utilities)



CPU



I/O



Memory (paging)



Application performance



Servlet/EJB response time



Servlet/EJB reques
ts



Live HTTP sessions



Flow of work through WebSphere



Web server threads (you need to get this from the HTTP server, not PMI)



Web container thread pool, ORB thread pool



Database connection pool



JVM performance



JVM heap (for potential memory leaks and g
arbage collection dynamics)


Student Notebook


11
-
54

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
38

Sample Screenshot

ESNEG1.0

Not
es:

You can save all data reported by the Tivoli Performance Viewer in a log file and write the data
in binary format (serialized Java objects) or XML format.

Tivoli Performance Viewer features

Tivoli Performance Viewer is a Java client which retrieves th
e Performance Monitoring
Infrastructure (PMI) data from an application server and displays it in a variety of formats.

You can do the following tasks with the Tivoli Performance Viewer:



View data in real time



Record current data in a log, and replay the l
og later



View data in chart form, allowing visual comparison of multiple counters. Each counter can
be scaled independently to enable meaningful graphs.



View data in tabular form



Compare data for single resources to aggregate data across a node

©
Copyright IBM Corporation 2005
IBM zSeries
39
Sample Screenshot


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
55

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
39

Looking at the JVM

ESNEG1.0

Notes:

Tivoli Performance Viewer provid
es the following summary reports for each application server:

Enterprise beans

Enterprise beans show the total number of method calls, average response time, and
multiplication of total method calls by average response time for all the enterprise beans in

a
table. Enterprise beans provide a sorting feature to help you find which enterprise bean is the
slowest or fastest and which enterprise bean is called most frequently.

EJB Methods

EJB Methods show the total number of method calls, average response time
, and
multiplication of total method calls by average response time for the individual EJB methods in
a table. EJB Methods provide a sorting feature to help you find which EJB method is the
slowest or fastest and which EJB method is called most frequently.


©
Copyright IBM Corporation 2005
IBM zSeries
40
Looking at the JVM

Student Notebook


11
-
56

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

Servlets

Servlets show the total number of requests, average response time, and multiplication of total
requests by average response time for all the servlets in a table. Servlets provide a sorting
feature to help you find which servlet is the slowest o
r fastest and which servlet is called most
frequently.

Web Container Pool

Web Container Pool shows charts of pool size, active threads, average response time, and
throughput in the Web container thread pool

Object Request Broker (ORB) Thread Pool

ORB Threa
d Pool shows charts of pool size, active threads, average response time, and
throughput in the ORB thread pool.

Connection Pool

Connection Pool shows a chart of pool size and pool in use for each data source.



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
57

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
40

Monitoring

ESNEG1.0

Notes:

WebSphere for z/OS always collects certain performance data on z/OS which is av
ailable
through the facilities of z/OS operating system which includes RMF data. Workload
Management (WLM) delay monitoring is always enabled for WebSphere for z/OS. The
Performance Monitoring Infrastructure (PMI) data is a non
-
platform specific WebSphere
set of
API's to do performance monitoring. The System Management facilities (SMF) interface is a
z/OS platform way of collecting performance and accounting information. The PMI and SMF
data are each individually configurable and need to be enabled. WebSphe
re for z/OS relies on
its use of WLM services to collect some of the accounting and performance data. This
information gets presented back to the installation through RMF and RMF
-
written SMF
records.


©
Copyright IBM Corporation 2005
IBM zSeries
41
Monitoring

Student Notebook


11
-
58

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
41

Systems Management Records (SMF)

ESNEG1.0

Notes:

System Management Facilities (SMF) can be enabled to collect and
record system and job
-
related information on the WebSphere Application Server for z/OS system. This information
can be used to bill users, report system reliability, analyze your configuration, schedule work,
identify system resource usage, and perform oth
er performance
-
related tasks that your
organization may require.

You can enable SMF recording for:



Capacity planning, to determine:



How many transactions have run?



What is the average and maximum completion time for methods running on each
server?



How
many clients are attached to each server instance? Of these clients, how many are
active?



Application profiling:



To show an application broken down into its component parts.

©
Copyright IBM Corporation 2005
IBM zSeries
42
Systems Management Records (SMF)


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
59

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



To provide timing information on the application's component parts.



Error repo
rting:



To detect and record soft failures (those that are generated through an exception or
those that are performance
-
related).



To use this error information to trigger an event that will cause an action to occur once a
threshold has been reached


Student Notebook


11
-
60

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
42

SMF Record Type 120

ESNEG1.0

Notes:

Two types of SMF records can
be produced:
activity records

and
interval records
. WebSphere
for z/OS writes a new SMF record type 120 to record system resources used by the
WebSphere workload. There are two types of type 120 records written:



Activity records
-

Gathered as each activity

within a server is completed. An activity is a
logical unit of business function representing a server or user
-
initiated transaction. This
type of record can be used as a basis for charge back and accounting.



Interval records
-

Consist of data gathered at

installation
-
specified intervals that provides
capacity planning and reliability information.

There are six subtypes related to SMF type 120 records.

Activity records and interval records are divided into server, EJB container, and web container
categorie
s.

©
Copyright IBM Corporation 2005
IBM zSeries
43
SMF Record Type 120


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
61

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

Recording can be switched on by individual server, using the administration tool.

Six records can be produced:



The Server Activity record: Subtype 1



The Server Interval record: Subtype 3



The J2EE Container Activity Record: Subtype 5



The J2EE Contain
er Interval Record: Subtype 6



The WebContainer Activity record: Subtype 7



The WebContainer Interval record: Subtype 8


Server activity (subtype 1)
-

1 record = 1 server activity section + 1
-
n Communication
Session sections, 1 record per server



Server Ac
tivity Section
-
some key fields



DNS host name, Server and Server instance names enclave name



User security credential (userid)



Type of activity (single method v
ersu
s transaction), start/stop time



Communication Session section
-

represents one connect sessi
on



Type of session
-

local, local in sysplex, remote, remote +SSL bytes transferred

Server interval (subtype 3)
-

1 record = 1 Server interval section, 1 record per server



Server interval section
-

key fields



DNS host name, Server and Server instance names



Number of global/local transactions in interval



Number of local/remote communication sessions during interval



Number of bytes sent to/from server by local/remote attached clients

J2EE Container activity (subtype 5)
-

1 record = 1 J2EE container activity s
ection + 1 to n

Bean sections + 1
-
n Bean method sections for each Bean section, 1 record per J2EE

container



Container activity section



DNS host name, Server and Server instance names



WLM enclave token



Bean section
-

1 per bean that executed in the containe
r



Last 512 characters of bean name



Bean type
-

CMP entity, BMP entity, Stateless session, Stateful session



bean re
-
entrance policy



Bean method section
-

1 per primary method invoked in the bean



last 1024 characters of method name



Number of times invoked.



A
verage/max response time
-

milliseconds



Bean method transaction policy



List of EJB roles associated with method



ejbLoad:
-

# of invocations, average/max execution time



ejbStore:
-

# of invocations, average/max execution time



ejbActivate:
-

# of invocations
, average/max execution time

Student Notebook


11
-
62

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



ejbPassivate:
-

# of invocations, average/max execution time

J2EE Container interval (subtype 6)
-

1 record = 1J2EE container interval section + 1
-
n

Bean sections + 1
-
n Bean method sections for each Bean, 1 record per J2EE cont
ainer



J2EE container interval section



DNS host name, Server and Server instance names



Start and stop time for interval



Bean section
-

1 per bean that executed in the container
-

SAME AS SUBTYPE 5



Bean method section
-

1 per primary method invoked in the be
an
-

SAME AS

SUBTYPE 5



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
63

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
43

Collecting SMF 120 Records

ESNEG1.0

Notes:

How do you get WebSphere for z/OS to record the new SMF type 120 records?
The answer is
b
y using the administration tool to set environment entries on the server CR configuration. So
you can switch on recording on the basis of individual servers.

If

you look at the example above, the first 4 settings switch the recording types on or off. The
fifth field is the interval length specified for interval recording. However, if you specify 0, the
intervals are synchronized with standard intervals for SMF re
cording.

Apart from the configuration settings, you have some other setup actions:



You need to tell SMF to switch on the capture of type 120 records in SMFPRMxx



Be aware that the current generic SMF interval will be used to control WebSphere for z/OS
inter
val recording as well, unless you set it differently on a specific server



To switch recording on dynamically, use the “T SMF=XX” console command


©
Copyright IBM Corporation 2005
IBM zSeries
44
Collecting SMF 120 Records

Setting collection on at a server level using the WebSphere
administration tool

Select "Servers"
--
> "Application Servers"
--
> Select server off the
list

From Additional Properties, select "Process Definition"

Select CR (control region)

From Additional Properties, select "Environment Entries"

server_SMF_server_activity_enabled = 1

server_SMF_server_interval_enabled = 1

server_SMF_container_activity_enabled = 1

server_SMF_container_interval_enabled = 1

server_SMF_interval_length = n, where n is the length in seconds
.

Note that "n=0" means let SMFPRMxx select interval

Activation in SMF Parms: (SMFPRMxx in PARMLIB)

SYS(TYPE(120(1:3,5)))

INTERVAL(xx) /* in minutes*/

Student Notebook


11
-
64

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.

Recommendations
:



Selecting which record types (& subtypes)



SMF parms: More convenient to control



Activating se
tting per server: Eliminates some overhead



Activity records are voluminous



Use only as necessary (for debugging)



Setting the SMF 120 Recording Interval



Use server setting in WebSphere configuration if there



0 means let SMF interval override (recommended)



O
therwise, use the SMFPRMxx interval



Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
65

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.



















Figure
11
-
44

Time Spent and CPU Activ
ity at Method Level

ESNEG1.0

Notes:

Viewing records with the SMF Browser:

The SMF Browser available on the WebSphere for z/OS download site is able to display
record type 120. To download the SMF Browser, go to:

http://www6.software.ibm.com/dl/websphere20/zosos390
-
p


For further information on the SMF Browser, download the browser package and read the
associated documentation.


©
Copyright IBM Corporation 2005
IBM zSeries
45
Time Spent and CPU Activity at Method Level

Student Notebook


11
-
66

e
-
business for z/OS

© Copyright IBM Corp. 2005


Course materials may not b
e reproduced in whole or in part

without the prior written permission of IBM.



















Figure
11
-
45

Measuring WebSphere Transaction Performance

ESNEG1.0

Notes:

RMF Workload Activity reports and RMF Monitor
III

Performance metrics include transaction rates and response times. Resource utilization
includes CPU, I/O (channel), and storage utilization.

Transactions/second


This is shown in the AVG, MPL, and AVG ENC fields, and is equal to the average number of
enclaves in the period in the RMF Monitor I report below.

Response times


The actual response times of the WLM transaction is shown in the TRANS.
-
TIME SS.TTT'
column n the RMF Monitor I report below and are measured in milliseconds. (This also
includes ti
me waiting on WLM queue.)

©
Copyright IBM Corporation 2005
IBM zSeries
46
Measuring WebSphere Transaction Performance


Student Notebook


© Copyright IBM Corp. 2005

Unit 11. WAS Advanced Topics
11
-
67

Course materials may not be reproduced in whole or in part

without the prior written permission of I
BM.

Service Rates


Resource utilization in CPU service units, and service units per second. The APPL% field