wood burning stoves 2.0*
The moose likes Struts and the fly likes Performance issues in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Performance issues in java" Watch "Performance issues in java" New topic
Author

Performance issues in java

sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Hi All,
Thanks in advance.
In our project we are using Struts1.0,Jsp,Servlets,Oracle9i,web sphere5.0.
We have completed development, and one of the major and very important requirement is that two consecutive pages timeinterval should be 2 sec.
But it is not working like that.We have followed very good coding rules.
Please tell me what are the different root causes which decreases the performance.

Thanks ,
Sree
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30924
    
158

Sree,
You need a profiler to see where the time is going. If we guess, you could tune the wrong thing. That said, the biggest bottleneck in a web application is usually the database.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Hi,
Thanks a lot for very useful reply.
We are not using any IDE of websphere, I searched on the net for profiler every where they are talking about specific to IDE.
We are using Eclipse and Websphere application server.
Please tell me how to use this profiler in this environment.

Regards,
Sree
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30924
    
158

Sree,
JProbe supports WebSphere 6.

You can verify/refute the "it's the database" theory with some System.out.printlns() to time that layer too.
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
Hi,
Thanks.
I read that doc in which they are telling that is a paied one.
And we have tested WILY tool but now i need which is better than this.
Please help me out.
Regards,
Sree
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30924
    
158

Sree,
I recommend starting a new thread in the IDEs and other Tools forum asking specifically about profiling tools. That's where people are most likely to know about this.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
<<You can verify/refute the "it's the database" theory with some System.out.printlns() to time that layer too.>>
Using the jamon open source jdbc driver is easier than this and it will give you
1) performance of all queries (hits/avg/total/min/max more),
2) Performance of all jdbc method calls,
3) If any exceptions are thrown it will track that too

No code changes are needed. Simply use the jamon jdbc driver to wrap the underlying driver. Here is an example. If you need further help let me know. Note JAMon will work with ANY JDBC driver.

JDBC Syntax Without JAMon: An example of how to connect to a database using a JDBC driver follows (The example uses Sybase, but any vendors driver would do)

Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
String url = "jdbc:sybase:Tds:MyServerDNS:2638";
Connection conn = DriverManager.getConnection(url, user, passWord);

JDBC Syntax With JAMon: The following code will use JAMon as a proxy to track performance, but uses the underlying driver to perform the queris (The example uses Sybase, but any vendors driver would do). Note no code changes would be required if connection strings were placed in a configuration file. The JAMon jar file must also be placed in the classpath.

Class.forName("com.jamonapi.proxy.JAMonDriver");
String url = "jdbc:jamon:sybase.Tds:MyServerDNS:2638?jamonrealdriver=com.sybase.jdbc2.jdbc.SybDriver";
Connection conn = DriverManager.getConnection(url, user, passWord);



For more info...
http://jamonapi.sourceforge.net/#WhatsNew22

You can look at the link below for a live demo of the type of data the jamon jdbc driver will give you...
[ May 07, 2007: Message edited by: steve souza ]

http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
2 seconds seems like quite an ambitions goal for a web based application. I think my project has requirements of something like 10 seconds for simple pages and 20 seconds for complex ones.

- Brent
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

If 2 seconds is the criterion, then the time needed by the client computer / browser to display your pages, and the network capacity become important factors.
On my computer, 2 seconds is the time that my (already started up) browser needs to display a static html file, text only, from my local c: drive.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
 
subject: Performance issues in java