SHARE DDF Presentation
SHARE DDF Presentation
• Sysplex Workload
Balancing
• Parameters
• Aliases
• Cancel Thread
• Profiling
• WLM
Adrian Burke
DB2 SWAT Team
agburke@us.ibm.com
3
DB2 Connect Configurations
DB2 Connect
Gateway Server
DRDA
DR
DA
1
DA
D R 2
Data
HTTP DRDA
IBM System z / i
3
Application
server DA
4
D R
4
Why Would I use DB2 Connect Server
• Two Phase Commit
• Many transaction managers still require a DB2 Connect Server
for two phase commit if they use a dual transport model
• For example, Tuxedo, Encina
• DB2 and MS DTC are two transaction managers that do not
require a DB2 Connect Server
• Federation
• Homogeneous Federation is possible with DB2 Connect Server
• Use of nicknames to other DB2 and Informix data servers
• Licensing
• DB2 Connect Enterprise Edition with concurrent user licensing
requires DB2 Connect Server configurations only
• Ensure you have license for MSUs and Host (based on # of
subsystems or D.S. group
5
Sysplex Workload Balancing
6
So what are the key points to Pooling and Concentrator
7
Sysplex Workload Balancing
• Sysplex Workload Balancing was supported by the JCC type 4
since V8 and by non-Java since 9.5 FP3
• What level driver came thru the maintenance stream…
• https://www-
304.ibm.com/support/docview.wss?q1=pk77599&rs=0&uid=swg21428742&
cs=utf-8&lang=en&loc=en_US&cc=us
8
SysplexWLB and Failover
• Java and non-Java IBM Data Server drivers can exploit the
sysplex as follows:
• They can connect applications to a DB2 data sharing group as
though it were a single database server, and spread the
workload among the different members, based on server lists
dynamically provided by WLM (connection pooling)
• They can recognize when a member of a DB2 data sharing
group fails and can automatically route new connections to
other members. This is done after commit scope of application,
otherwise connection would simply hang. (connection
concentration)
9
DB2 Inactive Thread - Tuning Considerations
10
Thread Monitoring:
-DIS DDF DETAIL real time information on DBAT and CONDBAT metrics
-------------------------------------------
• enableWLB – True
• Enables WLB and seamless failover.
• Transports allocated based on app connection
• Default max of 1000 transports per member
• ConnectionTimeout – Network. Based on Application QoS
• Connect will fail when expired
• CommandTimeout - Network (.NET 30 seconds). Based on Application
QoS.
• Triggers interrupt when expired.
• maxAcrRetries – 1 time thru server list
• Number of times to retry the connection to the alternate server.
• AcrRetryInterval – 1 second
• Number of seconds to wait between retries.
12
Configuration Best Practices (non-JAVA)
• maxTransportIdleTime - 60 seconds (< than IDTHTOIN)
• Time an unused transport hangs around before being closed.
• maxRefreshInterval – 10 seconds
• Time between updates of WLM weights with server.
• maxTransportWaitTime – 1 second
• Max time an app will wait for a transport to become available.
• memberConnectTimeout - 1 second
• Timeout to be used when communicating with a member in the server
list.
• tcpipKeepAlive – 15 seconds (< than TCPKPLV)
• Timeout for all other communication requests
• interruptprocessingmode – 2
• Controls interrupt behavior. Value=2 drops the connection when
interrupt is triggered.
13
Configuration Best Practices…
• Cursor Hold – we do not want result sets persist across commits so…
• JAVA – setResultHoldability =2
• Non-JAVA – CursorHold=0
14
Key DB2 DDF Parameters
Default – as of
Parameter Possible values V8* Description
MAXDBAT 0-1,999 200* Max remote active DDF Threads - DBM1 Address Space
15
WLM Weight calculation.
There are no configuration parameters related to enabling sysplex WLB on DB2
for z/OS server. When DDF is started, it registers itself to WLM, unless
MAXDBAT is set to 0 or DDF is stopped. In either of these exception cases,
that member’s DDF does not appear in the server list. The drivers use the
updated server list on each transaction to distribute workload to DB2 data
sharing members.
There are several factors WLM will take into account when creating and updating
weights.
1. Displaceable capacity of systems (CPU).
2. Enclave service class achievement (Performance Index, or PI)
WLM goal should be attainable when system is not under stress, which would
result in a PI < 1.
3. Enclave service class queuing.
4. DB2 for z/OS Health
DB2 will report its health factor of 0 to 100 to WLM based on the current
storage consumption within the DBM1 and DIST address spaces.
16
Subsetting configuration
DB2 LOCATION
DB2A z/OS-1
z/OS-2 z/OS-3
DB2B DB2C
Vx,446 Vx,447 2
V1,446 V1,447 Vx, 446 Vx,447
Dispatch
V1,5001 connection V2, 446 V2,447 Vx, 446
to DB2B V3, 446
V2, 5002
V3, 5003
SD: Vx
1 3
Initial connection SRVLST returned (V1:W1, V2:W2)
to DB2A or DB2B
using Vx,447
4
4 Workload balancing to
DB2B using V2,447
3 A list of available DB2 subsystems and their respective weightings are returned
17
Types of location aliases
You can use DSNJU003 (change log inventory) utility to define and
modify as many as 8 static location aliases. Changes to these aliases
require you to stop both DDF and DB2, thus requiring an outage.
You can use the MODIFY DDF command with the ALIAS option to
define and manage as many as 40 location aliases dynamically. You can
start, stop, cancel, modify, and delete dynamic location aliases without
stopping either DDF or DB2. These aliases cannot be defined or
managed by the DSNJU003 utility, and the DSNJU004 utility does not
print any information about them. You have to use the DISPLAY DDF
command to find information about these aliases. Before you can define
dynamic location aliases, DB2 must be started, but DDF may or may not
be started.
18
Dynamic Location Aliases
19
Dynamic Location Aliases
Business Challenge : Block incoming traffic from certain app
servers without disrupting outbound traffic. Setting MAXDBAT=0
blocks all inbound traffic.
Solution: You can associate a location alias with an app server and
use the –MODIFY DDF command to dynamically stop the alias
on a member which blocks incoming traffic from only those app
servers that are connected to that alias without affecting other
inbound or any outbound traffic.
Business Challenge : The default IP addresses provided to the
client drivers may not always be usable to establish connections
for sysplexWLB or failover. So, DBAs want to control the IP
addresses provided to the client drivers.
Solution : You can use the –MODIFY DDF command with the
ALIAS keyword to dynamically specify the IP address that will be
returned in the server list when client connects to the specified
alias.
20
Dynamic Location Aliases - Continued
Examples :
-MODIFY DDF ALIAS(alias1) ADD
Alias1 is created and is stopped by default.
-MODIFY DDF ALIAS(alias1) PORT(9000)
Alias1 is associated with port 9000.
-MODIFY DDF ALIAS(alias1) IPv4(2.2.2.2)
Alias1 is associated with IP address 2.2.2.2
-MODIFY DDF ALIAS(alias1) START
DDF will accept requests for alias1 on port 9000.
When a client connects to alias1, IP address 2.2.2.2
is returned in the server list.
-MODIFY DDF ALIAS(alias1) STOP
Alias1 is stopped and will not accept new requests.
Existing requests will be allowed to complete.
21
Displaying location alias-specific
information
-DISPLAY DDF ALIAS(alias1 ) DETAIL
DSNL080I @ DSNLTDDF DISPLAY DDF (alias1) REPORT FOLLOWS:
DSNL087I ALIAS PORT SECPORT STATUS
DSNL088I ALIAS1 9000 5005 STARTD
DSNL089I MEMBER IPADDR=::2.2.2.2
DSNL089I MEMBER IPADDR=2002:91E:610::1
DSNL096I ADBAT= 100 CONQUED= 1000 TCONS= 1000
DSNL100I LOCATION SERVER LIST:
DSNL101I WT IPADDR IPADDR
DSNL102I 32 ::2.2.2.2 2002:91E:610::1
DSNL102I 32 ::1.2.3.4
DSNL099I DSNLTDDF DISPLAY DDF REPORT COMPLETE
ADBAT : The number of active data base access threads (DBATs) that are currently
processing requests on behalf of the specified alias.
CONQUED : The number of connection requests that are currently queued and waiting to be
serviced on behalf of the specified alias.
TCONS : The total number of remote connections that are currently associated with the
alias.
22
Online CDB (Communications DataBase)
23
Cancel Thread improvements
24
Cancel Thread improvements - Continued
25
System Profiling
26
System Profiling - Continued
27
System Profiling - Continued
What can be monitored ?
1. MONITOR CONNECTIONS
• Monitor the number of concurrent inbound connections allowed.
• Is subject to the filtering on IP address or Domain name only.
2. MONITOR THREAD
• Monitor the number of DBATs that are allowed to be concurrently
active.
• Is supported for all filtering combinations.
3. MONITOR IDLE THREADS
• Monitor the amount of time, in second, that an active server thread
is to be allowed to remain idle.
• Is supported for all filtering combinations.
• You can use history tables to know what profiles and monitoring
functions are in effect.
• When a profile warning or exception occurs, IFCID 402 (stat class 4)
record is written at an interval set in the STATIME zPARM.
28
Profile enhancements
• Catalog table holds profiles
• Can limit:
• Warning only produces
messages
• Exception will take action
• Warning or exception
• DIAG level 1 – 1 message
if any threshold reached
• DIAG level 2 – 1 message
for each unique threshold
surpassed
• Exception for active thread
means 10 can be active, 10
can be in queue, but next one
in gets canceled
• DSNT771I/DSNT772I console
message, reason code 00E3050x
alerts you of warning or exception
29
Protecting DB2
30
Protecting DB2 - continued
31
Location Monitoring
32
Monitoring DBAT’s WLM goals (DB2 10)
• You can use the –DISPLAY THREAD command to find out the following
WLM characteristics associated with the DBAT (separated by a colon)
• Service Class Name – Named group of work with similar goals and
resource requirements.
• Importance Level of the period - The relative importance of the
service class period goal. Only used when goal is not being met. The
value can be 1-5, or DISCRETIONARY(5), 1 being the highest
importance.
• Service class Period Number - Performance periods are available
for work that has variable resource requirements and for which your
goals change as the work uses more resources. You specify a goal,
an importance, and a duration for a performance period. You can
specify up to eight performance periods.
• Performance Index of the service class period - A calculation of
how well work is meeting its goal. For work with response time goals,
PI is the actual divided by goal.
• PI=1 (period is exactly meeting its goal)
• PI<1 (period is beating its goal)
• PI>1 (period is missing its goal)
• DISCRETIONARY = 0.8
33
Example Service Period
Class
34
How Should I Classify Threads:
Work qualifiers are used to help identify a thread
• AI - Accounting Information* •PFG - Perform Group
• CI - Correlation Information* •PK - Package Name *
• CN - Collection Name •PKG - Package Name Group
• CT - Connection Type •PN - Plan Name
• CTG - Connection Type Group •PNG - Plan Name Group
• LU - LU Name •PR - Procedure Name
• LUG - LU Name Group •PX - Sysplex Name
• NET - Net ID •SI - Subsystem Instance
• NETG - Net ID Group •SIG - Subsystem Instance
• PC - Process Name Group
• PF - Perform • SSC - Subsystem Collection
* Popular choices • UI - Userid
• Best Practice
• Ensure all remote workload is less important than DDF address
space
• Classify transactionary work based on response time goals (2
periods), not velocity goals – AND NOT DISCRETIONARY
35
WLM classification example
• This is an example of ill-fated goals
• DDF workload imp. 1 high velocity goal
• DB2 DIST high velocity goal as well
• Deadly embrace as DDF uses resources DB2 needs to accept new work
• DDF response time could go up by factor of 10x, because duration
is not part of the goal nor monitored by WLM with a velocity goal
• If you continuously miss your goal WLM will skip you
36
How do I set Client-info to better classify trans.? Ease of
implementing
• In data source
But static
• All applications sharing data source appear the same to
DB2
• Need source per application to change information
• Calling WLM_SET_CLIENT_INFO stored procedure
• Requires application add a call to proc and populate the
information
• pureQuery product – makes JAVA into static packages
• Having application set it
• WSConnection() method to set correlation and accounting
info
• Create a wrapper from incoming getConnection() string that
dynamically picks up program name and IDs
• Can use Hibernate or Spring class to populate their
intermediary config file
• Could use a wrapper from Websphere that uses
getConnection() and WSSubject class to pull the Requires
information out of the incoming request to populate client coding, but
info flexible
37
Example of Creating a DDF Service Class for a Specific
Application Continued . . .
• If a service class of ‘PC=AdrianBurke’, or ‘CI=agb_v9’ had been
created and the application code contained
WSConnection.CLIENT_APPLICATION_NAME, “agb_v9”, or
connectionProperties.put("clientProgramName", "agb_v9"), and
connectionProperties.put("clientApplicationInformation",
“AdrianBurke") in connection string: then the snapshot of the enclave
screen would show the following details:
38
Distributed Correlation Enhancements
Previously, the correlation token used to correlate work between the client and
server was only externalized in DB2 accounting data and not in DB2
messages making it impossible for users to correlate message related
failures to the remote client application that is involved in the failure.
In DB2 10, the THREAD-INFO description for key messages will include this
token, which will be enclosed in '<‘ and '>' characters, and contains three
components,
separated by a period:
• A 3 to 39 character IP address.
• A 1 to 8 character port address.
• A 12 character unique identifier.
Example :
DSNL027I > SERVER DISTRIBUTED AGENT WITH
LUWID=G91702F8.P853.100629180434=4
THREAD-INFO=ADMF001:mask:admf001:db2bp:*:*:*:
<9.23.2.248.38995.100629180434>
RECEIVED ABEND=04E
FOR REASON=00D3001A
39
Optional Domain name
• In v10, for users that specify fixed IP addresses in the DB2 BSDS, a
domain name is no longer required to be configured to process TCP/IP
requests.
40
Whats new with remote threads in DB2 10…
• High Performance DBATs is a new type of distributed thread
(some customershave seen XX% perf. Gain)
• Packages must be bound with RELEASE(DEALLOCATE) to get
reuse for same connection and -MODIFY DDF PKGREL(BNDOPT)
must also be in effect
• Since V6 they have been RELEASE(COMMIT)
• Now DBAT and client connection will remain active together
• After the Hi-Perf DBAT has been reused 200 times
• DBAT will be purged and client connection will then go inactive
• If Hi-Perf DBAT has not received new work for POOLINAC time
• DBAT will be purged and the connection will go inactive
42
Extras……
• No-Charge workshop (email me)
• System z Synergy workshop focused on Websphere (LUW or
z) and DB2 for z/OS, settings, best practices, lessons learned
43
Questions???
Adrian Burke
DB2 SWAT Team SVL Lab
agburke@us.ibm.com
44