SlideShare a Scribd company logo
1 of 17
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

More Related Content

What's hot

20140228 fp and_performance
20140228 fp and_performance20140228 fp and_performance
20140228 fp and_performance
shinolajla
 
How to Keep Your Data Safe in MongoDB
How to Keep Your Data Safe in MongoDBHow to Keep Your Data Safe in MongoDB
How to Keep Your Data Safe in MongoDB
MongoDB
 

What's hot (20)

The journey of a symfony app from 150ms to 20ms
The journey of a symfony app from 150ms to 20msThe journey of a symfony app from 150ms to 20ms
The journey of a symfony app from 150ms to 20ms
 
2016-01-16 03 Денис Нелюбин. How to test a million
2016-01-16 03 Денис Нелюбин. How to test a million2016-01-16 03 Денис Нелюбин. How to test a million
2016-01-16 03 Денис Нелюбин. How to test a million
 
Test driving-qml
Test driving-qmlTest driving-qml
Test driving-qml
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumps
 
Deployment of the Machine Learning at the production level
Deployment of the Machine Learning at the production levelDeployment of the Machine Learning at the production level
Deployment of the Machine Learning at the production level
 
EUC2015 - Load testing XMPP servers with Plain Old Erlang
EUC2015 - Load testing XMPP servers with Plain Old ErlangEUC2015 - Load testing XMPP servers with Plain Old Erlang
EUC2015 - Load testing XMPP servers with Plain Old Erlang
 
Introduction to stress test
Introduction to stress testIntroduction to stress test
Introduction to stress test
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
 
20140228 fp and_performance
20140228 fp and_performance20140228 fp and_performance
20140228 fp and_performance
 
Gopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracowGopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracow
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
JDK not so hidden treasures
JDK not so hidden treasuresJDK not so hidden treasures
JDK not so hidden treasures
 
Android app to the challenge
Android   app to the challengeAndroid   app to the challenge
Android app to the challenge
 
Get Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java ApplicationsGet Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java Applications
 
GPU Computing for Data Science
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science
 
Rapid Application Design in Financial Services
Rapid Application Design in Financial ServicesRapid Application Design in Financial Services
Rapid Application Design in Financial Services
 
How to Keep Your Data Safe in MongoDB
How to Keep Your Data Safe in MongoDBHow to Keep Your Data Safe in MongoDB
How to Keep Your Data Safe in MongoDB
 
JProfiler8 @ OVIRT
JProfiler8 @ OVIRTJProfiler8 @ OVIRT
JProfiler8 @ OVIRT
 
Chaos Engineering Talk at DevOps Days Austin
Chaos Engineering Talk at DevOps Days AustinChaos Engineering Talk at DevOps Days Austin
Chaos Engineering Talk at DevOps Days Austin
 

Viewers also liked

Code Optimization
Code OptimizationCode Optimization
Code Optimization
guest9f8315
 

Viewers also liked (20)

Carreira e TI
Carreira e TICarreira e TI
Carreira e TI
 
User Credential handling in Web Applications done right
User Credential handling in Web Applications done rightUser Credential handling in Web Applications done right
User Credential handling in Web Applications done right
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
B2C Analytics by CleverTap for Hackers and Founders
B2C Analytics by CleverTap for Hackers and FoundersB2C Analytics by CleverTap for Hackers and Founders
B2C Analytics by CleverTap for Hackers and Founders
 
How to Designing A Music and Technology Degree
How to Designing A Music and Technology DegreeHow to Designing A Music and Technology Degree
How to Designing A Music and Technology Degree
 
Metro Design
Metro DesignMetro Design
Metro Design
 
Code optimization
Code optimizationCode optimization
Code optimization
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
 
Be a better developer
Be a better developerBe a better developer
Be a better developer
 
Gc in android
Gc in androidGc in android
Gc in android
 
code optimization
code optimization code optimization
code optimization
 
The impact of AI on work
The impact of AI on workThe impact of AI on work
The impact of AI on work
 
LAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android NLAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android N
 
Intro to Startups and VC
Intro to Startups and VCIntro to Startups and VC
Intro to Startups and VC
 
Internet of things - Business Opportunities in the Connected World
Internet of things - Business Opportunities in the Connected WorldInternet of things - Business Opportunities in the Connected World
Internet of things - Business Opportunities in the Connected World
 
Memoria de Labores 2016
Memoria de Labores 2016Memoria de Labores 2016
Memoria de Labores 2016
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Measuring cultural health and well-being in the workplace.
Measuring cultural health and well-being in the workplace.Measuring cultural health and well-being in the workplace.
Measuring cultural health and well-being in the workplace.
 
Invest Karnataka
Invest Karnataka Invest Karnataka
Invest Karnataka
 

Similar to Java Performance: What developers must know

Java2day 2013 : Modern workflows for javascript integration
Java2day 2013 : Modern workflows for javascript integrationJava2day 2013 : Modern workflows for javascript integration
Java2day 2013 : Modern workflows for javascript integration
Mite Mitreski
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
Jia Mi
 

Similar to Java Performance: What developers must know (20)

Thinking cpu & memory - DroidCon Paris 18 june 2013
Thinking cpu & memory - DroidCon Paris 18 june 2013Thinking cpu & memory - DroidCon Paris 18 june 2013
Thinking cpu & memory - DroidCon Paris 18 june 2013
 
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web framework
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Finding the Jelly in the JAMstack
Finding the Jelly in the JAMstackFinding the Jelly in the JAMstack
Finding the Jelly in the JAMstack
 
JUNIPER: Towards Modeling Approach Enabling Efficient Platform for Heterogene...
JUNIPER: Towards Modeling Approach Enabling Efficient Platform for Heterogene...JUNIPER: Towards Modeling Approach Enabling Efficient Platform for Heterogene...
JUNIPER: Towards Modeling Approach Enabling Efficient Platform for Heterogene...
 
Zoomcharts @ DevClub.lv
Zoomcharts @ DevClub.lvZoomcharts @ DevClub.lv
Zoomcharts @ DevClub.lv
 
Beyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsBeyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 Apps
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinating
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Java2day 2013 : Modern workflows for javascript integration
Java2day 2013 : Modern workflows for javascript integrationJava2day 2013 : Modern workflows for javascript integration
Java2day 2013 : Modern workflows for javascript integration
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose React
 
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
Thinking DevOps in the era of the Cloud - Demi Ben-AriThinking DevOps in the era of the Cloud - Demi Ben-Ari
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
 
Catching-up web technologies - an endless story
Catching-up web technologies - an endless storyCatching-up web technologies - an endless story
Catching-up web technologies - an endless story
 
Web Leaps Forward
Web Leaps ForwardWeb Leaps Forward
Web Leaps Forward
 
Ajax Performance
Ajax PerformanceAjax Performance
Ajax Performance
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Java Performance: What developers must know