performance metrics for your build pipeline - presented at vienna webperf october meetup

46
1 Checking Performance Along your Build Pipeline @grabnerandi http://apmblog.compuware .com

Upload: andreas-grabner

Post on 22-Apr-2015

140 views

Category:

Software


2 download

DESCRIPTION

Software Performance Metrics that you should look at throughout your Build Pipeline and not just when your app crashes in productiong. Find performance and scalability problems as soon as executing your first Unit Test. Simply focus on metrics such as #SQLs, #LogMessages, #Objects on Heap, ...

TRANSCRIPT

Page 1: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

1

Checking Performance Along your Build Pipeline

@grabnerandihttp://apmblog.compuware.com

http://bit.ly/dttrial

Page 2: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

2

Today we are here for …

Commit Stage• Compile• Execute Unit Test• Code Analysis• Build installers

Automated Acceptance

Testing

Automated Capacity Testing

Manual testing• Key showcases• Exploratory testing Release

Cont. Delivery / Deploy

Page 3: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

3

Who is doing it? How many successful deployments can they do?

300 Deployments / Year

50-60 Deployments / Day

10+ Deployments / Day

Every 11.6 seconds

Page 4: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

4

More on Amazons Story

75% fewer outages since 2006

90% fewer outage minutes

~0.001% of deployments cause a problem

Instantaneous automatic rollback

Deploying every 11.6s

Page 5: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

5 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

Recommended BookRecommended Book

https://itrevolution.wufoo.com/forms/phoenix-project-ebook-offer/

Page 6: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

66 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

Status Quo: Unreliable Software Impacts BusinessStatus Quo: Unreliable Software Impacts Business

Page 7: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

7

The “War Room” – back then

'Houston, we have a problem‘NASA Mission Control Center, Apollo 13, 1970

The “War Room” – back then

'Houston, we have a problem‘NASA Mission Control Center, Apollo 13, 1970

Page 8: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

8

The “War Room” – NOW

Facebook – December 2012

The “War Room” – NOW

Facebook – December 2012

Page 9: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

9 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

Status Quo: Bugfixing in Production happensStatus Quo: Bugfixing in Production happens

~80% of problems

caused by ~20% patterns

YES we know this

80% Dev Time in Bug Fixing

$60B Defect Costs

BUT

Page 10: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

10

4 Situations on

WHY this happens,

HOW to avoid it

4 Situations on

WHY this happens,

HOW to avoid it

Page 11: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

11

Page 12: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

12

“Blindly” (Re)use Existing

Components

Page 13: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

13

Requirement: We need a report

Page 14: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

14

Using Hibernate results in 4k+ SQL Statements to display 3 items!

Hibernate Executes 4k+ Statements

Individual Execution VERY

FAST

But Total SUM takes 6s

Page 15: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

15

Requirement: We need a fancy UI

Page 16: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

16

Using Telerik Controls Results in 9s for Data-Binding of UI Controls

#1: Slow Stored ProcedureDepending on Request

execution time of this SP varies between 1 and 7.5s

#2: 240! Similar SQL StatementsMost of these 240! Statements are

not prepared and just differ in things like Column Names

Page 17: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

17

Metrics: # Total SQLs# SQLs / Web Request# Same SQLs / Request

Transferred Rows

Test: With realistic Data

Dev: “Learn” Frameworks

Page 18: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

18

Page 19: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

19

Implementation Flaws

Page 20: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

20

Business Impact requires Action!

Page 21: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

21

Solution: Cache to the RESCUE!!

Page 22: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

22

Implementation and Rollout

Implemented InMemory Cache

Worked well in Load Testing

Page 23: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

23

Result: Out of Memory Crashes!!

Still crashes

Problem fixed!Fixed Version Deployed

Page 24: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

24

Metrics: Heap Size, # Objects Allocated,# Objects in Cache

Cache Hit Ratio

Test: With realistic Data

Page 25: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

25

12 000 000 $

Page 26: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

26

#No “Agile” Deployment

Page 27: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

27

Ad on air

Availability dropped to 0%

Load Spike resulted in Unavailability

Page 28: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

28

Alternative: “GoDaddy goes DevOps”

Response time improved 4x

1h before SuperBowl KickOff

1h after Game ended

Page 29: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

29

Behind the Scenes

Page 30: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

30

Metrics: AvailabilityPage Size, # Objects

# Hosts, # Connections

DevOps: “Feature” Switches

Page 31: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

31

Page 32: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

32

#Push without a Plan

Page 33: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

33

Mobile Landing Page of Super Bowl Ad

434 Resources in total on that page:230 JPEGs, 75 PNGs, 50 GIFs, …

Total size of ~ 20MB

Page 34: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

34

m.store.com redirects to www.store.com

ALL CSS and JS files are redirected to the www domain

This is a lot of time “wasted” especially on high latency mobile

connections

Page 35: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

35

Metrics: Load Time, # Resources (Images, …),

# HTTP 3xx, 4xx, 5xx

Dev: Build for Mobile

Test: Test on Mobile

Ops: Monitor Mobile

Page 36: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

36

Page 37: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

37

#1: Define Measures# of Requests / User

# of Log Messages

# of Exceptions

# Objects Allocated

# Objects In Cache

Cache Hit Ratio

# of Images

# of SQLs

# SQLs per RequestAvailability

# HTTP 3xx, 4xx

Page Size

Page 38: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

38

#2: Automate

Commit Stage• Compile• Execute Unit Test• Code Analysis• Build installers

Automated Acceptance

Testing

Automated Capacity Testing

Manual testing• Key showcases• Exploratory testing Release

Unit & Integration Tests

Functional Tests

Performance TestsProductionMonitoring

Functional Tests

Page 39: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

How? Performance Focus in Test AutomationAnalyzing All Unit / Performance Tests

Analyze Perf Metrics

Identify Regressions

Page 40: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

How? Performance Focus in Test Automation

Page 41: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

How? Performance Focus in Test Automation

Cross Impact of KPIs

Identify Regressions

Page 42: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

4242

#3: Share Results

Page 43: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

43

#4: Integrate

Page 44: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

44

If we do all that

CANCELLED

Page 45: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

45

Want MORE of these and more details?

http://apmblog.compuware.com

Page 46: Performance Metrics for your Build Pipeline - presented at Vienna WebPerf October Meetup

46

FREE Products & More Info

dynaTrace Free Trial30 Days Free Trial on http://bit.ly/dttrial After that totally free for local usage

Our Blog: http://apmblog.compuware.com

Follow Me: @grabnerandi