SlideShare a Scribd company logo
© 2013 IBM Corporation
Rick Curtis – Staff Software Engineer
29 September 2013
JPA Performance Myths
Session ID : BOF4454
© 2013 IBM Corporation
Important Disclaimers
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR
INFRASTRUCTURE DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT
PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE
USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR
SUPPLIERS AND/OR LICENSORS
2
© 2013 IBM Corporation
Introduction to the speaker – Rick Curtis
 Have been working in the industry for over 7 years
 Committer and PMC member for the Apache
OpenJPA project.
 Heavily focused on performance of JPA when
running inside of WebSphere Application Server.
Contact info : rgcurtis@us.ibm.com
 Visit the IBM booth #5112 and meet other IBM
developers at JavaOne 2013
3
© 2013 IBM Corporation
Agenda
4
 Evangelism
 The crux
 Who wants to go fast?
 Getting dirty
 Outliers
 TL;DL
 Questions
© 2013 IBM Corporation
Evangelism
5
 Fastest JPA implementation on [the face of the Earth | ever | etc]!
 Is 10x faster than other JPA solutions
 Provider [x] is much [faster, scalable, etc, etc] than [y]
 Anything that is claiming a new world record
 General fanboy presentations
Always view these with some amount of skepticism.
© 2013 IBM Corporation
The crux
6
 Lots of configuration options
 Different default values
 Spec compliant, yet differences in behavior
© 2013 IBM Corporation
Who wants to go fast?
7
 Depending on the provider, configure weaving
 Pooling
– EntityManagers, EntityManagerFactories, connections
 Caching
– Data cache, object cache, ReadOnly cache, query cache, sql cache, caching
connections
 Proper mapping / JPA usage
– Developers must have some relational database knowledge
– Only load the required data
– Minimize database trips
– Entity Graph API
© 2013 IBM Corporation
Getting dirty
8
 Understand your application inside and out
 Use an SQL profiling tool to gather every SQL statement that comes from your application,
and understand where each one comes from.
– OpenJPA SQL Profiler
– EclipseLink Profiler
– Numerous commercial Hibernate tools
– jdbcGrabber – google code
© 2013 IBM Corporation
Getting dirty
9
 Understand your application inside and out
 Use an SQL profiling tool to gather every SQL statement that comes from your application,
and understand where each one comes from.
© 2013 IBM Corporation
Getting dirty
10
 Understand your application inside and out
 Use an SQL profiling tool to gather every SQL statement that comes from your application,
and understand where each one comes from.
– OpenJPA SQL Profiler
– EclipseLink Profiler
– Reference Hibernate tool
– jdbcGrabber -- google
 Once you are able to identify where every query comes from, then you can start to figure out
where caching makes the most sense.
 Break an application down into small use cases to try to optimize
© 2013 IBM Corporation
TL;DL
11
 A benchmark is a benchmark and unless your application is a benchmark, your mileage may
vary
 Thorough understand of an application will go many more miles than switching JPA
providers.
 Enabling intelligent caching in your application will show the most dramatic performance
improvements
 Think of the database as your enemy, you don’t want to talk to him unless you must.
 If performance is your #1, #2, and #3 concern, use JDBC.
© 2013 IBM Corporation
Help wanted
12
 JPA 2.1 Roadmap -- http://openjpa.apache.org/jpa-2.1-roadmap.html
 JPA 2.1 Tasks -- http://openjpa.apache.org/jpa-2.1-tasks.html
© 2013 IBM Corporation
Questions ?
13
http://ibm.co/JavaOne2013

More Related Content

What's hot (20)

PDF
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Arun Gupta
 
PDF
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Edward Burns
 
PDF
Java Enterprise Edition 6 Overview
Eugene Bogaart
 
PPT
JavaScript Frameworks and Java EE – A Great Match
Reza Rahman
 
PPTX
Ed presents JSF 2.2 and WebSocket to Gameduell.
Edward Burns
 
PDF
Burns jsf-confess-2015
Edward Burns
 
PDF
JSF 2.2 Input Output JavaLand 2015
Edward Burns
 
PDF
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
Chris Muir
 
DOC
The Complete Spring Tutorial
cribes
 
PDF
Best Practices for Monitoring Postgres
EDB
 
PDF
A Java Implementer's Guide to Better Apache Spark Performance
Tim Ellison
 
PPTX
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
 
PDF
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
 
PDF
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
Chris Muir
 
