performance testing batch processing systems · 2015-05-29 · motivation • web-based, real-time...
TRANSCRIPT
![Page 1: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/1.jpg)
Performance Tuning Transaction Processing Systems
Dr. Russ Shermer, CSQA, CSTE
Solving the Software Quality Puzzle Page 1 www.psqtconference.comD
![Page 2: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/2.jpg)
Introduction
• Motivation & background• Comparison of Real-time and Batch• Terminology & theory• Discussion of tools and techniques used• Results summary
Solving the Software Quality Puzzle Page 2 www.psqtconference.comD
![Page 3: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/3.jpg)
Motivation
• Web-based, real-time systems are popular and well-understood
• Backend-transactional systems are still fundamental to most businesses
• The approach to tuning these systems is radically different than for real-time
Solving the Software Quality Puzzle Page 3 www.psqtconference.comD
![Page 4: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/4.jpg)
Background
• Large claims processing implementation • Government-mandated deadline• 3rd Party Java Application Server platform• Politics, vendors, customers…
Solving the Software Quality Puzzle Page 4 www.psqtconference.comD
![Page 5: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/5.jpg)
Challenges
• Ill-defined requirements• Aggressive deadlines• Standard performance products not effective• Limited diagnostic tools• Poor test data• Off-hours environment access• Translation of test results to real results
Solving the Software Quality Puzzle Page 5 www.psqtconference.comD
![Page 6: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/6.jpg)
System Under Test
Transaction
Processor
InputFolder
OutputFolder
Solving the Software Quality Puzzle Page 6 www.psqtconference.comD
![Page 7: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/7.jpg)
Performance Engine
• Homegrown• Generates required data prior to the run• Controlled feed rate• Calculates throughput after the run via file
timestamps
Solving the Software Quality Puzzle Page 7 www.psqtconference.comD
![Page 8: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/8.jpg)
Performance Engine
Transaction
Processor
InputFolder
OutputFolder
System Under Test
template
Generator
transactiontransactiontransactiontransaction
Feeder
Analyzer
Results
Engine
Solving the Software Quality Puzzle Page 8 www.psqtconference.comD
![Page 9: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/9.jpg)
Batch vs. Realtime
• Realtime: response vs. load is the most important statistic
• Batch: overall throughput is the critical value
Solving the Software Quality Puzzle Page 9 www.psqtconference.comD
![Page 10: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/10.jpg)
Latency vs. Throughput
• Real-time systems need to be low-latency• Batch systems need high throughput• Some performance tunings (efficiency types)
improve both• Others improve one at the cost of the other
Solving the Software Quality Puzzle Page 10 www.psqtconference.comD
![Page 11: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/11.jpg)
Processing Metaphor
The obstacle course:
StartFinish
= 1 processing event
Solving the Software Quality Puzzle Page 11 www.psqtconference.comD
![Page 12: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/12.jpg)
Latency
• Time for one event to complete
StartFinish
Solving the Software Quality Puzzle Page 12 www.psqtconference.comD
![Page 13: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/13.jpg)
Throughput
• Number of event completions per second
StartFinish
Solving the Software Quality Puzzle Page 13 www.psqtconference.comD
![Page 14: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/14.jpg)
Pipelining
• Concurrent processing through serialization
StartFinish
Solving the Software Quality Puzzle Page 14 www.psqtconference.comD
![Page 15: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/15.jpg)
Parallelism
Solving the Software Quality Puzzle Page 15 www.psqtconference.comD
Concurrency through duplication:
StartFinish
StartFinish
StartFinish
![Page 16: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/16.jpg)
Tuning Techniques
• Test system was nearly identical to production except for number of CPUs in the application server
• Maximize throughput then:• Tune to make system “CPU bound”
Solving the Software Quality Puzzle Page 16 www.psqtconference.comD
![Page 17: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/17.jpg)
Tuning Techniques
• Increased CPU Utilization– Focused on opening concurrency where needed– Easiest to implement– Had to watch memory consumption
Solving the Software Quality Puzzle Page 17 www.psqtconference.comD
![Page 18: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/18.jpg)
Tuning Techniques
• Database indexing• Oracle Statspack for analysis• Network traffic reduction• Ntop for analysis
Solving the Software Quality Puzzle Page 18 www.psqtconference.comD
![Page 19: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/19.jpg)
Tuning Issues
• Portions of application were batch, others Real-time
• Memory consumption – hit machine and Java limits
• Occasionally exposed software defects when increasing concurrency
Solving the Software Quality Puzzle Page 19 www.psqtconference.comD
![Page 20: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/20.jpg)
Test Execution
• Fully scripted– Shutdown application– Reset application data/database– Apply new tuning configuration– Restart application– Start monitoring– Run transactions– End test– Capture results
Solving the Software Quality Puzzle Page 20 www.psqtconference.comD
![Page 21: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/21.jpg)
Scripting Advantages
• Off-hours performance runs • Required for long test runs• Allowed / required codification of tuning
configuration• Complete test run history archived
Solving the Software Quality Puzzle Page 21 www.psqtconference.comD
![Page 22: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/22.jpg)
Captured Monitoring
• %CPU by process over time (homegrown)• Ntop – network utilization (automated via
wget)• Vmstat – virtual memory statistics• Mpstat – multiprocessor statistics• Iostat (disk I/O statistics)• Statspack – Oracle database statistics
Solving the Software Quality Puzzle Page 22 www.psqtconference.comD
![Page 23: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/23.jpg)
Top last pid: 26214;load averages: 2.64, 2.68, 2.68 13:26:10
128 processes: 124 sleeping, 1 running, 1 zombie, 2 on cpu
CPU states: 45.7% idle, 30.9% user, 21.9% kernel, 1.5% iowait,
0.0% swap
Memory: 16G real, 8417M free, 11G swap in use, 9396M swap free
Solving the Software Quality Puzzle Page 23 www.psqtconference.comD
![Page 24: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/24.jpg)
TopPID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND12922 vitria01 14 0 0 632M 207M cpu/0 171.6H 24.73% java12935 vitria01 13 0 0 159M 115M run 147.6H 14.65% java15594 vitria01 13 59 0 148M 103M sleep 57.5H 13.71% java6210 vitria01 52 59 0 379M 337M sleep 115:21 1.29% java26143 a0cs73 1 2 0 2816K 1704K cpu/1 0:00 0.13% top27629 vtstbot1 1 0 0 1520K 1208K sleep 16:12 0.08% HTVQServ25990 root 1 3 0 3112K 2080K sleep 0:00 0.08% sshd25360 vitria05 12 59 0 151M 67M sleep 0:38 0.06% java7484 vitria03 27 59 0 1043M 603M sleep 8:49 0.02% chanserv17278 vitria05 27 59 0 213M 78M sleep 1:06 0.02% java1094 root 1 0 0 1104K 824K sleep 2:42 0.01% hardmond24759 vitria05 11 59 0 218M 79M sleep 0:12 0.01% java26142 a0cs73 1 0 0 2736K 2224K sleep 0:00 0.01% tcsh26080 a0cs73 1 0 0 1864K 1376K sleep 0:00 0.01% ksh12099 root 10 59 0 32M 9144K sleep 569:39 0.01% ntop
Solving the Software Quality Puzzle Page 24 www.psqtconference.comD
![Page 25: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/25.jpg)
CPU Utilization vs. Time
• Perl script to capture CPU utilization by process
• Requires that each process is “tagged”• Provides a visual CPU workload by
component for a given test run• Another homegrown tool
Solving the Software Quality Puzzle Page 25 www.psqtconference.comD
![Page 26: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/26.jpg)
Solving the Software Quality Puzzle Page 26 www.psqtconference.comD
CPU Utilization
Time
Perc
ent
![Page 27: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/27.jpg)
Ntop
• “Network Top”• Freeware network analyzer• Works by reading IP stack on NIC• Does not perform individual packet analysis• Has a web-based reporting interface• Did I mention it was free?
Solving the Software Quality Puzzle Page 27 www.psqtconference.comD
![Page 28: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/28.jpg)
Ntop
Solving the Software Quality Puzzle Page 28 www.psqtconference.comD
![Page 29: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/29.jpg)
Oracle Statspack
• Allows detailed response analysis• Rates queries and procs by time and usage• Identifies important bottlenecks• Can be run remotely through sqlplus
Solving the Software Quality Puzzle Page 29 www.psqtconference.comD
![Page 30: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/30.jpg)
Oracle Statspack
• Capture a “before” snapshot• Run performance test• Capture an “after” snapshot• Run the statspack analyzer on the two
snapshots• Produces a differential report
Solving the Software Quality Puzzle Page 30 www.psqtconference.comD
![Page 31: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/31.jpg)
Oracle Statspack
Solving the Software Quality Puzzle Page 31 www.psqtconference.comD
Buffer Gets Executions Gets per Exec
--------------- ------------ --------------
301,995,711 781 386,678.2
SELECT RTRIM("A2"."CON_PRV_ID"),"A2"."PAY_…
10,400,496 1,058 9,830.3
SELECT RTRIM("A3"."CON_PRV_ID"),"A2"."IND_…
494,289 1 494,289.0
DECLARE fsdTable VARCHAR2(30) := …
![Page 32: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/32.jpg)
Analysis & Tuning
Solving the Software Quality Puzzle Page 32 www.psqtconference.comD
• Most of the analysis was performed by the performance team
• For one application, the development team was involved in the tuning (great benefit)
• CycleExecute Analyze Tweak
![Page 33: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/33.jpg)
Results
• Routing Application– Created three performance configurations
1. Tiny realtime transactions (low latency)2. Medium high volume transactions (high throughput)3. Low volume, very large transactions (stability)
Solving the Software Quality Puzzle Page 33 www.psqtconference.comD
![Page 34: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/34.jpg)
Results
• Routing Application– In addition to the configuration changes to improve
performance,– Significant database tuning was identified– Code efficiencies were analyzed– Network bottlenecks drove format changes
Solving the Software Quality Puzzle Page 34 www.psqtconference.comD
![Page 35: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/35.jpg)
Results
• Processing application– Concurrency exposed software defects– Database tuning made drastic improvements– Did not achieve the full results desired
Solving the Software Quality Puzzle Page 35 www.psqtconference.comD
![Page 36: Performance Testing Batch Processing Systems · 2015-05-29 · Motivation • Web-based, real-time systems are popular and well-understood • Backend-transactional systems are still](https://reader034.vdocument.in/reader034/viewer/2022042120/5e99ff65d8e4025d701bf132/html5/thumbnails/36.jpg)
Some Lessons Learned
• Automating the execution process improved productivity, reduced timelines and allowed testing on shared hardware
• Codification of results was critical• Cooperation of the development team is key• Easily accessible, dedicated hardware would
have significantly decreased tuning time
Solving the Software Quality Puzzle Page 36 www.psqtconference.comD