+ All Categories
Home > Documents > Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Date post: 29-Dec-2015
Category:
Upload: anis-conley
View: 213 times
Download: 1 times
Share this document with a friend
84
Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions
Transcript
Page 1: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Andreas Grabner

Your place in DevTOps is not about finding more bugs, but problem solutions

Page 2: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

That’s why I ended up talking at BTD

Page 3: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 4: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Some also call it

Page 5: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Evolution of Software Engineering

Page 6: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

My Definition of DevOpsThe stuff we did

when we were a Start Up and we All were

Devs, Testers and Ops

Page 7: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

ReleaseAcceptance TestingUnit Testing Performance

TestingCoding

Reduce Lead Time

Improve Process

Page 8: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

700 Deployments / Year

50-60 Deployments / Day

10+ Deployments / Day

Every 11.6 seconds

Who did it?

Page 9: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Inside the Amazon Numbers!

75% fewer outages since 2006

90% fewer outage minutes

~0.001% of deployments cause a problem

Instantaneous automatic rollback

Deploying every 11.6s

Page 10: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Deploy Faster!!

Page 11: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Fail Faster!!?

Page 12: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Failures happen!!

Nobody likes it when …

Page 13: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Unless you work for Google or Microsoft

Page 14: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

… or this …

Page 15: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 16: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

.. as it leads to this …

Page 17: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

The “War Room”

Facebook – December 2012

The “War Room”

Facebook – December 2012

Page 18: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

… and potentially to this …

Page 19: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 20: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

And this isn’t helping either …

Page 21: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 22: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 23: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 24: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 25: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Tester Developer

Page 26: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 27: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 28: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

This ATTITUDE is

the main PROBLEM

as it LEADS to …

Page 29: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

80%$60B

Page 30: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

ReleaseAcceptance TestingUnit Testing Performance

Testing

Coding

% of Bugs in Software Relative Cost of a Bugfix

100%

80%

50%

40% 40%

1x10x

50x

150x

25x

Barry Boehm: “EQUITY Keynote Address”, March 19th, 2007

Insufficient Focus on Quality

Page 31: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 32: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

20%80%

Page 33: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

ReleaseAcceptance TestingUnit Testing Performance

Testing

Coding

% of Bugs in Software Relative Cost of a Bugfix

40% 50%

40% 40%

1x10x

50x

150x

25x

Barry Boehm’s numbers adjusted by Andreas Grabner

80%

20%

10%

5%

100%

80%

Focus on “Well Known” problems! Automated!

Page 34: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 35: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Collaboration

Automation

Sharing

Measuring

4 Pillars of DevOps + Quality Focus

Page 36: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Level-Up SkillsBrowser Diagnostics

Wireshark, Fiddler

JBoss, Tomcat, JConsole

IIS, ASP.NET, PerfLib

Oracle, SQL

Garbage Collection Thread Dumps

Page 37: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Architecture

# of Services

# of Databases

# of Servers

# of Calls between Components

Page 38: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

PerformancePage Load Time Render Time SQL Query Time Service Call Time

Page 39: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Scalability

Memory Usage per User

# Connections

Cache Utilization

Load Distribution

Component Roundtrips

Page 40: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Collaboration

Automation

Sharing

Measuring

Level-Up Skills

Performance

Scalability

Architecture

4 Pillars of DevOps + Quality Focus

Page 41: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

4 Use Cases:WHY, HOW& METRICS

4 Use Cases:WHY, HOW& METRICS

Page 42: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 43: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Bloated Websites

Page 44: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Mobile Web Site: This SHOULDN’T happen!

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

Total size of ~ 20MB

Page 45: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Not following Web Performance Best Practices

282! Objects on that page9.68MB Page Size

8.8s Page Load Time

Most objects are images delivered from your main

domain

Very long Connect time (1.8s) to your CDN

Page 46: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

• Developers not using the browser built-in diagnostics tools

• Testers not doing a sanity checks with the same tools

• Some tools for you (Quick Demo)• Built-in Inspectors via Ctrl-Shift-I in Chrome and Firefox• YSlow, PageSpeed, SpeedTracer• Dynatrace

• Level-Up: Automate Testing and Diagnostics Check

Lessons Learned – NO Excuse for …

Page 47: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

# Resources# of Domains

Usage of CDNsPage Load and Size

Page 48: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 49: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Not every Architect makes good decisions

Page 50: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

• Symptoms• HTML takes between 60 and 120s to render• High GC Time

• Developer Assumptions• Bad GC Tuning• Probably bad Database Performance as rendering was simple

• Result: 2 Years of Finger pointing between Dev and DBA

Project: Online Room Reservation System

Page 51: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Developers built own monitoring

void roomreservationReport(int officeId){ long startTime = System.currentTimeMillis(); Object data = loadDataForOffice(officeId); long dataLoadTime = System.currentTimeMillis() - startTime; generateReport(data, officeId);}

Result:Avg. Data Load Time: 45s!

DB Tool says:Avg. SQL Query: <1ms!