PDF
Oracle ADF Architecture TV - Development - Performance & Tuning
Chris Muir
 
PDF
WebSocket in Enterprise Applications 2015
Pavel Bucek
 
PDF
Con9437 ad ffor_ebs and mobile
Berry Clemens
 
PDF
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Chris Muir
 
PDF
Oracle ADF Architecture TV - Development - Programming Best Practices
Chris Muir
 
PDF
Oracle ADF Architecture TV - Design - ADF Service Architectures
Chris Muir
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Arun Gupta
 
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Edward Burns
 
Java Enterprise Edition 6 Overview
Eugene Bogaart
 
JavaScript Frameworks and Java EE – A Great Match
Reza Rahman
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Edward Burns
 
Burns jsf-confess-2015
Edward Burns
 
JSF 2.2 Input Output JavaLand 2015
Edward Burns
 
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
Chris Muir
 
The Complete Spring Tutorial
cribes
 
Best Practices for Monitoring Postgres
EDB
 
A Java Implementer's Guide to Better Apache Spark Performance
Tim Ellison
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
 
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
 
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
Chris Muir
 
Oracle ADF Architecture TV - Development - Performance & Tuning
Chris Muir
 
WebSocket in Enterprise Applications 2015
Pavel Bucek
 
Con9437 ad ffor_ebs and mobile
Berry Clemens
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Chris Muir
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Chris Muir
 
Oracle ADF Architecture TV - Design - ADF Service Architectures
Chris Muir
 

Viewers also liked (9)

PDF
JavaOne 2013: Garbage Collection Unleashed - Demystifying the Wizardry
Ryan Sciampacone
 
PDF
Resource management in java bof6823 - java one 2012
JavaNgmr
 
PDF
JavaOne 2012 CON3978 Scripting Languages on the JVM
PaulThwaite
 
PDF
JavaOne BOF 5957 Lightning Fast Access to Big Data
Brian Martin
 
PDF
JVM Multitenancy (JavaOne 2012)
Graeme_IBM
 
PPT
Efficient Memory and Thread Management in Highly Parallel Java Applications
pkoza
 
ODP
Windows Debugging Tools - JavaOne 2013
MattKilner
 
PDF
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
timfanelli
 
PDF
InterConnect: Server Side Swift for Java Developers
Chris Bailey
 
JavaOne 2013: Garbage Collection Unleashed - Demystifying the Wizardry
Ryan Sciampacone
 
Resource management in java bof6823 - java one 2012
JavaNgmr
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
PaulThwaite
 
JavaOne BOF 5957 Lightning Fast Access to Big Data
Brian Martin
 
JVM Multitenancy (JavaOne 2012)
Graeme_IBM
 
Efficient Memory and Thread Management in Highly Parallel Java Applications
pkoza
 
Windows Debugging Tools - JavaOne 2013
MattKilner
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
timfanelli
 
InterConnect: Server Side Swift for Java Developers
Chris Bailey
 
Ad

Similar to JPA Performance Myths -- JavaOne 2013 (20)

PDF
Haj 4308-open jpa, eclipselink, and the migration toolkit
Kevin Sutter
 
PDF
InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)
Kevin Sutter
 
PPTX
Web 2.0 Development with IBM DB2
Vladimir Bacvanski, PhD
 
PPTX
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
PPT
W-JAX Performance Workshop - Database Performance
Alois Reitbauer
 
PPT
Gentle into to DataGrid technology and customer use cases
Billy Newport
 
PPT
Accelerated data access
gordonyorke
 
PDF
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
WASdev Community
 
PDF
AAI 2235-OpenJPA and EclipseLink Usage Scenarios Explained
Kevin Sutter
 
PDF
Java persistence api 2.1
Rakesh K. Cherukuri
 
PDF
JPA 2.1 performance tuning tips
osa_ora
 
PPT
High Performance Jdbc
Sam Pattsin
 
PDF
Hibernate ORM: Tips, Tricks, and Performance Techniques
Brett Meyer
 
PPTX
Advance java session 5
Smita B Kumar
 
PDF
High performance database applications with pure query and ibm data studio.ba...
Vladimir Bacvanski, PhD
 
PPTX
SeaJUG May 2012 mybatis
Will Iverson
 
PPT
ORM Concepts and JPA 2.0 Specifications
Ahmed Ramzy
 
PDF
Performance tuning the Spring Pet Clinic sample application
Julien Dubois
 
