Java Performance: What developers must know
Upcoming SlideShare
Loading in...5
×
 

Java Performance: What developers must know

on

  • 2,442 views

In my career, I could help some companies to solve many application performance issues. After several suggestions from colleagues, I have tried to put together in this presentation the main points ...

In my career, I could help some companies to solve many application performance issues. After several suggestions from colleagues, I have tried to put together in this presentation the main points that I think Java developer should take into account to fix and prevent performance issues.

Statistics

Views

Total Views
2,442
Views on SlideShare
470
Embed Views
1,972

Actions

Likes
0
Downloads
15
Comments
0

9 Embeds 1,972

http://www.javaspeedup.com 1052
http://diegolemos.net 816
http://www.scoop.it 78
https://twitter.com 19
http://feedly.com 2
http://pmomale-ld1 2
http://diegolemos.net. 1
http://plus.url.google.com 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Java Performance: What developers must know Java Performance: What developers must know Presentation Transcript

  • Java Performance What Developers Must Know Diego Lemos
  • We care about performance... (credit: http://www.morguefile.com/) ...when things go bad.
  • Panic Driven Actions ● Add more hardware ● Work on ugly code ● Long Meetings (?!) ● Blame somebody
  • Milliseconds Matter ● Amazon: – ● Increase 100ms in load time decreased sales by 1% Google: – From loading a 10-result page in 0.4 seconds to a 30result page loading in 0.9 seconds decreased traffic and ad revenues by 20%
  • Measure Don’t Guess ● Support decisions by measurements ● Tune what matters (credit: http://xkcd.com)
  • Generic Application Stack Application Profiling JVM Heap Analysis Operating System Monitor System Hardware
  • Tools ● vmstat, iostat, netstat ● JMeter, Gatling ● HPjmeter ● VisualVM, jconsole
  • Demo :
  • Any problem here? Java heap space
  • And here? Everything is OK!
  • What happened here? "catalina-exec-8190-104" - Thread t@135 java.lang.Thread.State: BLOCKED at com.google.code.morphia.Morphia.mapPackage(Morphia.java:72)
  • Performance Best Practices ● ● ● ● Test one build a day for performance issues (continuous integration) Monitoring (production env.) for compliance Keep users at the center of performance tuning efforts Devs + Ops
  • Performance Tests on CI
  • Follow Coding Best Practices ● KISS – ● complex code is hard to optimize Loose coupling – – ● Optimize without fear of breaking anything else Avoid contamination (external applications) Let your objects die young
  • Performance myths ● Tune by default (early tuning) ● Optimize by precaution (over-engineer) ● The architecture cannot change ● Hardware will solve the problem
  • Conclusion ● Think performance before problems come ● Devs + ops working together ● Monitor your application
  • More on this ● http://java.dzone.com/kirk-dominating-consumer ● https://github.com/dlresende/spring-petclinic ● http://jmeter.apache.org/usermanual/glossary.html ● http://www.oracle.com/technetwork/java/javase/gc-tunin ● http://munchweb.com/effect-of-website-speed ● http://www.javaworld.com/article/2073905/build-ci-sdlc