SlideShare a Scribd company logo
Thank you to our Sponsors 
Media Sponsor:
Performance Tuning 
in the trenches
First the request… 
It needs to be fast 
It needs to be faster than the old system 
We’ll let you know if it’s fast enough
Then the timeline… 
By the end of the week 
Before production 
Yesterday
Why is this a problem?
Specific Requirements are Needed 
“Testing” implies pass/fail 
Without a specific metric pass/fail cannot be determined 
Most Performance “Testing” is Performance Profiling
Time Consuming Process 
Infrastructure needs planning 
Data scenarios need building 
Performance runs need to be conducted 
Results need to be analyzed 
Code needs to be analyzed 
Architecture needs to be evaluated 
Changes need to be made 
System testing needs to be done
I was lucky 
• Performance was a primary concern from the start of the 
coding process 
• Dedicated time was provided well in advance of delivery 
• We had a *very* rough metric to shoot for, but it was 
quantified
First we need infrastructure 
• What does your system use? 
• What other software will be installed on those systems? 
• What network infrastructure may be involved?
What I had… 
• VM with production OS 
• Visual Studio 
• 4-6 other developers using this VM for day-to-day coding 
• CI software 
• Shared SQL Server database 
• Location of all developer testing
What that meant 
• No server load consistency between test runs 
• Usage spikes on those servers 
• Data changed between test runs 
• SQL Server load changed between, and during, test runs 
• Installation of ‘unknown’ software versions 
• Test-to-Test comparisons were hard to evaluate 
• Instead of just one run, I’d have to do many runs to get an 
‘average’
What would have been nice 
• Complete server isolation 
• VM configured exactly as the production VM 
• VM configuration 
• Software configuration 
• Software installed 
• Production scale data
Now we need software
Now we see the results
What does it mean? 
I guarantee you that your problems are not where you thought 
they were. 
Problems will blend into the rest of your code.
Not where you think it is 
loadedPerBatch.Where(x=>x.Name == someLoopValue) 
Up to 10% of our execution time 
dictLoadedPerBatch.ContainKey(someLoopValue)
What does it mean?
What did we find? 
It took longer to load a zip file into memory than to unzip it. 
Copying multi-gigabyte files multiple times takes a long time. 
Opening and reading these files was amazingly fast. 
We hadn’t fully conceptualized the scale of the nested looping. 
SQL INSERT statements were very slow.
Led us to the next tool
Profiling Data Access 
1. Log SQL being executed 
2. Copy statements into Management Studio 
3. View the Execution Plan 
4. Review indexes used, indexes missed, indexes updated 
5. Note the index suggestions
Led us to the next tool
Benefits 
• Only changing indexes limited retesting of logic 
• One change == re-run of tests
What I learned 
• INSERT statements are fast, but updating indexes can kill 
performance when 100k operations take place 
• The simplest SELECT may not be picking up an index
We didn’t have a UI but… 
• How much data does each web page deliver? 
• How many HTTP requests does a page load make?
What about… 
• Off loading some of those calls to CDNs? 
• Are you using compression? 
• What about caching? 
Now hold on just a minute
Caching 
You’ve got performance problems 
You add caching 
Now you have two problems 
How do you invalidate your caches?
What did we learn? 
• Infrastructure plays a huge role in performance testing 
• Code problems are usually in the last place you look 
• SQL problems often go overlooked 
• Commonly found solutions don’t always work 
• Hundreds of man hours were put into performance testing 
• Starting earlier is better
Thank you 
Donald Belcham 
@dbelcham 
donald.Belcham@igloocoder.com

More Related Content

What's hot

Extending Continuous Integration
Extending Continuous IntegrationExtending Continuous Integration
Extending Continuous Integration
Johannes Brodwall
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Dakiry
 
Lessons Learned Monitoring Production
Lessons Learned Monitoring ProductionLessons Learned Monitoring Production
Lessons Learned Monitoring Production
Aviran Mordo
 
Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
 
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
Marc Fasel
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
Somkiat Puisungnoen
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
Mark Ginnebaugh
 
