SlideShare a Scribd company logo
1 of 52
Make your test workload as real
as possible.
How to prepare and test your application.
SESSION ID#:
GLEB OTOCHKIN - PRINCIPAL CONSULTANT
2
Testing is not so simple as it seems to be.
Started to work with data in 1992
At Pythian since 2008
Area of expertise:
- Replication
- Oracle RAC
- Oracle engineered systems
- Virtualization
- Performance tuning
Gleb Otochkin
Principal Consultant
Live in Ottawa
Run a lot.
Run in any weather.
About me
Founded in 1997, Pythian is a global
leader in data consulting and managed
services specializing in planning,
optimizing, and managing mission-
critical data systems
ABOUT PYTHIAN
Top 5% talent worldwide
10 Oracle ACEs
2 Oracle ACE Directors
18 years in business
400+ employees
250+ customers worldwide
Why is it so important?
■ Functionality.
■ Performance.
■ Bugs.
6
AGENDA.
■ Sources for test dataset.
■ Data preparation.
■ Tools for testing.
■ Setting up Jmeter.
■ Apply workload.
■ Monitoring results.
■ QA
7
Select from dual.
■ Artificially generated data.
8
Trying to make it better.
■ Small difference in a way to generate the data.
9
Using subquery factoring.
■ Reducing memory and increase speed in generating data.
10
What can be wrong?
■ Data distribution in artificial dataset.
■ Data in database are different from data using for test.
11
Artificial data.
■ Data distribution in artificial dataset.
12
Real data.
■ Data distribution in real world.
13
Wrong test dataset.
■ For an optimized SQL.
14
Some examples.
■ For an optimized SQL.
15
Some examples.
■ Let’s disable the index.
16
Some examples.
■ For an non-optimized SQL.
17
Sources for test dataset.
■ Sample data based on public sources.
–AWS public data sets.
•https://aws.amazon.com/public-data-sets/
–IMDB resources.
•http://www.imdb.com/interfaces
–Online collections.
•https://github.com/caesar0301/awesome-public-datasets
18
Sources for test dataset.
■ Dataset based on real data.
–Pros:
•Realistic data distribution.
•Proper data types.
•Easy to compare.
–Cons:
•Access to real data sometimes restricted by law.
•Data masking can impact your workload.
•How we can mix our data.
19
How we test our code.
■ Captured real workload.
–RAT.
–HammerDB.
20
Data preparation.
■ Data cooking.
–Get raw data.
–Format.
–Shuffle.
–Upload to your database.
–Prepare it for a tool.
21
Data preparation.
■ Getting the data.
–Download actors list from IMDB.
• http://www.imdb.com/interfaces
[oracle@jmeter01 apache]$ ls -l /media/sf_shared/movie/actors.list
-rwxrwx---. 1 root vboxsf 1047896963 Jan 1 02:32
/media/sf_shared/movie/actors.list
[oracle@jmeter01 apache]$
22
Data preparation.
■ Formatting.
–Create a csv test file
–XML.
–Table in a database.
–Data generator.
23
Data preparation.
■ Formatting using a python script.
[oracle@jmeter01 movie]$ python script.py
Please, enter filename: actors.list
[oracle@jmeter01 movie]$ ls -l result.txt
-rwxrwx---. 1 root vboxsf 867430310 Jan 11 00:03 result.txt
[oracle@jmeter01 movie]$
Email me if you need it: otochkin@pythian.com
24
Data preparation.
■ Shuffle your data.
–Python.
–Perl
–OS standard tools.
–Database tables load/unload.
25
Data preparation.
■ Shuffle your data using a database table.
[oracle@localhost movie]$ cat spool_name.sql
set head off
set pages 0
spool actors_name.txt
select pk_id,name from actors order by dbms_random.random;
spool off
exit;
[oracle@localhost movie]$ nohup sqlplus movie/oracle@orcl
@spool_name.sql &
26
Data preparation.
■ Upload to database.
–Express mode for sql loader.
http://www.oracle.com/technetwork/database/enterprise-
edition/learnmore/sqlldr-express-mode-wp-1991038.pdf
27
Data preparation.
■ Add a unique ID (optional).
28
Tools for testing.
■ RAT.
–Pros.
•Real dataset and load.
•Support.
•Documentation.
–Cons
•Price.
•Don’t have existing load for a brand new project.
http://oracle.com
29
Tools for testing.
■ HammerDB.
–Pros.
•Real dataset and load.
–Cons
•Don’t have existing load for a brand new project.
http://www.hammerdb.com
30
Tools for testing.
■ Swingbench.
–Pros
•Interface
•Lot of options.
–Cons
•Not easy to modify some components.
http://dominicgiles.com/swingbench.html
31
Tools for testing.
■ JMeter.
–Pros
•Functional GUI
•Modules.
•Open source.
•Modifiable.
–Cons.
•Some limits in load manipulation.
32
Tools for testing.
■ Custom code.
–Pros.
•Fully flexible.
–Cons
•Need time for development.
33
Tools for testing.
■ Commercial tools.
–Cost.
•Good interface.
•Functionality.
•Support.
–Cons.
•Cost.
•Flexibility.
•Modifiable.
34
Setting up Jmeter.
■ JMeter setup.
–Prepare a server(s).
–Install OS and Java.
–Download Jmeter.
–Download drivers.
–Unzip.
–Create configuration.
–Test.
35
Setting up Jmeter.
■ Prepare server(s).
–Choose OS/Platform.
•Linux 86x64 works fine.
–Install OS.
•Server installation with Desktop GUI.
–Install packages to support Java.
•JDK or JRE
36
Setting up Jmeter.
■ Downloads Jmeter and drivers.
–Jmeter is accessible on jmeter.apache.org.
•http://jmeter.apache.org
–Oracle JDBC drivers on official site.
•http://www.oracle.com/technetwork/database/features/jdbc/in
dex-091264.html
37
Setting up Jmeter.
■ Prepare software.
–Uncompress the Jmeter.
–Copy Oracle JDBC drivers.
38
Setting up Jmeter.
■ Start Jmeter.
39
Setting up Jmeter.
■ Create a test plan (configuration).
40
Setting up Jmeter.
■ Modify configuration adding connection.
41
Setting up Jmeter.
■ Configure connection.
42
Setting up Jmeter.
■ Adding a simple query.
43
Setting up Jmeter.
■ Choose query and parameters.
44
Setting up Jmeter.
■ Check results using “Results Tree” module.
45
Apply workload.
■ Create a CSV file with parameters.
[oracle@localhost movie]$ cat spool_name.sql
set head off
set pages 0
spool actors_name.txt
select pk_id||','||name from actors order by dbms_random.random;
spool off
exit;
[oracle@localhost movie]$
46
Apply workload.
■ Create a data source for CSV in JMeter.
47
Apply workload.
■ Prepare SQL with parameters.
48
Apply workload.
■ Adjust thread parameters.
49
Monitoring execution.
■ JMeter metrics.
50
If everything has been tested properly...
51
QUESTIONS?
52