Page 52: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#1: Loading too much data24889! Calls to the

Database API!

High CPU and High Memory Usage to keep all

data in Memory

Page 53: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#2: On individual connections 12444! individual

connections

Classical N+1 Query Problem

Individual SQL really <1ms

Page 54: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#3: Putting all data in temp Hashtable

Lots of time spent in

Hashtable.get

Called from their Entity Objects

Page 55: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

• … you know what code is doing

• Challenge the developers

• Explore Tools that “might seem” out of your league!• Built-In Database Analysis Tools• “Logging” options of Frameworks such as Hibernate, …• JMX, Perf Counters, … of your Application Servers• Performance Tracing Tools: Dynatrace, NewRelic,

AppDynamics, …

Lessons Learned – Don’t Assume …

Page 56: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

# SQL Executions# of SAME SQLs

Conn. Acquisition Time

Page 57: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 58: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

“Deployment” Gone Bad!

Page 59: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Test Environment

Production Environment

8x slower3x more SQL

Page 60: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Test Environment Production Environment

Hibernate, Classloading,

XML – The Key Hotspots

Hibernate, Classloading, XML

– The Key Hotspots

I/O for Web Requests doesn’t

even show up!

That’s Normal: Having I/O for Web

Request as main contributor

Page 61: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Top Contributor Class.getInterfaces

Called from Hibernates FieldInterceptionHelper

These calls all originate form thousands of calls to

find item by code

Page 62: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Top Methods related to XML Processing

Classloading is triggered through CustomMonnkey and the Xalan

Parser

Classloading is triggered through CustomMonkey and the Xalan

Parser

Page 63: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

• Plan enough time for proper testing

• Anticipate changed user behavior during peak load

• Only test what really ends up in Production

Lessons Learned

Page 64: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Time Spent in API# Calls to API

Page 65: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 66: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Incorrect Sizing of Pools and

Queues

Page 67: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Online Banking: Slow Balance Check

1.69m (=101s!) To Check Balance!

87% spent in IIS 600! SQL Executions

Page 68: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#1 Time really spent in IIS?

Tip: Elapsed Time tells us WHEN a Method was executed!

Finding: Thread 32 in IIS waited 87s to pass control to Thread 30 in ASP.NET

Tip: Thread# gives us insight on Thread Queues / Switches

Page 69: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#2 What about these SQL Executions?Finding: EVERY SQL

statement is executed on ITS OWN Connection!

Tip: Look at “GetConnection”

Page 70: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#2 SQL Executions! continued …

#1: Same SQL is executed 67! times

#2: NO PREPARATION because everything

executed on new Connection

Page 71: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Lessons Learned!

ASP.NET Worker Thread Pool Sizing!

DB Connection PoolsMore Efficient SQL

Page 72: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

How to Monitor: Web Server

Idle vs. Busy Threads

Page 73: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

How to Monitor: Application Server

App Server Threads

Page 74: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Idle vs. Busy Threads# SQLs / Request# GetConnection

Page 75: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

•http://blog.dynatrace.com•http://www.perfplanet.com/•http://highscalability.com/ •http://blog.ruxit.com/

More of these Use Cases?

Page 76: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 77: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

•# Images•# Redirects•Size of Resources•# SQL Executions•# of SAME SQLs•# Items per Page•# AJAX per Page

Remember: New Metrics When Testing Apps•Time Spent in API

•# Calls into API

•# Functional Errors

•3rd Party calls

•# of Domains

•Total Size

•…

Page 78: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.
Page 79: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Putting it into Test Automation

12 0 120ms

3 1 68ms

Build 20 testPurchase OK

testSearch OK

Build 17 testPurchase OK

testSearch OK

Build 18 testPurchase FAILED

testSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms

3 1 68ms

12 5 60ms

3 1 68ms

75 0 230ms

3 1 68ms

Test Framework Results Architectural Data

We identified a regresesion

Problem solved

Exceptions probably reason for failed testsProblem fixed but now we have an

architectural regressionProblem fixed but now we have an

architectural regressionNow we have the functional and architectural confidence

Let’s look behind the scenes

Page 80: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#1: Analyzing each Test

#2: Metrics for each Test

#3: Detecting Regression based on Measure

Page 81: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

#1: Test Status Overview based on our new Metrics

#2: Lets the build fail

Page 82: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

ReleaseAcceptance TestingUnit Testing Performance

Testing

Monitor Tests

Analyze Results

Quality Gate in your Build Tool

Every 11.6 seconds

Page 83: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Deploy Faster!! With Better Quality

Page 84: Andreas Grabner Your place in DevTOps is not about finding more bugs, but problem solutions.

Andreas Grabner

Your place in DevTOps is not about finding more bugs, but problem solutions

Slides: slideshare.net/grabnerandi

Get Tools: bit.ly/dttrial

YouTube Tutorials: bit.ly/dttutorials

Contact Me: [email protected]

Follow Me: @grabnerandi

Read More: blog.dynatrace.com


Recommended