Continuous integration sql in the city
Continuous integration sql in the cityContinuous integration sql in the city
Continuous integration sql in the city
Ike Ellis
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
Andrew Siemer
 
Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database Deployments
Red Gate Software
 
Designing Scalable Applications
Designing Scalable ApplicationsDesigning Scalable Applications
Designing Scalable Applications
Fabricio Epaminondas
 
Continuous Integration and Builds
Continuous Integration and BuildsContinuous Integration and Builds
Continuous Integration and Builds
Bhavin Javia
 
Developer day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsDeveloper day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast Deployments
Matthew Cwalinski
 
Test Strategies in Microservices
Test Strategies in MicroservicesTest Strategies in Microservices
Test Strategies in Microservices
Mesut Özen
 
Strategies in continuous delivery
Strategies in continuous deliveryStrategies in continuous delivery
Strategies in continuous deliveryAviran Mordo
 
What's New in Puppet Enterprise 2015.3 (APAC)
What's New in Puppet Enterprise 2015.3 (APAC)What's New in Puppet Enterprise 2015.3 (APAC)
What's New in Puppet Enterprise 2015.3 (APAC)
Puppet
 
Final presentation
Final presentationFinal presentation
Final presentation
Brandon Barclay
 
Boston MeetUp 10.10
Boston MeetUp 10.10Boston MeetUp 10.10
Boston MeetUp 10.10
Solano Labs
 
Network Automation at Shapeways
Network Automation at ShapewaysNetwork Automation at Shapeways
Network Automation at Shapeways
Puppet
 
Continuous Testing in the Agile Age
Continuous Testing in the Agile AgeContinuous Testing in the Agile Age
Continuous Testing in the Agile Age
BlazeMeter
 

What's hot (20)

Extending Continuous Integration
Extending Continuous IntegrationExtending Continuous Integration
Extending Continuous Integration
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
 
Lessons Learned Monitoring Production
Lessons Learned Monitoring ProductionLessons Learned Monitoring Production
Lessons Learned Monitoring Production
 
Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014
 
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
Crowd Sourced Testing - Real-World Experience Using Rainforest QA Crowd-Sourc...
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Continuous integration sql in the city
Continuous integration sql in the cityContinuous integration sql in the city
Continuous integration sql in the city
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database Deployments
 
Designing Scalable Applications
Designing Scalable ApplicationsDesigning Scalable Applications
Designing Scalable Applications
 
Continuous Integration and Builds
Continuous Integration and BuildsContinuous Integration and Builds
Continuous Integration and Builds
 
Developer day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsDeveloper day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast Deployments
 
Test Strategies in Microservices
Test Strategies in MicroservicesTest Strategies in Microservices
Test Strategies in Microservices
 
Strategies in continuous delivery
Strategies in continuous deliveryStrategies in continuous delivery
Strategies in continuous delivery
 
What's New in Puppet Enterprise 2015.3 (APAC)
What's New in Puppet Enterprise 2015.3 (APAC)What's New in Puppet Enterprise 2015.3 (APAC)
What's New in Puppet Enterprise 2015.3 (APAC)
 
Final presentation
Final presentationFinal presentation
Final presentation
 
Boston MeetUp 10.10
Boston MeetUp 10.10Boston MeetUp 10.10
Boston MeetUp 10.10
 
Network Automation at Shapeways
Network Automation at ShapewaysNetwork Automation at Shapeways
Network Automation at Shapeways
 
Continuous Testing in the Agile Age
Continuous Testing in the Agile AgeContinuous Testing in the Agile Age
Continuous Testing in the Agile Age
 

Viewers also liked

Twitter
TwitterTwitter
Twitter
Juan Dimuro
 
Pivot animator
Pivot animatorPivot animator
Pivot animator
吳錫修 (ShyiShiou Wu)
 
3D printing introduction
3D printing introduction 3D printing introduction
3D printing introduction
Mahmoud DH
 