PPTX
Effiziente persistierung
Thorben Janssen
 
PPT
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
Haj 4308-open jpa, eclipselink, and the migration toolkit
Kevin Sutter
 
InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)
Kevin Sutter
 
Web 2.0 Development with IBM DB2
Vladimir Bacvanski, PhD
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
W-JAX Performance Workshop - Database Performance
Alois Reitbauer
 
Gentle into to DataGrid technology and customer use cases
Billy Newport
 
Accelerated data access
gordonyorke
 
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
WASdev Community
 
AAI 2235-OpenJPA and EclipseLink Usage Scenarios Explained
Kevin Sutter
 
Java persistence api 2.1
Rakesh K. Cherukuri
 
JPA 2.1 performance tuning tips
osa_ora
 
High Performance Jdbc
Sam Pattsin
 
Hibernate ORM: Tips, Tricks, and Performance Techniques
Brett Meyer
 
Advance java session 5
Smita B Kumar
 
High performance database applications with pure query and ibm data studio.ba...
Vladimir Bacvanski, PhD
 
SeaJUG May 2012 mybatis
Will Iverson
 
ORM Concepts and JPA 2.0 Specifications
Ahmed Ramzy
 
Performance tuning the Spring Pet Clinic sample application
Julien Dubois
 
Effiziente persistierung
Thorben Janssen
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
Ad

Recently uploaded (20)

PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 

JPA Performance Myths -- JavaOne 2013

  • 1. © 2013 IBM Corporation Rick Curtis – Staff Software Engineer 29 September 2013 JPA Performance Myths Session ID : BOF4454
  • 2. © 2013 IBM Corporation Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2
  • 3. © 2013 IBM Corporation Introduction to the speaker – Rick Curtis  Have been working in the industry for over 7 years  Committer and PMC member for the Apache OpenJPA project.  Heavily focused on performance of JPA when running inside of WebSphere Application Server. Contact info : [email protected]  Visit the IBM booth #5112 and meet other IBM developers at JavaOne 2013 3
  • 4. © 2013 IBM Corporation Agenda 4  Evangelism  The crux  Who wants to go fast?  Getting dirty  Outliers  TL;DL  Questions
  • 5. © 2013 IBM Corporation Evangelism 5  Fastest JPA implementation on [the face of the Earth | ever | etc]!  Is 10x faster than other JPA solutions  Provider [x] is much [faster, scalable, etc, etc] than [y]  Anything that is claiming a new world record  General fanboy presentations Always view these with some amount of skepticism.
  • 6. © 2013 IBM Corporation The crux 6  Lots of configuration options  Different default values  Spec compliant, yet differences in behavior
  • 7. © 2013 IBM Corporation Who wants to go fast? 7  Depending on the provider, configure weaving  Pooling – EntityManagers, EntityManagerFactories, connections  Caching – Data cache, object cache, ReadOnly cache, query cache, sql cache, caching connections  Proper mapping / JPA usage – Developers must have some relational database knowledge – Only load the required data – Minimize database trips – Entity Graph API
  • 8. © 2013 IBM Corporation Getting dirty 8  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from. – OpenJPA SQL Profiler – EclipseLink Profiler – Numerous commercial Hibernate tools – jdbcGrabber – google code
  • 9. © 2013 IBM Corporation Getting dirty 9  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from.
  • 10. © 2013 IBM Corporation Getting dirty 10  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from. – OpenJPA SQL Profiler – EclipseLink Profiler – Reference Hibernate tool – jdbcGrabber -- google  Once you are able to identify where every query comes from, then you can start to figure out where caching makes the most sense.  Break an application down into small use cases to try to optimize
  • 11. © 2013 IBM Corporation TL;DL 11  A benchmark is a benchmark and unless your application is a benchmark, your mileage may vary  Thorough understand of an application will go many more miles than switching JPA providers.  Enabling intelligent caching in your application will show the most dramatic performance improvements  Think of the database as your enemy, you don’t want to talk to him unless you must.  If performance is your #1, #2, and #3 concern, use JDBC.
  • 12. © 2013 IBM Corporation Help wanted 12  JPA 2.1 Roadmap -- http://openjpa.apache.org/jpa-2.1-roadmap.html  JPA 2.1 Tasks -- http://openjpa.apache.org/jpa-2.1-tasks.html
  • 13. © 2013 IBM Corporation Questions ? 13 http://ibm.co/JavaOne2013