35
or business value optimization? performance monitoring metrics Terça-feira, 29 de Janeiro de 13

metrics - performance monitoring or business value optimization?

Embed Size (px)

DESCRIPTION

Presentation done at the Portuguese JUG http://jug.pt/, about the metrics library from Yammer http://metrics.codahale.com/.

Citation preview

Page 1: metrics - performance monitoring or business value optimization?

or business value optimization?performance monitoring

metrics

Terça-feira, 29 de Janeiro de 13

Page 2: metrics - performance monitoring or business value optimization?

Me

Terça-feira, 29 de Janeiro de 13

Page 3: metrics - performance monitoring or business value optimization?

• CTO at Cult of Bits

• 10+ years of professional Java development

MeTerça-feira, 29 de Janeiro de 13

Page 4: metrics - performance monitoring or business value optimization?

Why?

Terça-feira, 29 de Janeiro de 13

Page 5: metrics - performance monitoring or business value optimization?

Why?

Ultimately it’s aboutBusiness Value

Terça-feira, 29 de Janeiro de 13

Page 6: metrics - performance monitoring or business value optimization?

Why?

To make informed Business decisions we need to know the reality of our software

Terça-feira, 29 de Janeiro de 13

Page 7: metrics - performance monitoring or business value optimization?

Why?

How many errors are our users seeing?

Terça-feira, 29 de Janeiro de 13

Page 8: metrics - performance monitoring or business value optimization?

Why?

Is our App fast enough?

Terça-feira, 29 de Janeiro de 13

Page 9: metrics - performance monitoring or business value optimization?

Why?

Were our assumptions about performance/usage patterns

proven correct?

Terça-feira, 29 de Janeiro de 13

Page 10: metrics - performance monitoring or business value optimization?

The Metrics library

Terça-feira, 29 de Janeiro de 13

Page 11: metrics - performance monitoring or business value optimization?

The metrics library

Metrics is a Java library which gives you unparalleled insight into what your code does in production.

Developed by Yammer to instrument their JVM-based backend services, Metrics provides a powerful toolkit of ways to measure the behavior of

critical components in your production environment.

source: http://metrics.codahale.com/

Terça-feira, 29 de Janeiro de 13

Page 12: metrics - performance monitoring or business value optimization?

Types of Metrics

Terça-feira, 29 de Janeiro de 13

Page 13: metrics - performance monitoring or business value optimization?

• Gauges• Counters• Histograms• Meters• Timers

Types of MetricsTerça-feira, 29 de Janeiro de 13

Page 14: metrics - performance monitoring or business value optimization?

Structure of metrics

Terça-feira, 29 de Janeiro de 13

Page 15: metrics - performance monitoring or business value optimization?

Structure of metrics

Group Top level grouping (“package name”)

Type Second level grouping (“class name”)

Name the metric name (e.g.,“error-count”)

Scope optional

Terça-feira, 29 de Janeiro de 13

Page 16: metrics - performance monitoring or business value optimization?

Outputs

Terça-feira, 29 de Janeiro de 13

Page 17: metrics - performance monitoring or business value optimization?

• JMX• Console• CSV files• JSON servlet• Graphite• Ganglia

OutputsTerça-feira, 29 de Janeiro de 13

Page 18: metrics - performance monitoring or business value optimization?

DEMO TIME

Terça-feira, 29 de Janeiro de 13

Page 19: metrics - performance monitoring or business value optimization?

What to measure?

Terça-feira, 29 de Janeiro de 13

Page 20: metrics - performance monitoring or business value optimization?

“If it could affect business value, measure it” Coda Hale - metrics’ author

At yammer they can have up to 40/50 metrics per service

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 21: metrics - performance monitoring or business value optimization?

REST requests

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 22: metrics - performance monitoring or business value optimization?

MySQL/couchdb/Solr queries

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 23: metrics - performance monitoring or business value optimization?

Calls to external services/processes

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 24: metrics - performance monitoring or business value optimization?

Dimensions of requests/responses

Histogram

Examples:

•Search “page” size

•Depth of search requests

•Number of search terms used

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 25: metrics - performance monitoring or business value optimization?

ERRORS!

Counter / Meter

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Page 26: metrics - performance monitoring or business value optimization?

The CoBexperience

Terça-feira, 29 de Janeiro de 13

Page 27: metrics - performance monitoring or business value optimization?

Our use-case

Terça-feira, 29 de Janeiro de 13

Page 28: metrics - performance monitoring or business value optimization?

• Lots of applications in different sites

• 1-3 servers• No full-time network access

Our use-caseTerça-feira, 29 de Janeiro de 13

Page 29: metrics - performance monitoring or business value optimization?

lessons learned

Terça-feira, 29 de Janeiro de 13

Page 30: metrics - performance monitoring or business value optimization?

lessons learned

Naming metrics can be hard

Terça-feira, 29 de Janeiro de 13

Page 31: metrics - performance monitoring or business value optimization?

lessons learned

Creating metrics is just the start

Terça-feira, 29 de Janeiro de 13

Page 32: metrics - performance monitoring or business value optimization?

lessons learned

Having hard data to help decision is pricelless

Terça-feira, 29 de Janeiro de 13

Page 33: metrics - performance monitoring or business value optimization?

References

Terça-feira, 29 de Janeiro de 13

Page 34: metrics - performance monitoring or business value optimization?

The Metrics Homepagehttp://metrics.codahale.com/

Metrics, Metrics, Everywhere - Coda Hale http://www.youtube.com/watch?v=czes-oa0yik

Graphitehttp://graphite.wikidot.com/

ReferencesTerça-feira, 29 de Janeiro de 13

Page 35: metrics - performance monitoring or business value optimization?

Thank you!

@[email protected]

Terça-feira, 29 de Janeiro de 13