I відкритий регіональний турнір юних правознавців відбувся
I відкритий регіональний турнір юних правознавців відбувсяI відкритий регіональний турнір юних правознавців відбувся
I відкритий регіональний турнір юних правознавців відбувся
Руслан Симивол
 
SHRM Reader Beitrag 1
SHRM Reader Beitrag 1SHRM Reader Beitrag 1
SHRM Reader Beitrag 1
Robert Zaugg
 
Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!
Boris Hristov
 
Consortium metrics discussion with IOM Drug Forum
Consortium metrics discussion with IOM Drug ForumConsortium metrics discussion with IOM Drug Forum
Consortium metrics discussion with IOM Drug Forum
Mark David Lim
 
O poder da Nuvem em sua APP Android com Azure Mobile Services
O poder da Nuvem em sua APP Android com Azure Mobile ServicesO poder da Nuvem em sua APP Android com Azure Mobile Services
O poder da Nuvem em sua APP Android com Azure Mobile Services
Vitor Meriat
 
Fred Benjamins - 10 manieren om innovatiever worden
Fred Benjamins - 10 manieren om innovatiever wordenFred Benjamins - 10 manieren om innovatiever worden
Fred Benjamins - 10 manieren om innovatiever wordenFred Benjamins
 
Aprender y enseñar en colaboración
Aprender y enseñar en colaboraciónAprender y enseñar en colaboración
Aprender y enseñar en colaboración
MarisolTizapantzi
 
презентация продукции
презентация продукциипрезентация продукции
презентация продукции
marnik230369
 
Adote o verde patio placas
Adote o verde patio placasAdote o verde patio placas
Adote o verde patio placas
Elaine Fatima de Paoli
 
Abug7 Atlassian state of the union (Jan 2014)
Abug7  Atlassian state of the union (Jan 2014)Abug7  Atlassian state of the union (Jan 2014)
Abug7 Atlassian state of the union (Jan 2014)
Peter Van de Voorde
 
Kelompok mid test
Kelompok  mid testKelompok  mid test
Kelompok mid test
Gafar Aly
 
Microsoft EMS Mixtape
Microsoft EMS MixtapeMicrosoft EMS Mixtape
Microsoft EMS Mixtape
Morgan Simonsen
 
WP 3.3 API and Functional Architecture
WP 3.3 API and Functional ArchitectureWP 3.3 API and Functional Architecture
WP 3.3 API and Functional Architecture
Europeana
 
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
Teliss Tong
 
Deber 1 op
Deber 1 opDeber 1 op
Deber 1 op
Jessica Zumba
 
Making your hotel eco-friendly
Making your hotel eco-friendlyMaking your hotel eco-friendly
Making your hotel eco-friendly
Dasarathi GV
 

Viewers also liked (19)

Twitter
TwitterTwitter
Twitter
 
Pivot animator
Pivot animatorPivot animator
Pivot animator
 
3D printing introduction
3D printing introduction 3D printing introduction
3D printing introduction
 
I відкритий регіональний турнір юних правознавців відбувся
I відкритий регіональний турнір юних правознавців відбувсяI відкритий регіональний турнір юних правознавців відбувся
I відкритий регіональний турнір юних правознавців відбувся
 
SHRM Reader Beitrag 1
SHRM Reader Beitrag 1SHRM Reader Beitrag 1
SHRM Reader Beitrag 1
 
Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!
 
Consortium metrics discussion with IOM Drug Forum
Consortium metrics discussion with IOM Drug ForumConsortium metrics discussion with IOM Drug Forum
Consortium metrics discussion with IOM Drug Forum
 
O poder da Nuvem em sua APP Android com Azure Mobile Services
O poder da Nuvem em sua APP Android com Azure Mobile ServicesO poder da Nuvem em sua APP Android com Azure Mobile Services
O poder da Nuvem em sua APP Android com Azure Mobile Services
 
Fred Benjamins - 10 manieren om innovatiever worden
Fred Benjamins - 10 manieren om innovatiever wordenFred Benjamins - 10 manieren om innovatiever worden
Fred Benjamins - 10 manieren om innovatiever worden
 
