Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

Tool Report: IronEye SQL

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Published May 2003

The JavaPerformanceTuning.com Tool Reports are designed to help readers make informed choices about the tools they may wish to use. JavaPerformanceTuning.com provides these reports as a service to our readers; JavaPerformanceTuning.com is not responsible for the information provided by the tool author or vendor, nor do we necessarily endorse the products mentioned. JavaPerformanceTuning.com is not responsible for any additional resources provided from the article (such as downloadable files or other accessible material), even where we host such material.

TABLE OF CONTENTS

  1. Introduction
  2. How it Works
  3. Installing IronEye SQL
  4. How to Use IronEye SQL
  5. Customizing Filters
  6. Query Optimization
  7. Suggested Optimizations
  8. Conclusion
  9. Obtaining a Free Trial Version
  10. About IronGrid

Introduction

In typical application development, one of the most constrained resources (and causes of "slowness") is database access.? In general, sending requests over the wire (network I/O) and getting data from persistent storage (reading and writing to the database) are the two places that can cause performance deficiencies orders of magnitude greater than using a bubble sort instead of a quick sort.

IronEye SQL is a new tool from IronGrid that helps developers uncover some of the most bedeviling JDBC performance problems?slow queries, degrading performance, and beans that thrash the database?by providing an elegant way to intercept and time every interaction between an application (or application server) and a database.?? Using a JDBC driver wrapper, IronEye SQL provides Swing-based charts and graphs to analyze the performance of each SQL query.? It works with any JDBC compatible database, intercepts every database call, and requires no changes to source code.

How it Works

IronEye SQL provides a JDBC driver wrapper that a developer substitutes for the application?s native driver.? The wrapper intercepts all SQL being passed between an application (or application server) and a database.? Using a Java Swing-based GUI (similar to JMeter), developers can sort or filter SQL statements by various criteria.? Unlike other JDBC profiling tools, IronEye SQL does not require the installation and maintenance of its own separate application server.? Each developer in the organization can independently install and use the IronEye SQL GUI on his own machine without affecting the rest of the organization.

Also, because IronEye SQL relies on a vendor-neutral SQL wrapper, it can be used on Oracle, Sybase, Microsoft SQL Server, MySQL, Foxpro?and any other database for which a JDBC wrapper is available.

Installing IronEye SQL

Installation simply involves swapping the current JDBC driver for the driver wrapper, and then configuring the wrapper to use your original driver.? Start-to-finish, installation should take about 15 minutes.

The first step is to download the 30-day free trial software from http://www.irongrid.com/ironeyesql.? The basic steps to set up the program are:

  1. Run the installer program, ironeyesql-install-1.0.nnn.exe.? The installer will prompt you for an installation directory.

  2. When installation completes, the IronEye SQL application automatically starts and prompts you to configure your JDBC driver.

    In the Configuration dialog, enter the hostname of the machine on which the JDBC driver wrapper will be running.? If the application is running on your local machine, enter ?localhost?.

    Next, select the Port the driver will use to communicate with the GUI.? Port 3000 is configured by default, so you may need to change the setting if another application is already using that port.

    Finally, leave the Refresh Interval setting at 5000, unless you would like the GUI to poll the wrapper driver more frequently (set it lower to poll more frequently).

  3. Go to the IronEye SQL installation directory that you specified in Step 1.? The top-level directory (e.g. C:\Program Files\IronGrid\IronEyeSql), contains three files:

    ironeyesql.jar
    p6spy.jar
    spy.properties

    Copy these files into your application (or application server?s) classpath.?

    Since each app server is different, customized instructions are available at: http://www.irongrid.com/documentation/ for numerous application servers (e.g. Weblogic, JBoss, Tomcat, Websphere, Resin, and others).

  4. Edit your application?s current JDBC configuration and point the driver to:

    com.p6spy.engine.spy.P6SpyDriver

  5. Open to the directory to which you copied the spy.properties file.? Edit the spy.properties file and point it to your original JDBC driver (this example assumes it is Oracle):

    realdriver = oracle.jdbc.driver.OracleDriver

    Also in the spy.properties file, configure the port number that will be used to share the profiling data with the GUI (this should be the same port number you selected in Step 2, port 3000).

    monitorport=3000

  6. You configuration is now complete.? You can start your application server or database application and IronEye SQL will automatically intercept and analyze your SQL data.

  7. Return to the IronEye SQL application and click the Connect button.? If IronEye SQL is not currently running, click Start -> Programs -> IronEyeSql -> IronEyeSql.

