|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 10
Messages: 10
Messages: 10
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Vincent Partington: Top 10 Java EE performance problems
For the last two and a half months, Vincent Partington has been blogging about the top ten Enterprise Java Application Performance Problems. The list:Now he wraps up the countdown with some conclusions about Enterprise Java performance in general:- First of all, Java developers should consider performance an importance quality requirement of their application to which they should pay attention from the start to the end of the project.
- Secondly, Java developers need to work with the people that can help them improve the performance of their application like application server and database administrators.
|
|
Message #231830
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Good list but not all specific to Java EE
This is a good list; however, some of these are generic enough to be performance issues for any application in any language. From my experience, I also find that #1 is the biggest performance issue (but again, regardless of platform/application).
|
|
Message #231881
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Good article
Hi Joseph,
This was indeed good article and a learning experience.
Here in our project we are not doing logging properly and mostly change code across project to implement in correct manner.Actually we are missing check of isDebugEnabled() :-)
Regarding database we are using hibernate so can you please suggest if any when using hibernate.
Thanks Prashant
|
|
Message #231885
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Good list but not all specific to Java EE
Dollar for Dollar I have found #1 and #7 to be the biggest two. Developers that have no interest in understanding relational data models have no business creating them and all too often it is the case that they do create them. As for #7 that would be my #1 the overuse of XML is horrendous. It is an absolute performance dog and unnecessary in probably 90% of the situations it is applied to. I find the entire concept of SOAP to be a moronic at best. We do not need human readable data languages for IPC or RPC we compact network optimized messaging that can reduce latency and memory overhead.
|
|
Message #231897
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
The list goes on
I'd like to add two points:
11) Use a proper category entry in log4j.xml, otherwise isDebugEnabled() will be useless (beware with Hibernate and JBossCache/JGroups for example). Only using the threshold in the appenders won't do.
12) Create indexes on the foreign key columns in your Oracle DB, otherwise the database will lock. At least for Oracle 9i and older. This is not an easy task. I wrote a small app that extracts the needed statements from the .hbm.xml (Hibernate) files.
|
|
Message #231912
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Good list but not all specific to Java EE
This is a good list; however, some of these are generic enough to be performance issues for any application in any language. From my experience, I also find that #1 is the biggest performance issue (but again, regardless of platform/application).
I have to agree here. The list is way too generic to be tied to Java or even Java EE. Nevertheless #1 remains the top performance issue in the average (Java) application. #1 quote:
Use the database for what’s it good at: referential integrity checking, validation, manipulation, selection and sorting of large data sets. Don’t do this stuff in your Java code. For example, don’t write two queries and then merge the results in Java: use a join. Seems obvious, but merging in Java still happens a lot. Think EJB n+1 problem!
While I won't say its a Java only problem I believe there is a large percentage of Java developers who don't know what a database is good at. Maybe it is just my impression but Joe average Java developer is capable of writing simple select, insert, update and delete statements, but never heard about different join types, unions or even inner selects. More importantly there are many so-called Java architects who completly ignore the importance of the database. In the end n+1 selects and other types of in-memory joins are the norm, not the exception. (At least they comply to a number of pattern and best practices ;)
Looking at the list again I see just one thing that is (remotely) specific to Java (and Java EE): the presence of arrogance and ignorance. Just show me another group of developers and architects that call for distributed caches to fix their n+1 issues...
|
|
Message #231913
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: The list goes on
Tobias,
I'd like to add two points: ... 12) Create indexes on the foreign key columns in your Oracle DB, otherwise the database will lock. At least for Oracle 9i and older. This is not an easy task. I wrote a small app that extracts the needed statements from the .hbm.xml (Hibernate) files.
that's why you usually hire an database expert and don't ask application developers to look for those issues;). For instance "the problem" you talk about is a well-known, well-documented topic. Look at chapter "Data Integrity" in "Oracle Server Application Developer Guide". You will find everything you need to know at least since 7i.
So I would say: 12) Always have a DBA in your project team. 13) Never ever design your ER schema top down.
|
|
Message #231917
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Good list but not all specific to Java EE
Use the database for what’s it good at: referential integrity checking, validation, manipulation, selection and sorting of large data sets.
Of course this depends on what you call a large dataset (relative to the amount of memory in your application servers) and how expensive it is to get the data in the first place.
Generally speaking it's much easier to add extra application servers than adding extra DB servers (this is especially true when using systems like PostgreSQL or MySQL). Therefor, many typical Java EE setups have multiple AS boxes served by one (large) central DB. In those situations I would not always blindly follow the rule of not sorting in Java.
Namely, every time I do a sort in Java on one of my application servers I'm offloading the DB. If the data is expensive to recreate (e.g. lots of aggregations over many rows) it's even faster to just do the simple sort in Java on the data that's already available on my AS. So, both total system utilization as well as performance can potentially be better. Not always, of course not, but the potential should be explored.
Don’t do this stuff in your Java code. For example, don’t write two queries and then merge the results in Java: use a join.
Even this is not always true. In some situations you may need a resultset where the type of one of the columns is another resulset. With some DBMS specific syntax you may be able to join and aggregate values to SQL arrays, but I don't think it's easy to aggregate a group of values to a resultset. If you need this sort of thing, it's often easier to just fire off two queries, create your own resultsets for the first query and insert those in each row of the second query. (but if you know of a neat way of how to do this in standard SQL, I'm open to suggestions ;) )
|
|
Message #231921
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Good list but not all specific to Java EE
#8 is Java/EE specific, but quite dated or not?
|
|
Message #231979
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
13) Never ever design your ER schema top down.
>13) Never ever design your ER schema top down.
What about those things like EJB3.JPA, JDO2 and Hibernate? Aren't they supposed to hide/abstract persistence DB from application domain model?
I think it has to be a good balance between DB relational design and application object domain design. Going far in either way may cause problems.
|
|
Message #231982
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Good list but not all specific to Java EE
This is a good list; however, some of these are generic enough to be performance issues for any application in any language. From my experience, I also find that #1 is the biggest performance issue (but again, regardless of platform/application).
I guess a lot of this issues aren't Java EE specific. The reason I choose that scope is because my experiences are based on Java EE projects and I figured it would be presumptuous to assume the same problems occurred in .NET or PHP or whatever.
Desktop apps probably have very different issues, but I'd be happy to call my list the list of enterprise/web performance problems. ;-)
Regards, Vincent.
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|