You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by St...@hyperion.com on 2002/09/17 18:21:07 UTC

Slide 1.0.16 vs. Slide 1.1.0 Performance Test Results

After working with Christoper Lenz (thanks), I decided to step through the
code of the JDBCDescriptorsStore and JDBCContentStore classes and analyze
the difference between the 1.1.0 version (SLIDE_1_0 branch), and the 1.0.16
release.  The problem lies in the isConnected() method of both of these
classes in the following code segment:

PreparedStatement statement =
    connection.prepareStatement(getDatabaseConnectionTestStatement());
statement.executeQuery();
statement.close();

I ran a test using the Slide client and issuing a "ls" command against the
"files" directory.  The "ls" command issues two PROPFIND requests against
the WebDav servet, first with a level 0 and second with a level 1  (I
believe).  In my test, the "files" directory had 12 child resources (all
collections).  I ran this test three consecutive times and the results are
reported below:

Current 1.1.0 Version
------------------------------
15 Sep 2002 12:03:04 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 341 ms) URI = /files/
15 Sep 2002 12:03:12 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 7150 ms) URI = /files/

15 Sep 2002 12:03:16 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 431 ms) URI = /files/
15 Sep 2002 12:03:22 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 5828 ms) URI = /files/

15 Sep 2002 12:03:30 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 450 ms) URI = /files/
15 Sep 2002 12:03:36 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 5658 ms) URI = /files/


After Commenting Out Above Code
----------------------------------------------------
16 Sep 2002 10:05:16 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 10 ms) URI = /files/
16 Sep 2002 10:05:17 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 1212 ms) URI = /files/

16 Sep 2002 10:05:20 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 10 ms) URI = /files/
16 Sep 2002 10:05:20 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 70 ms) URI = /files/

16 Sep 2002 10:05:21 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 10 ms) URI = /files/
16 Sep 2002 10:05:21 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND =
 207 Multi-Status (time: 70 ms) URI = /files/


Next, I decided to see why there was such an enormous decrease in
performance so I setup output code to count the number of times that these
methods were called during the course of the PROPFIND.  I only counted the
second PROPFIND request.  As it turns out, each isConnected() method was
executed 794 times!!!!  Thats quite a lot for one request.  I am not sure
why the database needs to be "pinged" with a select statement each time the
isConnected() method gets called.

Here is my test environment:
Slide 1.1.0  (downloaded on 9/9/2002)
Tomcat 4.0.4
SQL Server 2000
Merant (DataDirect) 3.0 JDBC Drivers


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Slide 1.0.16 vs. Slide 1.1.0 Performance Test Results

Posted by Thomas Schueppel <t....@bit-side.com>.
Stan_Butler@hyperion.com wrote:
> After working with Christoper Lenz (thanks), I decided to step through the
> code of the JDBCDescriptorsStore and JDBCContentStore classes and analyze
> the difference between the 1.1.0 version (SLIDE_1_0 branch), and the 1.0.16
> release.  The problem lies in the isConnected() method of both of these
> classes in the following code segment:

	Hello Stan,

	we reported this about three months ago - but there seemed not
	to be much interest in this. Our solution was to just remove the
	'istConnected' calls. You may want to check

http://www.mail-archive.com/slide-dev@jakarta.apache.org/msg03917.html

	Cheers

		Thomas

-- 
Dipl.-Inf. Thomas Schüppel    Fon:   +49+30+394054-28
bit~side GmbH                 Fax:   +49+30+394054-50
Salzufer 14a / Aufgang D      Email: t.schueppel@bit-side.com
10587 Berlin                  WWW: http://www.bit-side.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Slide 1.0.16 vs. Slide 1.1.0 Performance Test Results

Posted by Raimo Ihle <r....@bit-side.com>.
Hi Stan,

I hit the same problem. Below is the mail I wrote about two months ago
concerning the same problem. Complete with patch, performance
measurements and traces to the four different kinds of network traffic
that isConnected() is causing. I thought the subject would attract at
least some attention, but ... I was wrong though, it was not 400000%
but only barely 40000% :-)

Ciao,
Raimo.
----------------------------------------------------------------------