Aprender y enseñar en colaboración
Aprender y enseñar en colaboraciónAprender y enseñar en colaboración
Aprender y enseñar en colaboración
 
презентация продукции
презентация продукциипрезентация продукции
презентация продукции
 
Adote o verde patio placas
Adote o verde patio placasAdote o verde patio placas
Adote o verde patio placas
 
Abug7 Atlassian state of the union (Jan 2014)
Abug7  Atlassian state of the union (Jan 2014)Abug7  Atlassian state of the union (Jan 2014)
Abug7 Atlassian state of the union (Jan 2014)
 
Kelompok mid test
Kelompok  mid testKelompok  mid test
Kelompok mid test
 
Microsoft EMS Mixtape
Microsoft EMS MixtapeMicrosoft EMS Mixtape
Microsoft EMS Mixtape
 
WP 3.3 API and Functional Architecture
WP 3.3 API and Functional ArchitectureWP 3.3 API and Functional Architecture
WP 3.3 API and Functional Architecture
 
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
52 幸福像花儿一样(布衣公子作品)2014.05.31版@teliss
 
Deber 1 op
Deber 1 opDeber 1 op
Deber 1 op
 
Making your hotel eco-friendly
Making your hotel eco-friendlyMaking your hotel eco-friendly
Making your hotel eco-friendly
 

Similar to Performance Tuning in the Trenches

Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps JourneyGartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Kelly Looney
 
Extreme Makeover OnBase Edition
Extreme Makeover OnBase EditionExtreme Makeover OnBase Edition
Extreme Makeover OnBase Edition
DataBank, A KYOCERA Group Company
 
DevOps Days Ohio
DevOps Days OhioDevOps Days Ohio
DevOps Days Ohio
Kelly Looney
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack Way
iWeb (group INAP)
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
Aviran Mordo
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro - Database DevOps
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestroKyle Hailey
 
manage databases like codebases
manage databases like codebasesmanage databases like codebases
manage databases like codebases
DBmaestro - Database DevOps
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
indiver
 
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific LanguageImproving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Dr. Spock
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
.NET Conf UY
 
Project Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on DockerProject Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on Docker
RightScale
 
The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationDBmaestro - Database DevOps
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Codecamp Romania
 
Version Control meets Database Control
Version Control meets Database ControlVersion Control meets Database Control
Version Control meets Database Control
DBmaestro - Database DevOps
 
In (database) automation we trust
In (database) automation we trustIn (database) automation we trust
In (database) automation we trust
DBmaestro - Database DevOps
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with Fitnesse
ClareMcLennan
 
Taking Database Development to the 21st Century
Taking Database Development to the 21st CenturyTaking Database Development to the 21st Century
Taking Database Development to the 21st Century
DBmaestro - Database DevOps
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
Red Gate Software
 
Why retail companies can't afford database downtime
Why retail companies can't afford database downtimeWhy retail companies can't afford database downtime
Why retail companies can't afford database downtime
DBmaestro - Database DevOps
 

Similar to Performance Tuning in the Trenches (20)

Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps JourneyGartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
 
Extreme Makeover OnBase Edition
Extreme Makeover OnBase EditionExtreme Makeover OnBase Edition
Extreme Makeover OnBase Edition
 
DevOps Days Ohio
DevOps Days OhioDevOps Days Ohio
DevOps Days Ohio
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack Way
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
 
manage databases like codebases
manage databases like codebasesmanage databases like codebases
manage databases like codebases
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific LanguageImproving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific Language
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
Project Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on DockerProject Sherpa: How RightScale Went All in on Docker
Project Sherpa: How RightScale Went All in on Docker
 
The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automation
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
 
Version Control meets Database Control
Version Control meets Database ControlVersion Control meets Database Control
Version Control meets Database Control
 
In (database) automation we trust
In (database) automation we trustIn (database) automation we trust
In (database) automation we trust
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with Fitnesse
 