More Related Content

Similar to Test workload otochkin_ppt

Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)Klas Berlič Fras
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web ApplicationsJohn McCaffrey
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephenSteve Feldman
 
Impact2014: Practical Performance Troubleshooting
Impact2014: Practical Performance TroubleshootingImpact2014: Practical Performance Troubleshooting
Impact2014: Practical Performance TroubleshootingChris Bailey
 
Managing Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic OptimizingManaging Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic OptimizingDatabricks
 
CI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFSCI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFSScyllaDB
 
Applying Testing Techniques for Big Data and Hadoop
Applying Testing Techniques for Big Data and HadoopApplying Testing Techniques for Big Data and Hadoop
Applying Testing Techniques for Big Data and HadoopMark Johnson
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional testHarry Zheng
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity PlanningMongoDB
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareMaking Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareData Con LA
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRCharlie Gracie
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksSenturus
 
Production ready big ml workflows from zero to hero daniel marcous @ waze
Production ready big ml workflows from zero to hero daniel marcous @ wazeProduction ready big ml workflows from zero to hero daniel marcous @ waze
Production ready big ml workflows from zero to hero daniel marcous @ wazeIdo Shilon
 
Application Performance Management
Application Performance ManagementApplication Performance Management
Application Performance ManagementNoriaki Tatsumi
 
Crossing the data divide
Crossing the data divideCrossing the data divide
Crossing the data divideLars Albertsson
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorScyllaDB
 
QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)Anesthezia
 

Similar to Test workload otochkin_ppt (20)

Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
 
Java one2016
Java one2016Java one2016
Java one2016
 