Subject: How to increase Slide 2.0 WebDAV-MySQL performance 400000% ...
Date:    Mon, 08 Jul 2002 16:37:34 +0200
From:    Raimo Ihle <r....@bit-side.com>
Reply-To: "Slide Developers Mailing List" <sl...@jakarta.apache.org>
Organization:  bit~side GmbH
To:         Slide Developers Mailing List <sl...@jakarta.apache.org>

Hi Slide-devs,

I installed a current CVS-version of Slide and connected it with WebDAV
using Windows-Webfolders.

Performance for a PROPFIND (hit F5) on a folder containing about 20 
files and folders was not really thrilling but ok.
Then I changed the database from the internal HSQL to MySQL, running on
a different machine in our network. Now PROPFIND was very very
timeconsuming:

08 Jul 2002 16:03:43 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPFIND = 207 Multi-Status (time: 212856 ms) URI = /files/cebit2002

That's more than 3 minutes for a PROPFIND on a folder, containing about
20 other folders and files !

Profiling Slide suggested, that all time was spend on networked 
database-calls, almost all of them originating from two functions:

slidestore.reference.JDBCContentStore.isConnected()     and
slidestore.reference.JDBCDescriptorsStore.isConnected()

Each call to isConnected(), and there seem to be quite a few, results
in four networked database operations:
- connection.isClosed()
- connection.prepareStatement(...)
- statement.executeQuery()
- statement.close()

If I comment out those statements (patch attached), performance
increases
400000% to:

08 Jul 2002 16:24:36 - org.apache.slide.webdav.WebdavServlet - INFO -
PROPF
IND = 207 Multi-Status (time: 541 ms) URI = /files/cebit2002

Is isConnected() really neccessary ? If there is something wrong with
the
database connection, isn't Slide going to find out soon enough ?

Thanks,
Raimo.
-- 
Dipl.-Inform. Raimo Ihle               Tel: +49 (0)30 39 40 54 25
bit~side GmbH                          Fax: +49 (0)30 39 40 54 50
Salzufer 14a Aufgang D                 Email: r.ihle@bit-side.com
10587 Berlin                           WWW: <http://www.bit-side.com>




Index: JDBCContentStore.java
===================================================================
RCS file:
/home/cvspublic/jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java,v
retrieving revision 1.18
diff -r1.18 JDBCContentStore.java
362,363c362,364
<          try {
<              if ((connection == null) || (connection.isClosed())) {
---
> //         try {
> //             if ((connection == null) || (connection.isClosed())) {
>            if ((connection == null)) {
366,371c367,372
<              
<              PreparedStatement statement = 
<                 
connection.prepareStatement(getDatabaseConnectionTestStatement());
<              statement.executeQuery();
<              statement.close();
<              
---
> 
> //             PreparedStatement statement =
> //                 connection.prepareStatement(getDatabaseConnectionTestStatement());
> //             statement.executeQuery();
> //             statement.close();
> 
375,377c376,378
<          } catch (SQLException e) {
<              throw new ServiceAccessException(this, e);
<          }
---
> //         } catch (SQLException e) {
> //             throw new ServiceAccessException(this, e);
> //         }
Index: JDBCDescriptorsStore.java
===================================================================
RCS file:
/home/cvspublic/jakarta-slide/src/stores/slidestore/reference/JDBCDescriptorsStore.java,v
retrieving revision 1.32
diff -r1.32 JDBCDescriptorsStore.java
503,504c503,504
<         try {
<             if ((connection == null) || (connection.isClosed())) {
---
>  //       try {
>             if ((connection == null)) {
508,511c508,511
<             PreparedStatement statement = 
<                
connection.prepareStatement(getDatabaseConnectionTestStatement());
<             statement.executeQuery();
<             statement.close();
---
> //            PreparedStatement statement =
> //                connection.prepareStatement(getDatabaseConnectionTestStatement());
> //            statement.executeQuery();
> //            statement.close();
516,518c516,518
<         } catch (SQLException e) {
<             throw new ServiceAccessException(this, e);
<         }
---
> //        } catch (SQLException e) {
> //            throw new ServiceAccessException(this, e);
> //        }





--
To unsubscribe, e-mail:  
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>