-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
[EMAIL PROTECTED] wrote:
> <CONFIG>
> Apache JServ: 1.0b5
> Apache: 1.3.4.
> JDK: 1.1.7
> JSDK: 2.0
> OS: Solaris 2.6
> DBMS: Oracle 8.0.4.
> <\CONFIG>
>
> We're having very serious performance problems with the servlets we have
> developed. They run reports against and Oracle database, returning the
> results to the clients' browers. The reports take a fair amount of time (as
> much as 1 minute) to run since they contain a lot of data. The real problem
> is that two reports triggered simultaneously run approximately twice as
> slowly as one, three reports three times as slowly etc.
>
> We have identified a number of possible causes of this scalability problem
> all of which we have subsequently discounted:
>
> 1. Database locking: some of the reports are read-only and as such should
> not be locking the tables they access. Oracle profiling tools have indicated
> that no locks are being applied.
>
> 2. Database connections: again our Oracle profiling tools suggest that all
> the connections in our connection pool are being used more or less equally
> with no blocking. Furthermore we have written some test servlets which don't
> do any database access and the same problem still affects them.
>
> 3. Deadlocking in our Java code: the OptimizeIt Java profiling tool
> indicates that although the total time to run reports increases as the
> number of clients goes up, all our classes and methods are taking the same
> proportions of the total time. OptimizeIt should show up any bottlenecks
> which multi-client access causes but it doesn't seem to show any.
> We are not running any of our servlets with the SingleThreadModel. If we
> run two different reports (i.e. two different servlet classes) at the same
> time they both take about twice as usual.
>
> 4. System resources: since the reports are quite large, and involve a large
> number of objects being created on the server I have increased the starting
> heap size available to our JVM to 150M and the maximum heap size to 300M.
> This hasn't made any difference to our problem.
>
> As you can see we've tried to come at this problem in a number of ways with
> no success. Can anyone suggest any possible solutions? We're pretty well out
> of ideas ourselves!
What % CPU are you consuming ?
Is your database on the same machine ?
is Apache on the same machine ?
What is the box (x86, sparc ?)
does it swap ?
I think that :
- first, use JServ 1.0final and not a no more supported beta version
(soon _next week ?_ a 1.0.1 with performance improvements)
- Optimize you code again and again, avoid creating & deleting lots of
objects, try to reuse them if possible.
- use a good connection pool for JDBC.
- use synchronize only where useful.
- avoid verbose logging of messages (really important)
- Use JIT compiler.
- Sun claimed that Solaris 2.7 is faster. Try to upgrade.
- avoid swapping.
- try to put Apache on one machine, JServ on another, Oracle on another
one.
- try the load-balancing built in Apache-JServ, which was designed after
similar experiences. When your servlets will be 100% optimized, this
will be the only way.
hope this helps.
Jean-Luc
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]