Impact2014: Practical Performance Troubleshooting
Impact2014: Practical Performance TroubleshootingImpact2014: Practical Performance Troubleshooting
Impact2014: Practical Performance Troubleshooting
 
Managing Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic OptimizingManaging Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic Optimizing
 
CI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFSCI/CD for Data - Building Data Development Environment with lakeFS
CI/CD for Data - Building Data Development Environment with lakeFS
 
Applying Testing Techniques for Big Data and Hadoop
Applying Testing Techniques for Big Data and HadoopApplying Testing Techniques for Big Data and Hadoop
Applying Testing Techniques for Big Data and Hadoop
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional test
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareMaking Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
Production ready big ml workflows from zero to hero daniel marcous @ waze
Production ready big ml workflows from zero to hero daniel marcous @ wazeProduction ready big ml workflows from zero to hero daniel marcous @ waze
Production ready big ml workflows from zero to hero daniel marcous @ waze
 
Application Performance Management
Application Performance ManagementApplication Performance Management
Application Performance Management
 
Crossing the data divide
Crossing the data divideCrossing the data divide
Crossing the data divide
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with Alternator
 
QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)QA Meetup at Signavio (Berlin, 06.06.19)
QA Meetup at Signavio (Berlin, 06.06.19)
 

Recently uploaded

PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxTanveerAhmed817946
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 

Recently uploaded (20)

PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptx
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 