You can Connect and Disconnect to your application?s profiling data by clicking ?Connect? and ?Disconnect.?? Whenever your application sends a SQL query to the database, IronEye SQL will register a line in the console for each query.

How to Use IronEye SQL

As your application runs, each database query sent to the JDBC layer will appear in IronEye SQL?s interface.?

The application allows you to sort queries based on:

a) the number of times the query was called,

b) the query?s average total time,

c) the query?s maximum time


Clicking on an individual query displays more detailed performance data in the bottom of the console via three graphs, which include: Rows Returned, Time Performance, and Count.?

In addition to reporting the overall time for each query, IronEye SQL also reports Preparation time, Execution time, and Retrieval time for each query.

IronEye SQL also features an Export utility that enables users to export performance data in a HTML formatted document.? This allows users to share performance testing results with others, such as other developers or third-party software vendors whose code may be responsible for performance degradation.

Customizing Filters

Because IronEye SQL captures every query sent by an application, the interface provides filtering capabilities.? Filtering will help you focus on key tables or the most problematic queries, suppressing those that are within expected performance boundaries.

For example, to filter the queries so that only those queries that average more than one (1) second, enter ?1000? in the left-most Average Time field, and click Apply Filter (not pictured).

Or, to filter queries so that only those queries that have never executed in anything less than one (1) second are displayed, enter ?1000? in the left-most Min Time field, and click Apply Filter (pictured below).

To filter only certain queries, enter the entire query in the SQL field, and click Apply Filter (not pictured).

Query Optimization

The data IronEye SQL produces helps developers discover and test optimizations.? Instead of putting blind trust in a black box optimization engine or a monolithic suite of third-party software, IronEye SQL gives developers control over the optimizations that are appropriate for their application.? This approach focuses on addressing the root cause of performance problems and the least expensive, most reliable solution?better code.


Suggested Optimizations

Armed with information from IronEye SQL, developers can return to their code to focus on improving the queries that harm database performance the most.? Following is a list of improvements based on the types of problems that IronEye SQL commonly uncovers:

Conclusion

Database performance problems can be the hidden killer in overall application performance.? With complex applications, encapsulation, and automated O/R mapping frameworks, database performance problems can go unnoticed until the worst possible time?just as an application?s usage begins to rise.? IronEye SQL equips developers with the tools to analyze query performance early, and fix performance problems at their root.

By operating as a JDBC wrapper, IronEye SQL requires no code changes.? Analytical data is presented via a Java Swing interface, avoiding the need to install, set up, and maintain a separate application server specific to performance tuning.? Morever, IronEye SQL does not require changes to production systems or architecture.?

IronEye SQL is an inexpensive tool (priced at $195 through 5/31/2003 and $395 thereafter) that you can install and configure in under 15-minutes, requires no code changes, and provides instant insight into one of the most insidious sources of performance problems.

Obtaining a free trial version

To obtain a free 30-day trial version of IronEye SQL, download a copy from ?http://www.irongrid.com/ironeyesql.? Download IronEye SQL before May 31, 2003 and you will automatically be entered in a contest for $2,500 in cash (please see http://www.irongrid.com/catalog/promotion_home.php for complete contest details).


About IronGrid

IronGrid, Inc. provides lightweight Java development tools that solve specific problems and provide immediate results to Java application developers.? Products are affordably priced for wide usage, can be installed quickly, and require no changes to a developer?s source code.? IronGrid focuses on products that enable software performance turning throughout the development cycle, to help developers deliver software that is on time, on budget, and on spec.? The tools support a practice called continuous performance. ?Like continuous integration, continuous performance is an extreme programming extension that favors performance testing throughout the entire lifecycle of an application. IronGrid is venture-backed and headquartered in Austin, Texas.


Last Updated: 2024-04-28
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/tools/ironeyesql/index.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us