Documente Academic
Documente Profesional
Documente Cultură
Exercises / Solutions
Chris Brown/SAP
Jeff Tallman/SAP
Table of Contents
BEFORE YOU START....................................................................................................................................................... 3
2
BEFORE YOU START
Pre-requisites for this hands-on session assumes that the student has the following skills or knowledge:
Note that analysis of SRS Monitor Counter data (aka SRS MC) utilizes an ASE database of approximately 1GB in size
on an ASE instance using a minimum page size of 4KB. Other details of installation and configuration are included in
the release notes. The analysis package with scripts to build the environment can be obtained from
jeff.tallman@sap.com
3
Lab 1: Running Reports & Summary Report
Estimated time: 15 minutes
Objective
In addition, due to timing, the template installation is patched to a later release. This is useful, as sometimes, a patch
can be obtained from the instructors.
Exercise Description
The following description only serves as a short overview to what objectives will be executed during the exercise.
For example:
How to truncate tables of any residual data prior to loading new data (which also drops some indexes to speed load)
How to load new data into the schema
How to update index statistics and recreate indexes dropped for data loading
How to run the summary report and key sections to review
How to run the detail report
4
LAB 1 – SOLUTION
Explanation Screenshot
1) Navigate to student
session files and leave
open:
5
3) Pick ToolsMap Network
Drive. This will cause the
network drive dialog to
popup
6
6) Navigate to Z:\RS_157
folder, shift-right-click on
"setup" and select "Open
command window here" to
open a DOS command
window.
7
8) Make sure "QuickEdit
Mode" is selected (along
with "Insert Mode") (do not
press "OK" yet)
8
11) Now type the DOS
command "dir *.sql" to get
a list of directory contents
of SQL scripts
9
14) Execute the execute the following command:
rs_mc_analysis_procs_157
.sql script isql -Usa -PAbcd1234 -STechEd_ASE -w999 -Drep_analysis_157
-irs_mc_analysis_procs_157.sql
The reason we executed
these three scripts is that
we need to patch the
15.7.1 v1.0 to 15.7.1 v1.0.1
10
16) Use dir to get a list of
directory contents
11
18) Using windows explorer,
navigate to Z:\lab, then
select bcp_in_rssd.bat and
carefully shift-right-click,
select "Send to" and
"TextPad"
12
20) Verify each bcp line
includes a "-Y" option.
13
21) Back in the DOS window,
execute the script. The
output should resemble the
below.
14
22) Execute the execute the following command:
update_statistics.sql script
isql -Usa -PAbcd1234 -STechEd_ASE -w999 -Drep_analysis_157
-iupdate_statistics.sql
Note that any failure along
the path can easily be fixed
by rerunning the
truncate_tables.sql script,
the bcp_in_rssd.bat and
this script again.
15
24) Execute the summary execute the following command:
report via isql specifying an
output file as shown. isql -Usa -PAbcd1234 -STechEd_ASE -w999 -Drep_analysis_157
-isample_run.sql -ostudent_sample.out
**************************************************************
26) Look at the data * *
distribution and routing * Data Distribution & Routing Report Sections
*
*
*
section just below the **************************************************************
config values (line ~250).
Take note of the different Databases in this Replication Server publish data to ...:
databases and how they
source database destination database RRS Name #Tables #Repdef #Subscr
participate (table repdefs & --------------------- ----------------------- ----------- ------- ------- -------
subscriptions vs. DB ASE1.tpcc (103) ASE2.tpcc (102) (local) 17 17 17
repdefs, etc.)
Databases in this Replication Server subscribe to data from ...:
Answer: Note that there is a source & destination database listed - these will be the input to the detail report.
Because there isn't a route, we will use the PDS.PDB , RDS.RDB variant of the detail report If a route existed,
we would need to use the PRS or RRS name as one of either the source or target input parameter instead of the
database for the detail report
16
27) Scroll down through the
report looking at various
sections until you get to
~line 350 where the
backlog summary is listed.
Note that this backlog is
based off of the number of
'active' segments and we
would have to look closely
at the real counter data to
see if an actual backlog
exists.
17
Configured server memory_limit is 2621440MB
30) Note the following output. Maximum memory used was 2002.700MB or 0.000% of memory configured
Does this RS look like it is ExecCmds -> exec_max_cache_size
over-configured for NRMSQMRqst -> exec_nrm_request_limit + exec_sqm_write_request_limit
SQMCmdCach -> sqm_cmd_cache_size
memory_limit? SQMPgCache -> sqm_cache_size * sqm_page_size * block_size * 1024 * 2 (IBQ &
OBQ)
DIST SQT -> dist_sqt_max_cache_size (sqt_max_cache_size)
Note the formulas for MD Request -> md_sqm_write_request_limit
DSI SQT -> dsi_sqt_max_cache_size (sqt_max_cache_size)
calculating memory usage SQT PRS -> sqt_max_prs_size
DSI CDB -> dsi_cdb_max_size
- this should help users
that may only be familiar In addition, other memory allocators such as dsi_cmd_batch_size, dsi_xact_group_size affect the
final total, but are not included in the
(or assuming) that SQT above values (so actual memory allocation/consumption may be higher).
cache is key component
when in reality it is just a Answer: Yes - this is typical when DBA is throwing memory at the problem, but SRS really isn't using it.
small piece. Probably could be reconfigured to only 8GB without impact (reason why this high vs. 2GB will be discussed later)
18
33) Edit the output and re-
enable line numbers if not
enabled. Notice the
Execution syntax section
which lists other optional
parameters that can be
used and the values
(mostly defaults) that were
used for this execution.
Generally, the most
common use is to narrow
in analysis on a smaller
date/time range where a
problem is occurring.
Answer: Yes - from earlier observations about dsi_sqt_max_cache_size being fairly low, we probably should
change it…we just don't know what to yet (later discussion)
19
**************************************************************
36) Look at the * *
throughput/latency report * Throughput Rate/Latency Summary Report Section
*
*
*
(shortened version to **************************************************************
right). How do the
throughput rates compare
across the modules?
Where does the rate first ASE1.tpcc (103) --> ASE2.tpcc (102)
RS Performance Summary (cmds/sec, backlog in MB):
change? Is there any real
latency in the inbound Interval RepAgent SQM(w) Active(i) Backlog(i) Active(o) DSI
-------------- ---------- ---------- ---------- ---------- ---------- ----------
queue? Outbound queue? (1) 14:49:01 0 0 2009 0 73 0
(2) 14:51:34 7553 7561 1 0 1 1395
Why is there a jump in DSI (3) 14:53:04 7451 7472 177 0 59 1874
throughput when inbound (4) 14:54:35 8631 8636 646 0 235 1896
(5) 14:56:06 8143 8150 1087 0 400 1924
finishes? (6) 14:57:37 8495 8502 1549 0 575 1862
(7) 14:59:08 8180 8186 1993 0 743 1922
(8) 15:00:38 7230 7234 2386 0 891 1930
(9) 15:02:09 0 0 2386 0 891 2318
(10) 15:03:40 0 0 2021 0 861 2371
(11) 15:05:11 0 0 1759 0 823 2381
(12) 15:06:42 0 0 1759 0 783 2368
(13) 15:08:12 0 0 1759 0 745 2402
(14) 15:09:43 0 0 1759 0 706 2544
-------------- ---------- ---------- ---------- ---------- ---------- ----------
6187 6193 2386 0 891 2091
Answer: The rates are nearly identical for all modules other than the DSI. This means that everything is keeping
up - except of course - the DSI. The inbound queue doesn't have any latency - just delay in recovering disk
space - we can tell this as the DIST has same rate as inbound writer SQM ….if it didn't then it would be possible
that any backlog would be masked by the size of SQT cache and it would explain the active segments. The
outbound queue has real latency driven by DSI throughput issues. The jump could be due to two possible
causes (1) when the inbound side becomes quiescent, there is more CPU available to outbound threads; (2)
internal contention on STS structures between DSI and DIST, RepAgent User. #2 is more likely with this few
connections
37) You have completed the You are now able to:
exercise!
Load data into the analysis schema
Run a sample report to identify key connections with latency
Review memory utilization from the summary report
Run a detailed report and review throughput/latency summary
20
Lab 2: RepAgent & Inbound Queue SQM Analysis
Estimated time: 10 minutes
Objective
The objective of this exercise is to analyze potential bottlenecks in the RepAgent and inbound queue SQM writer. The
reason this is important is that if there is any latency in this section of processing, it will build up in the primary
database log - which could threaten the availability of the primary database.
Exercise Description
The following description only serves as a short overview to what questions the student will be able to learn during the
exercise that are commonly asked questions in a normal performance situation.
21
EXERCISE 2 – SOLUTION
Explanation Screenshot
**************************************************************
1) Open the earlier detail * *
* RepAgent User (EXEC) Report Section *
report and scroll to first * *
**************************************************************
section (~line 510)…it
should like what is to right
(truncated).
RepAgent Processing Time Summary (time in seconds)
Source Connection: ASE1.tpcc (103)
How much of each sample
Interval RAExecTime ExecutorTm YieldTime WaitMemTm PcktRecvTm ParseTime
interval was RepAgent ------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
(1) 14:49:01 -> 14:51:33 0.000 0.000 0.000 0.000 0.000 0.000
user running? (2) 14:51:34 -> 14:53:03
(3) 14:53:04 -> 14:54:34
28.265
27.706
1.678
1.982
0.000
0.000
0.000
0.000
0.774
0.803
12.982
12.801
(4) 14:54:35 -> 14:56:05 32.333 2.179 0.000 0.000 0.959 14.924
(5) 14:56:06 -> 14:57:36 30.707 2.073 0.000 0.000 0.899 14.151
Is the NRM thread (6) 14:57:37 -> 14:59:07
(7) 14:59:08 -> 15:00:37
32.285
31.591
2.162
2.532
0.000
0.000
0.000
0.000
0.959
0.931
14.956
14.432
enabled? If there was RA (8) 15:00:38 -> 15:02:08
(9) 15:02:09 -> 15:03:39
27.192
0.007
1.816
0.006
0.000
0.000
0.000
0.000
0.792
0.000
12.524
0.000
latency, would it help? (10) 15:03:40 -> 15:05:10
(11) 15:05:11 -> 15:06:41
0.002
0.000
0.002
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
Would async parsing help (12) 15:06:42 -> 15:08:11
(13) 15:08:12 -> 15:09:42
0.000
0.001
0.000
0.001
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
more? What other options (14) 15:09:43 -> 15:10:13
------------------------------
0.000
----------
0.000
----------
0.000
----------
0.000
----------
0.000
----------
0.000
----------
exist for reducing the 210.089 14.431 0.000 0.000 6.117 96.770
22
RepAgent Packet Processing
3) Scroll to the next section Source Connection: ASE1.tpcc (103)
23
Inbound Queue SQM Writes (Blocks)
6) Scroll to the next SQM Source Connection: ASE1.tpcc (103)
writer section (Blocks) Interval BlocksWrtn Blocks/Sec Cmds/Block KBytes/Blk FullWrite TimerPop
------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
near line 820 (1) 14:49:01 -> 14:51:33 0 0.0 0.0 0.00 0 0
(2) 14:51:34 -> 14:53:03 26162 290.6 26.0 15.20 26155 7
(3) 14:53:04 -> 14:54:34 25828 286.9 26.0 15.20 25822 6
(4) 14:54:35 -> 14:56:05 29885 332.0 26.0 15.20 29880 4
What is the current (5) 14:56:06 -> 14:57:36 28159 312.8 26.0 15.20 28151 8
(6) 14:57:37 -> 14:59:07 29441 327.1 25.9 15.20 29434 7
block_size? Is this (7) 14:59:08 -> 15:00:37 28303 314.4 26.0 15.20 28289 14
(8) 15:00:38 -> 15:02:08 25032 278.1 26.0 15.20 25018 14
efficient with respect to (9) 15:02:09 -> 15:03:39 3 0.0 1.3 0.30 0 3
(10) 15:03:40 -> 15:05:10 2 0.0 3.0 0.70 0 2
the number of commands (11) 15:05:11 -> 15:06:41 0 0.0 0.0 0.00 0 0
(12) 15:06:42 -> 15:08:11 0 0.0 0.0 0.00 0 0
per block? Consider the (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0
0
0.0
0.0
0.0
0.0
0.00
0.00
0
0
0
0
blocks per second written ------------------------------ ----------
192815
----------
237.9
----------
20.6
----------
11.93
----------
192749
----------
65
- does this seem high?
What does TimerPop Answers:
refer to? Should we (1) Probably 16K since we are getting ~15.2KB/block
(2) Well…sort of - we have small commands, so we are getting ~26 commands/block…but this is streaming data,
change that so the fewer writes and the more commands per write the better.
configuration? (3) Since there are 64 blocks per segment, we are running about 4 segments per segment - ouch - a bit high.
Both this and #2 could be improved by increasing the block_size to 256 (moving to 32 would only help a little -
we are always looking for significant changes).
(4) blocks that were flushed to disk because the timer controlled by init_sqm_write_delay and
init_sqm_write_max_delay expired before the block filled.
(5) obviously NOT! If a lot of blocks were written due to TimerPop and we were concerned about disk space
utilization efficiency, then we could increase those configurations to allow writes to be delayed longer. In our
case, the writes due to time expiration are negligible - especially during peak processing which is when we
should be considering.
24
Inbound Queue SQM Segment Processing (Time in secs)
8) Scroll down to the Source Connection: ASE1.tpcc (103)
25
Lab 3: SQMR, SQT & DIST Analysis
Objective
The objective of this exercise is to analyze potential bottlenecks in the distribution phase of replication - specifically the
SQMR, SQT and DIST threads and modules. Due to time constraints, we will use an example without routes and the
RSI module will not be analyzed as part of this lab. The reason that analysis of performance for the distribution phase
is important is that if there is any latency in this section of processing, it will build up in the inbound queue - which
eventually could fill and then cause the primary log to start filling.
Exercise Description
The following description only serves as a short overview to what questions the student will be able to learn during the
exercise that are commonly asked questions in a normal performance situation.
26
EXERCISE 3 – SOLUTION
Explanation Screenshot
the SQM Reader starts. Interval Cmds Read Cmds/Sec BlocksRead ReadCached Cached Pct
------------------------------ ---------- ---------- ---------- ---------- ----------
(1) 14:49:01 -> 14:51:33 0 0.0 0 0 0.0
(2) 14:51:34 -> 14:53:03 680387 7559.8 26157 26157 100.0
Is the SQM page cache (3) 14:53:04 -> 14:54:34 672429 7471.4 25828 25828 100.0
(4) 14:54:35 -> 14:56:05 777227 8635.8 29883 29883 100.0
large enough? How can (5) 14:56:06 -> 14:57:36 733341 8148.2 28155 28155 100.0
(6) 14:57:37 -> 14:59:07 765141 8501.5 29440 29440 100.0
we tell?? In what other (7) 14:59:08 -> 15:00:37 736846 8187.1 28304 28304 100.0
(8) 15:00:38 -> 15:02:08 651122 7234.6 25031 25031 100.0
way can we tell the (9) 15:02:09 -> 15:03:39 4 0.0 3 3 100.0
(10) 15:03:40 -> 15:05:10 6 0.0 2 2 100.0
SQT/SQMR is keeping up (11) 15:05:11 -> 15:06:41 0 0.0 0 0 0.0
(12) 15:06:42 -> 15:08:11 0 0.0 0 0 0.0
with the RepAgent User (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0
0
0.0
0.0
0
0
0
0
0.0
0.0
thread? If the SQT was ------------------------------ ----------
5016503
----------
3981.3
----------
192803
----------
192803
----------
64.2
lagging behind by 2GB
would a 8MB SQM page
Answers:
cache help? (1) Yes.
(2) The BlocksReadCached is 100% across the board. Typically anything higher than 70% is easily acceptable.
(3) The SQM read rate (cmds/sec) is very similar
(4) No. The SQM page cache is ONLY effective if the latency does not extend beyond the cache. If latency
overruns the cache, then the cache is essentially useless until such a time the latency is reduced. For this
reason, extremely large page caches are pretty much useless.
27
Inbound SQT Cache Memory
3) Scroll down to line ~1164 Source Connection: ASE1.tpcc (103)
and the first part of the Interval CmdsRead CmdsPerSec CmdMaxTran CmdAvgTran CacheMem
------------------------------ ---------- ---------- ---------- ---------- ----------
SQT cache processing. (1) 14:49:01 -> 14:51:33 0 0.0 0 0 0.00
(2) 14:51:34 -> 14:53:03 680606 7562.2 3 2 58.14
(3) 14:53:04 -> 14:54:34 672542 7472.6 3 2 7.52
(4) 14:54:35 -> 14:56:05 777281 8636.4 4 2 6.66
Notice the command rate. (5) 14:56:06 -> 14:57:36 733595 8151.0 3 2 14.94
(6) 14:57:37 -> 14:59:07 765453 8505.0 4 2 29.27
How does this compare to (7) 14:59:08 -> 15:00:37 737000 8188.8 3 2 56.33
(8) 15:00:38 -> 15:02:08 651219 7235.7 4 2 10.26
RepAgent User? What is (9) 15:02:09 -> 15:03:39 4 0.0 1 1 0.00
(10) 15:03:40 -> 15:05:10 6 0.0 1 1 0.00
the largest transaction (11) 15:05:11 -> 15:06:41 0 0.0 0 0 0.00
(12) 15:06:42 -> 15:08:11 0 0.0 0 0 0.00
size - how many DML (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0
0
0.0
0.0
0
0
0
0
0.00
0.00
commands? What is the ------------------------------ ----------
5017706
----------
3982.2
----------
4
----------
1
----------
58.14
maximum SQT cache
used? How much is Answers:
configured? (1) Nearly identical - of course it is nearly identical with SQMR as it should be as both modules are in the same
thread and there isn't even a buffer between them. Note that if a transaction gets removed from cache, the
SQMR will re-read it - but not the SQT - so there can be differences.
(2) The largest transaction has 2 DML commands plus a begin & commit for 4 commands total
(3) ~58MB
(4) Since there are not connection overrides and server level dist_sqt_max_cache_size is 0, we then use the
server sqt_max_cache_size of 209715200 bytes - or ~200MB….about 4x what we actually used.
28
Inbound SQT Cache Txn Queues
5) Scroll down to ~line 1270 Source Connection: ASE1.tpcc (103)
to the SQT txn queues. Interval OpenTxnAdd TxnRemoved ClosedAdd EmptyTxnRm ReadTxnAdd TruncTrAdd
------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
(1) 14:49:01 -> 14:51:33 0 0 0 0 0 0
(2) 14:51:34 -> 14:53:03 226375 0 226322 40 226157 226375
What can be inferred by (3) 14:53:04 -> 14:54:34 223971 0 223971 2 223942 223971
(4) 14:54:35 -> 14:56:05 258764 0 258767 1 258909 258764
the OpenTxnAdd, (5) 14:56:06 -> 14:57:36 244045 0 244051 2 242389 244045
(6) 14:57:37 -> 14:59:07 254640 0 254634 1 256206 254640
ClosedAdd, ReadTxnAdd (7) 14:59:08 -> 15:00:37 245149 0 245153 2 245113 245149
(8) 15:00:38 -> 15:02:08 216809 0 216660 169 216767 216809
values in interval #1? Are (9) 15:02:09 -> 15:03:39 2 0 1 2 1 2
(10) 15:03:40 -> 15:05:10 4 0 2 2 2 4
any transactions removed (11) 15:05:11 -> 15:06:41 0 0 0 0 0 0
(12) 15:06:42 -> 15:08:11 0 0 0 0 0 0
from cache (any interval)? (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0
0
0
0
0
0
0
0
0
0
0
0
From which queue would ------------------------------ ----------
1669759
----------
0
----------
1669561
----------
221
----------
1669486
----------
1669759
they always be removed?
How do empty Answers:
transactions occur? What (1) While they are nearly identical, ClosedAdd is ~53 less than OpenTxnAdd and ReadTxnAdd is 165 less than
Closed - but if we ignore the 40 empty transactions, we are only 125 transactions behind at the end of the
do more than 1 interval.
OpenTrans imply with (2) No
(3) Open - only OPEN transactions can be removed from cache. Once CLOSED, they remain in cache.
respect to primary (4) It could be due to iso3 activity at primary, procs executed in chain mode - or simply that a transaction with
database? What is the DML occurred, but none of the affected tables were replicated. This is normally not an issue unless extremely
maximum CloseTrans in high and then likely points to either ULC configuration issues (empty txns are not flushed to the txn log in ASE 15
if completely in ULC) or a lot of procedures executed in chain mode.
queue? Is this an issue? (5) It suggest the number of peak concurrent write transactions at the primary during that interval
Why are the number of (6) 1384 transactions - note that this is the peak value.
(7) Yes - Although small in comparison to the 226K transactions processed, it still reflects buffering due to DIST
ReadTrans so much lower latency in reading from the SQT cache. Ideally, we want ClosedTrans to be very low in non-DSI SQT caches.
than ClosedTrans? Why (8) Because once the transaction is read from cache, and all other transactions on the same block have been
read, the transaction can be truncated. As a result, the ReadTrans should always be small in comparison.
is TruncTrans so high? (9) Because a tran is added to the truncate list as soon as the begin tran is read
Answers:
(1) Compares identically to SQT (or nearly so)
(2) Unless using ASE 15.7+ with RS 15.7+ and leveraging repdef elimination, the resulting updates & deletes will
have an inefficient where clause as the where clause will be formed from all non-LOB/CLOB columns
29
DIST SQM Command Cache Utilization
8) Scroll to ~line 1495, DIST Source Connection: ASE1.tpcc (103)
30
Lab 4: Outbound Queue SQM, DSI & DSIEXEC Analysis
Objective
The objective of this exercise is to analyze potential bottlenecks in the delivery phase, including the outbound queue
reader (SQMR), the DSI and its various phases and finally the DSIEXEC. Since this area is the most common area of
performance issues, students should pay close attention to key points highlighted by these exercises to help learn the
techniques that will be useful in isolating the cause of latency in their own environments.
Exercise Description
The following description only serves as a short overview to what questions the student will be able to learn during the
exercise that are commonly asked questions in a normal performance situation.
31
EXERCISE # – SOLUTION
Explanation Screenshot
Outbound (Inbound WS) Queue SQM Reader (DSI/SQMR & WS-DSI/SQMR) Commands
1) Scroll down to ~line 1815 Destination Connection: ASE2.tpcc (102)
and the outbound queue Interval Cmds Read Cmds/Sec BlocksRead ReadCached Cached Pct
------------------------------ ---------- ---------- ---------- ---------- ----------
SQMR reader section. (1) 14:49:01 -> 14:51:33 0 0.0 0 0 0.0
(2) 14:51:34 -> 14:53:03 226795 2519.9 3280 3280 100.0
(3) 14:53:04 -> 14:54:34 168960 1877.3 2441 2441 100.0
(4) 14:54:35 -> 14:56:05 170880 1898.6 2468 2468 100.0
Notice that the as (5) 14:56:06 -> 14:57:36 173373 1926.3 2510 2510 100.0
(6) 14:57:37 -> 14:59:07 167820 1864.6 3370 1518 45.0
combination of page cache (7) 14:59:08 -> 15:00:37 173040 1922.6 4462 538 12.1
(8) 15:00:38 -> 15:02:08 174000 1933.3 4360 700 16.1
and SQT cache keeps (9) 15:02:09 -> 15:03:39 208794 2319.9 5492 538 9.8
(10) 15:03:40 -> 15:05:10 213608 2373.4 5493 685 12.5
physical reads at bay until (11) 15:05:11 -> 15:06:41 214620 2384.6 5445 767 14.1
(12) 15:06:42 -> 15:08:11 213420 2371.3 5520 646 11.7
interval #6 despite the DSI (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
216360
76440
2404.0
2548.0
5395
2072
879
136
16.3
6.6
latency. ------------------------------ ----------
2398110
----------
2024.5
----------
52308
----------
17106
----------
38.8
Outbound (Inbound WS) Queue SQM Reader (DSI/SQMR & WS-DSI/SQMR) Processing (Time in secs)
2) Scroll down to ~line 1880 Destination Connection: ASE2.tpcc (102)
and SQMR processing Interval ReadTime msPerIO ReadTmSeg CacheTime BacklogSeg BacklogMB
------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
times. (1) 14:49:01 -> 14:51:33 0.000 0.0 0.000 0.000 0 0.00
(2) 14:51:34 -> 14:53:03 0.000 0.0 0.000 0.013 102 103.00
(3) 14:53:04 -> 14:54:34 0.000 0.0 0.000 0.009 216 217.00
(4) 14:54:35 -> 14:56:05 0.000 0.0 0.000 0.010 354 355.00
Note that once SQM page (5) 14:56:06 -> 14:57:36 0.000 0.0 0.000 0.012 480 481.00
(6) 14:57:37 -> 14:59:07 0.185 0.0 0.000 0.007 617 618.00
cache is full that the SQMR (7) 14:59:08 -> 15:00:37 0.308 0.0 0.000 0.006 745 746.00
(8) 15:00:38 -> 15:02:08 0.295 0.0 0.000 0.006 859 860.00
has to do physical reads (9) 15:02:09 -> 15:03:39 0.291 0.0 0.000 0.006 853 854.00
(10) 15:03:40 -> 15:05:10 0.269 0.0 0.000 0.006 806 807.00
and hence ReadTime (11) 15:05:11 -> 15:06:41 0.266 0.0 0.000 0.007 758 759.00
(12) 15:06:42 -> 15:08:11 0.254 0.0 0.000 0.006 709 710.00
starts in interval 6 (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0.260
0.101
0.0
0.0
0.000
0.000
0.007
0.002
661
611
662.00
612.00
------------------------------ ---------- ---------- ---------- ---------- ---------- ----------
2.229 0.0 0.000 0.097 859 860.00
Note also the increasing
backlog until it peaks at
interval 8.
Outbound DSI (Inbound WS-DSI) SQT Cache Memory
3) Scroll to ~line 1953 SQT Destination Connection: ASE2.tpcc (102)
32
Outbound DSI (Inbound WS-DSI) SQT Cache Txn Queues
4) Scroll down to ~line 2100 - Destination Connection: ASE2.tpcc (102)
the outbound DSI SQT txn Interval TxnRemoved OpenTrans ClosedTran ReadTrans TruncTrans
------------------------------ ---------- ---------- ---------- ---------- ----------
queues (1) 14:49:01 -> 14:51:33 0 0 0 0 0
(2) 14:51:34 -> 14:53:03 0 1 29376 8 29385
(3) 14:53:04 -> 14:54:34 0 1 34113 20 34134
(4) 14:54:35 -> 14:56:05 0 1 34113 19 34134
Is the SQT cache too large (5) 14:56:06 -> 14:57:36 0 1 34113 20 34134
(6) 14:57:37 -> 14:59:07 0 1 34113 20 34134
or too small or just right? (7) 14:59:08 -> 15:00:37 0 1 34113 20 34134
(8) 15:00:38 -> 15:02:08 0 1 34113 20 34134
Why are there so many (9) 15:02:09 -> 15:03:39 0 1 34114 18 34134
(10) 15:03:40 -> 15:05:10 0 1 34116 16 34133
transactions in the (11) 15:05:11 -> 15:06:41 0 1 34113 20 34134
(12) 15:06:42 -> 15:08:11 0 1 34113 20 34134
CLOSED queue? How (13) 15:08:12 -> 15:09:42
(14) 15:09:43 -> 15:10:13
0
0
1
1
34114
34113
15
20
34130
34134
many transactions should ------------------------------ ----------
0
----------
13
----------
438737
----------
236
----------
438988
there be?
Answers:
(1) Too large
(2) Because DSIEXEC latency is causing the SQT cache to simply buffer pending transactions
(3) Nominally, we only need as many transactions as dsi_max_xacts_in_group or other configurations such as
HVAR require. Generally speaking, more than 100 txns in CLOSED is usually a sign of DSIEXEC latency.
Answers:
(1) Due to processing failures, a group may be retried in smaller groups
Answers:
(1) Because transaction groups were almost always closed due to exceeding dsi_max_xacts_in_group
(2) No.
33
DSIEXEC Command Processing
7) Scroll to line ~2917; Destination Connection: ASE2.tpcc (102)
Answers:
(1) When modifying identity or timestamp columns, RS first hast to send the appropriate set option and then
disable/unset when done with each command. This is because some commands (such as set identity_insert)
are only allowed to be on for a single table at a time.
Answers:
(1) No - together the two total ~44 seconds….fairly small.
(2) If there were custom function strings - especially larger/multi-statement ones
(3) It is measuring strictly the time for ct_send() which is not execution time - just the time to send the commands
to ASSE.
(4) BatchTime and ResultTime - note that ExecCmdTm and TranTime are aggregate values for time counters in
preceding columns (e.g. ExecCmdTime=PrepareTime+SendTime+ResultTime); TranTime=ResultTime +
ExecCmdTime + FinishTranTime + RelTranTime.
34
10) You have completed the You are now able to:
exercise!
Analyze DSI SQT cache and SQMR latency
Isolate when the RDB or RS configs are driving latency
35
© 2013 by SAP AG or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications
may vary.
These materials are provided by SAP AG and its affiliated companies (“SAP Group”) for informational purposes only, without representation or warranty of any kind, and
SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in
the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.
Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark
for additional trademark information and notices.