Taking Database Development to the 21st Century
Taking Database Development to the 21st CenturyTaking Database Development to the 21st Century
Taking Database Development to the 21st Century
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
Why retail companies can't afford database downtime
Why retail companies can't afford database downtimeWhy retail companies can't afford database downtime
Why retail companies can't afford database downtime
 

More from Donald Belcham

Introduction to Messaging
Introduction to MessagingIntroduction to Messaging
Introduction to Messaging
Donald Belcham
 
Advanced messaging patterns
Advanced messaging patternsAdvanced messaging patterns
Advanced messaging patterns
Donald Belcham
 
Microservices: The Nitty Gritty
Microservices: The Nitty GrittyMicroservices: The Nitty Gritty
Microservices: The Nitty Gritty
Donald Belcham
 
Microservices: A Gentle Introduction
Microservices: A Gentle IntroductionMicroservices: A Gentle Introduction
Microservices: A Gentle Introduction
Donald Belcham
 
AOP & Patterns
AOP & PatternsAOP & Patterns
AOP & Patterns
Donald Belcham
 
Source Control Abominations
Source Control AbominationsSource Control Abominations
Source Control Abominations
Donald Belcham
 
Is There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software DevelopmentIs There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software Development
Donald Belcham
 
Reducing External Risk
Reducing External RiskReducing External Risk
Reducing External Risk
Donald Belcham
 
Reliability and Resilience
Reliability and ResilienceReliability and Resilience
Reliability and Resilience
Donald Belcham
 
Reliability and Reslience
Reliability and ReslienceReliability and Reslience
Reliability and Reslience
Donald Belcham
 
Introduction To AOP
Introduction To AOPIntroduction To AOP
Introduction To AOP
Donald Belcham
 
Design patterns you didn't know about
Design patterns you didn't know aboutDesign patterns you didn't know about
Design patterns you didn't know aboutDonald Belcham
 
Programming Closer to the Iron
Programming Closer to the IronProgramming Closer to the Iron
Programming Closer to the IronDonald Belcham
 
Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOPTaming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOPDonald Belcham
 
Domain Driven Design Primer
Domain Driven Design PrimerDomain Driven Design Primer
Domain Driven Design Primer
Donald Belcham
 
Hacking Hardware
Hacking HardwareHacking Hardware
Hacking Hardware
Donald Belcham
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code MetricsDonald Belcham
 

More from Donald Belcham (20)

Introduction to Messaging
Introduction to MessagingIntroduction to Messaging
Introduction to Messaging
 
Advanced messaging patterns
Advanced messaging patternsAdvanced messaging patterns
Advanced messaging patterns
 
Microservices: The Nitty Gritty
Microservices: The Nitty GrittyMicroservices: The Nitty Gritty
Microservices: The Nitty Gritty
 
Microservices: A Gentle Introduction
Microservices: A Gentle IntroductionMicroservices: A Gentle Introduction
Microservices: A Gentle Introduction
 
AOP & Patterns
AOP & PatternsAOP & Patterns
AOP & Patterns
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Source Control Abominations
Source Control AbominationsSource Control Abominations
Source Control Abominations
 
Is There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software DevelopmentIs There Room for Craftsmanship in Software Development
Is There Room for Craftsmanship in Software Development
 
Reducing External Risk
Reducing External RiskReducing External Risk
Reducing External Risk
 
Reliability and Resilience
Reliability and ResilienceReliability and Resilience
Reliability and Resilience
 
Reliability and Reslience
Reliability and ReslienceReliability and Reslience
Reliability and Reslience
 
Introduction To AOP
Introduction To AOPIntroduction To AOP
Introduction To AOP
 
Design patterns you didn't know about
Design patterns you didn't know aboutDesign patterns you didn't know about
Design patterns you didn't know about
 
Programming Closer to the Iron
Programming Closer to the IronProgramming Closer to the Iron
Programming Closer to the Iron
 
Taming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOPTaming Brownfield Codebases with AOP
Taming Brownfield Codebases with AOP
 