Test workload otochkin_ppt

  • 1. Make your test workload as real as possible. How to prepare and test your application. SESSION ID#: GLEB OTOCHKIN - PRINCIPAL CONSULTANT
  • 2. 2 Testing is not so simple as it seems to be.
  • 3. Started to work with data in 1992 At Pythian since 2008 Area of expertise: - Replication - Oracle RAC - Oracle engineered systems - Virtualization - Performance tuning Gleb Otochkin Principal Consultant
  • 4. Live in Ottawa Run a lot. Run in any weather. About me
  • 5. Founded in 1997, Pythian is a global leader in data consulting and managed services specializing in planning, optimizing, and managing mission- critical data systems ABOUT PYTHIAN Top 5% talent worldwide 10 Oracle ACEs 2 Oracle ACE Directors 18 years in business 400+ employees 250+ customers worldwide
  • 6. Why is it so important? ■ Functionality. ■ Performance. ■ Bugs. 6
  • 7. AGENDA. ■ Sources for test dataset. ■ Data preparation. ■ Tools for testing. ■ Setting up Jmeter. ■ Apply workload. ■ Monitoring results. ■ QA 7
  • 8. Select from dual. ■ Artificially generated data. 8
  • 9. Trying to make it better. ■ Small difference in a way to generate the data. 9
  • 10. Using subquery factoring. ■ Reducing memory and increase speed in generating data. 10
  • 11. What can be wrong? ■ Data distribution in artificial dataset. ■ Data in database are different from data using for test. 11
  • 12. Artificial data. ■ Data distribution in artificial dataset. 12
  • 13. Real data. ■ Data distribution in real world. 13
  • 14. Wrong test dataset. ■ For an optimized SQL. 14
  • 15. Some examples. ■ For an optimized SQL. 15
  • 16. Some examples. ■ Let’s disable the index. 16
  • 17. Some examples. ■ For an non-optimized SQL. 17
  • 18. Sources for test dataset. ■ Sample data based on public sources. –AWS public data sets. •https://aws.amazon.com/public-data-sets/ –IMDB resources. •http://www.imdb.com/interfaces –Online collections. •https://github.com/caesar0301/awesome-public-datasets 18
  • 19. Sources for test dataset. ■ Dataset based on real data. –Pros: •Realistic data distribution. •Proper data types. •Easy to compare. –Cons: •Access to real data sometimes restricted by law. •Data masking can impact your workload. •How we can mix our data. 19
  • 20. How we test our code. ■ Captured real workload. –RAT. –HammerDB. 20
  • 21. Data preparation. ■ Data cooking. –Get raw data. –Format. –Shuffle. –Upload to your database. –Prepare it for a tool. 21
  • 22. Data preparation. ■ Getting the data. –Download actors list from IMDB. • http://www.imdb.com/interfaces [oracle@jmeter01 apache]$ ls -l /media/sf_shared/movie/actors.list -rwxrwx---. 1 root vboxsf 1047896963 Jan 1 02:32 /media/sf_shared/movie/actors.list [oracle@jmeter01 apache]$ 22
  • 23. Data preparation. ■ Formatting. –Create a csv test file –XML. –Table in a database. –Data generator. 23
  • 24. Data preparation. ■ Formatting using a python script. [oracle@jmeter01 movie]$ python script.py Please, enter filename: actors.list [oracle@jmeter01 movie]$ ls -l result.txt -rwxrwx---. 1 root vboxsf 867430310 Jan 11 00:03 result.txt [oracle@jmeter01 movie]$ Email me if you need it: otochkin@pythian.com 24
  • 25. Data preparation. ■ Shuffle your data. –Python. –Perl –OS standard tools. –Database tables load/unload. 25
  • 26. Data preparation. ■ Shuffle your data using a database table. [oracle@localhost movie]$ cat spool_name.sql set head off set pages 0 spool actors_name.txt select pk_id,name from actors order by dbms_random.random; spool off exit; [oracle@localhost movie]$ nohup sqlplus movie/oracle@orcl @spool_name.sql & 26
  • 27. Data preparation. ■ Upload to database. –Express mode for sql loader. http://www.oracle.com/technetwork/database/enterprise- edition/learnmore/sqlldr-express-mode-wp-1991038.pdf 27
  • 28. Data preparation. ■ Add a unique ID (optional). 28
  • 29. Tools for testing. ■ RAT. –Pros. •Real dataset and load. •Support. •Documentation. –Cons •Price. •Don’t have existing load for a brand new project. http://oracle.com 29
  • 30. Tools for testing. ■ HammerDB. –Pros. •Real dataset and load. –Cons •Don’t have existing load for a brand new project. http://www.hammerdb.com 30
  • 31. Tools for testing. ■ Swingbench. –Pros •Interface •Lot of options. –Cons •Not easy to modify some components. http://dominicgiles.com/swingbench.html 31
  • 32. Tools for testing. ■ JMeter. –Pros •Functional GUI •Modules. •Open source. •Modifiable. –Cons. •Some limits in load manipulation. 32
  • 33. Tools for testing. ■ Custom code. –Pros. •Fully flexible. –Cons •Need time for development. 33
  • 34. Tools for testing. ■ Commercial tools. –Cost. •Good interface. •Functionality. •Support. –Cons. •Cost. •Flexibility. •Modifiable. 34
  • 35. Setting up Jmeter. ■ JMeter setup. –Prepare a server(s). –Install OS and Java. –Download Jmeter. –Download drivers. –Unzip. –Create configuration. –Test. 35
  • 36. Setting up Jmeter. ■ Prepare server(s). –Choose OS/Platform. •Linux 86x64 works fine. –Install OS. •Server installation with Desktop GUI. –Install packages to support Java. •JDK or JRE 36
  • 37. Setting up Jmeter. ■ Downloads Jmeter and drivers. –Jmeter is accessible on jmeter.apache.org. •http://jmeter.apache.org –Oracle JDBC drivers on official site. •http://www.oracle.com/technetwork/database/features/jdbc/in dex-091264.html 37
  • 38. Setting up Jmeter. ■ Prepare software. –Uncompress the Jmeter. –Copy Oracle JDBC drivers. 38
  • 39. Setting up Jmeter. ■ Start Jmeter. 39
  • 40. Setting up Jmeter. ■ Create a test plan (configuration). 40
  • 41. Setting up Jmeter. ■ Modify configuration adding connection. 41
  • 42. Setting up Jmeter. ■ Configure connection. 42
  • 43. Setting up Jmeter. ■ Adding a simple query. 43
  • 44. Setting up Jmeter. ■ Choose query and parameters. 44
  • 45. Setting up Jmeter. ■ Check results using “Results Tree” module. 45
  • 46. Apply workload. ■ Create a CSV file with parameters. [oracle@localhost movie]$ cat spool_name.sql set head off set pages 0 spool actors_name.txt select pk_id||','||name from actors order by dbms_random.random; spool off exit; [oracle@localhost movie]$ 46
  • 47. Apply workload. ■ Create a data source for CSV in JMeter. 47
  • 48. Apply workload. ■ Prepare SQL with parameters. 48
  • 49. Apply workload. ■ Adjust thread parameters. 49
  • 51. If everything has been tested properly... 51