Domain Driven Design Primer
Domain Driven Design PrimerDomain Driven Design Primer
Domain Driven Design Primer
 
Hacking Hardware
Hacking HardwareHacking Hardware
Hacking Hardware
 
Advanced AOP
Advanced AOPAdvanced AOP
Advanced AOP
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code Metrics
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 

Performance Tuning in the Trenches

  • 1. Thank you to our Sponsors Media Sponsor:
  • 2. Performance Tuning in the trenches
  • 3. First the request… It needs to be fast It needs to be faster than the old system We’ll let you know if it’s fast enough
  • 4. Then the timeline… By the end of the week Before production Yesterday
  • 5. Why is this a problem?
  • 6. Specific Requirements are Needed “Testing” implies pass/fail Without a specific metric pass/fail cannot be determined Most Performance “Testing” is Performance Profiling
  • 7. Time Consuming Process Infrastructure needs planning Data scenarios need building Performance runs need to be conducted Results need to be analyzed Code needs to be analyzed Architecture needs to be evaluated Changes need to be made System testing needs to be done
  • 8. I was lucky • Performance was a primary concern from the start of the coding process • Dedicated time was provided well in advance of delivery • We had a *very* rough metric to shoot for, but it was quantified
  • 9. First we need infrastructure • What does your system use? • What other software will be installed on those systems? • What network infrastructure may be involved?
  • 10. What I had… • VM with production OS • Visual Studio • 4-6 other developers using this VM for day-to-day coding • CI software • Shared SQL Server database • Location of all developer testing
  • 11. What that meant • No server load consistency between test runs • Usage spikes on those servers • Data changed between test runs • SQL Server load changed between, and during, test runs • Installation of ‘unknown’ software versions • Test-to-Test comparisons were hard to evaluate • Instead of just one run, I’d have to do many runs to get an ‘average’
  • 12. What would have been nice • Complete server isolation • VM configured exactly as the production VM • VM configuration • Software configuration • Software installed • Production scale data
  • 13. Now we need software
  • 14. Now we see the results
  • 15. What does it mean? I guarantee you that your problems are not where you thought they were. Problems will blend into the rest of your code.
  • 16. Not where you think it is loadedPerBatch.Where(x=>x.Name == someLoopValue) Up to 10% of our execution time dictLoadedPerBatch.ContainKey(someLoopValue)
  • 17. What does it mean?
  • 18. What did we find? It took longer to load a zip file into memory than to unzip it. Copying multi-gigabyte files multiple times takes a long time. Opening and reading these files was amazingly fast. We hadn’t fully conceptualized the scale of the nested looping. SQL INSERT statements were very slow.
  • 19. Led us to the next tool
  • 20. Profiling Data Access 1. Log SQL being executed 2. Copy statements into Management Studio 3. View the Execution Plan 4. Review indexes used, indexes missed, indexes updated 5. Note the index suggestions
  • 21. Led us to the next tool
  • 22. Benefits • Only changing indexes limited retesting of logic • One change == re-run of tests
  • 23. What I learned • INSERT statements are fast, but updating indexes can kill performance when 100k operations take place • The simplest SELECT may not be picking up an index
  • 24. We didn’t have a UI but… • How much data does each web page deliver? • How many HTTP requests does a page load make?
  • 25. What about… • Off loading some of those calls to CDNs? • Are you using compression? • What about caching? Now hold on just a minute
  • 26. Caching You’ve got performance problems You add caching Now you have two problems How do you invalidate your caches?
  • 27. What did we learn? • Infrastructure plays a huge role in performance testing • Code problems are usually in the last place you look • SQL problems often go overlooked • Commonly found solutions don’t always work • Hundreds of man hours were put into performance testing • Starting earlier is better
  • 28. Thank you Donald Belcham @dbelcham donald.Belcham@igloocoder.com

Editor's Notes

  1. Not all bad as an initial profile can be used as a baseline for future test runs
  2. The profiling tools allow snap shot comparison. This can be invaluable. It also might not work depending on the size of the run you perform.