arminw 2005/12/29 15:59:31
Modified: src/doc/forrest/src/documentation/content/xdocs/docu/guides
Tag: OJB_1_0_RELEASE performance.xml platforms.xml
repository.xml
src/doc/forrest/src/documentation/content/xdocs Tag:
OJB_1_0_RELEASE site.xml
Log:
update docs
Revision Changes Path
No revision
No revision
1.1.2.5 +111 -146
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/performance.xml
Index: performance.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/performance.xml,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- performance.xml 14 Dec 2005 01:19:19 -0000 1.1.2.4
+++ performance.xml 29 Dec 2005 23:59:31 -0000 1.1.2.5
@@ -80,7 +80,7 @@
<a href="#multithreaded-performance">virtual multithreaded
environment</a>. Further on it is possible to
<a href="#compares-to-other">compare OJB against any O/R
mapping tool</a> using a simple
- framework.
+ <em>performance application</em>.
</p>
<p>
All tests are integrated in the OJB build script, you only
need to
@@ -153,90 +153,45 @@
<p>
If running OJB out of the box the tests will be
performed against
- the Hypersonic SQL shipped with OJB. A typical output
looks like
- follows:
+ the Hypersonic SQL (in-memory mode) shipped with OJB.
+ A typical console output looks like follows:
</p>
<source><![CDATA[
performance:
[ojb] .[performance] INFO: Test for PB-api
[ojb] [performance] INFO:
- [ojb] [performance] INFO: inserting 1500 Objects: 625 msec
- [ojb] [performance] INFO: updating 1500 Objects: 375 msec
- [ojb] [performance] INFO: querying 1500 Objects: 31 msec
- [ojb] [performance] INFO: querying 1500 Objects: 16 msec
- [ojb] [performance] INFO: fetching 1500 Objects: 188 msec
- [ojb] [performance] INFO: deleting 1500 Objects: 140 msec
- [ojb] [performance] INFO:
[ojb] [performance] INFO: inserting 1500 Objects: 188 msec
[ojb] [performance] INFO: updating 1500 Objects: 265 msec
[ojb] [performance] INFO: querying 1500 Objects: 0 msec
[ojb] [performance] INFO: querying 1500 Objects: 0 msec
[ojb] [performance] INFO: fetching 1500 Objects: 16 msec
[ojb] [performance] INFO: deleting 1500 Objects: 63 msec
- [ojb] [performance] INFO:
- [ojb] [performance] INFO: inserting 1500 Objects: 187 msec
- [ojb] [performance] INFO: updating 1500 Objects: 282 msec
- [ojb] [performance] INFO: querying 1500 Objects: 15 msec
- [ojb] [performance] INFO: querying 1500 Objects: 0 msec
- [ojb] [performance] INFO: fetching 1500 Objects: 31 msec
- [ojb] [performance] INFO: deleting 1500 Objects: 110 msec
-
+....
[ojb] Time: 5,672
-
[ojb] OK (1 test)
[jdbc] .[performance] INFO: Test for JDBC
[jdbc] [performance] INFO:
- [jdbc] [performance] INFO: inserting 1500 Objects: 219 msec
- [jdbc] [performance] INFO: updating 1500 Objects: 219 msec
- [jdbc] [performance] INFO: querying 1500 Objects: 187 msec
- [jdbc] [performance] INFO: querying 1500 Objects: 94 msec
- [jdbc] [performance] INFO: fetching 1500 Objects: 16 msec
- [jdbc] [performance] INFO: deleting 1500 Objects: 62 msec
- [jdbc] [performance] INFO:
[jdbc] [performance] INFO: inserting 1500 Objects: 157 msec
[jdbc] [performance] INFO: updating 1500 Objects: 187 msec
[jdbc] [performance] INFO: querying 1500 Objects: 94 msec
[jdbc] [performance] INFO: querying 1500 Objects: 94 msec
[jdbc] [performance] INFO: fetching 1500 Objects: 16 msec
[jdbc] [performance] INFO: deleting 1500 Objects: 62 msec
- [jdbc] [performance] INFO:
- [jdbc] [performance] INFO: inserting 1500 Objects: 125 msec
- [jdbc] [performance] INFO: updating 1500 Objects: 219 msec
- [jdbc] [performance] INFO: querying 1500 Objects: 109 msec
- [jdbc] [performance] INFO: querying 1500 Objects: 110 msec
- [jdbc] [performance] INFO: fetching 1500 Objects: 0 msec
- [jdbc] [performance] INFO: deleting 1500 Objects: 62 msec
-
+....
[jdbc] Time: 8,75
-
[jdbc] OK (1 test)
[odmg] .[performance] INFO: Test for ODMG-api
[odmg] [performance] INFO:
- [odmg] [performance] INFO: inserting 1500 Objects: 750 msec
- [odmg] [performance] INFO: updating 1500 Objects: 516 msec
- [odmg] [performance] INFO: querying 1500 Objects: 1484 msec
- [odmg] [performance] INFO: querying 1500 Objects: 547 msec
- [odmg] [performance] INFO: fetching 1500 Objects: 78 msec
- [odmg] [performance] INFO: deleting 1500 Objects: 218 msec
- [odmg] [performance] INFO:
[odmg] [performance] INFO: inserting 1500 Objects: 266 msec
[odmg] [performance] INFO: updating 1500 Objects: 359 msec
[odmg] [performance] INFO: querying 1500 Objects: 531 msec
[odmg] [performance] INFO: querying 1500 Objects: 531 msec
[odmg] [performance] INFO: fetching 1500 Objects: 47 msec
[odmg] [performance] INFO: deleting 1500 Objects: 125 msec
- [odmg] [performance] INFO:
- [odmg] [performance] INFO: inserting 1500 Objects: 282 msec
- [odmg] [performance] INFO: updating 1500 Objects: 375 msec
- [odmg] [performance] INFO: querying 1500 Objects: 546 msec
- [odmg] [performance] INFO: querying 1500 Objects: 532 msec
- [odmg] [performance] INFO: fetching 1500 Objects: 31 msec
- [odmg] [performance] INFO: deleting 1500 Objects: 156 msec
-
+....
[odmg] Time: 13,75
-
[odmg] OK (1 test)]]></source>
<p>
Some notes on these test results:
@@ -277,7 +232,7 @@
<p>
It's easy to change target database. Please
refer to this
- <a href="platforms.html">document for details</a>.
+ <a href="site:platform/select-profile">document for
details</a>.
<br/>
Also it's possible to change the number of test objects
by
editing the ant-target in build.xml.
@@ -294,24 +249,19 @@
<title>OJB performance in multi-threaded environments</title>
<p>
This test was created to check the performance and
stability of the
- supported API's (PB-api, ODMG-api, JDO-api) in a
multithreaded environment.
- Also this test compares the api's and native JDBC.
+ supported API's (PB-api, ODMG-api and future API's) in a
single/multithreaded
+ environment and to compare the different api's against
native JDBC calls.
<br/>
- Running this test out of the box (a virgin OJB version
against hsql) shouldn't cause any problems.
- To run the JDO-api test too, see
- <a href="site:jdo-tutorial">JDO tutorial</a> and comment
in
- the test in target
- <code>perf-test</code> in
- <code>build.xml</code>
- </p>
- <fixme author="arminw">
- Tests for JDO API are currently missing.
- </fixme>
+ Running this test out of the box (a virgin OJB version
against hsql)
+ shouldn't cause any problems.
+ </p>
<p>
- Per default OJB use hsql as database, by changing the
JdbcConnectionDescriptor
- in the repository.xml file you can point to your
specific RDBMS. Please
+ Per default OJB use a in-memory hsql database, by
changing the
+ <a
href="site:repository/jdbc-connection-descriptor">JdbcConnectionDescriptor</a>
+ in the <em>repository.xml</em> file or modify the
<em>build.properties</em> file when
+ running OJB out of the box you can point to your
specific RDBMS. Please
refer to this
- <a href="site:platform">document for details</a>.
+ <a href="site:platform/select-profile">document for
details</a>.
</p>
<p>
@@ -320,25 +270,53 @@
<source><![CDATA[
ant perf-test]]></source>
<p>
- A typical output of this test looks like (OJB against
in-memory hsql, this
- shows the overhead caused by the O/R layer):
+ A typical output of this test, using OJB against
in-memory hsql looks like this
</p>
<source><![CDATA[
-[ojb] ================================================================
-[ojb] OJB PERFORMANCE TEST SUMMARY
-[ojb] 12 concurrent threads, handle 500 objects per thread
-[ojb] - performance mode - results per thread
-[ojb] ================================================================
-[ojb] API Period Total Total Insert Fetch Update Delete
-[ojb] [sec] [sec] [%] [msec] [msec] [msec] [msec]
-[ojb] ----------------------------------------------------------------
-[ojb] JDBC 2.533 2.243 100 1215 29 731 266
-[ojb] PB 3.181 2.835 126 1397 89 940 409
-[ojb] ODMG 3.862 2.965 132 1526 63 902 472
-[ojb] OTM 5.846 5.225 233 2720 70 1424 1009
-[ojb] ================================================================
-
-[ojb] PerfTest takes 125 [sec]]]></source>
+[ojb]
================================================================================================
+[ojb] OJB PERFORMANCE TEST SUMMARY, Thu Dec 29 23:42:20 CET 2005
+[ojb]
------------------------------------------------------------------------------------------------
+[ojb] 12 concurrent threads, handle 500 objects per thread
+[ojb] 500 INSERT operations per test instance
+[ojb] FETCH collection of 500 objects per test instance
+[ojb] Repeat FETCH collection of 500 objects per test instance
+[ojb] 125 get by Identity calls per test instance
+[ojb] 500 UPDATE operations per test instance
+[ojb] 500 DELETE operations per test instance
+[ojb] - performance mode - results per test instance (average)
+[ojb]
================================================================================================
+[ojb] API Total Insert Fetch Fetch 2 by Id
Update Delete
+[ojb] [%] [msec] [msec] [msec] [msec]
[msec] [msec]
+[ojb]
------------------------------------------------------------------------------------------------
+[ojb] JDBC 100 475(100%) 26(100%) 23(100%) 209(836%)
477(100%) 197(100%)
+[ojb] PB 203 1341(282%) 153(588%) 151(656%) 25(100%)
648(135%) 239(121%)
+[ojb] ODMG 250 1469(309%) 104(400%) 105(456%) 527(2108%)
800(167%) 569(288%)
+[ojb]
================================================================================================
+[ojb] PerfTest takes 70 [sec]]]></source>
+ <p>
+ This test run shows the overhead caused by the O/R layer
compared to handcoded sql
+ statements. Most overheads results in populate the
two-level cache which is useless
+ when using a in-memory database.
+ </p>
+ <p>
+ Below you can see the same test against <em>MaxDB</em>
running on the same machine
+ </p>
+ <source><![CDATA[
+....
+[ojb]
================================================================================================
+[ojb] API Total Insert Fetch Fetch 2 by Id
Update Delete
+[ojb] [%] [msec] [msec] [msec] [msec]
[msec] [msec]
+[ojb]
------------------------------------------------------------------------------------------------
+[ojb] JDBC 100 5855(100%) 55(100%) 38(100%)
1628(5087%) 5588(184%) 4084(136%)
+[ojb] ODMG 117 12043(205%) 180(327%) 294(773%) 754(2356%)
3027(100%) 2988(100%)
+[ojb] PB 123 11577(197%) 94(170%) 84(221%) 32(100%)
4240(140%) 3193(106%)
+[ojb]
================================================================================================
+[ojb] PerfTest takes 440 [sec]
+ ]]></source>
+ <note>
+ The <em>performance test</em> output is written to
console and in a
+ file called <em>OJB-Performance-Result.txt</em>.
+ </note>
<p>
To change the test properties go to target
<code>perf-test</code>
@@ -366,18 +344,18 @@
<arg value=
"org.apache.ojb.compare.OJBPerfTest$JdbcPerfTest,
org.apache.ojb.compare.OJBPerfTest$PBPerfTest,
- org.apache.ojb.compare.OJBPerfTest$ODMGPerfTest,
- org.apache.ojb.compare.OJBPerfTest$OTMPerfTest"
+ org.apache.ojb.compare.OJBPerfTest$ODMGPerfTest"
/>
- <arg value="6"/>
<!-- test loops, default was 6 -->
- <arg value="12"/>
+ <arg value="6"/>
<!-- performed threads, default was 12 -->
- <arg value="500"/>
+ <arg value="12"/>
<!-- number of managed objects per thread, default was 500 -->
- <arg value="false"/>
+ <arg value="500"/>
<!-- if 'false' we use performance mode, 'true' we do run in stress
mode -->
-
+ <arg value="false"/>
+ <!-- if 'true' all log messages will be print -->
+ <arg value="true"/>
<jvmarg value="-Xms128m"/>
<jvmarg value="-Xmx256m"/>
</java>
@@ -395,7 +373,7 @@
<title>How OJB compares to other O/R mapping tools?</title>
<p>
Many user ask this question and there is more than one
answer. But OJB was
- shipped with a simple performance <em>"framework"</em>
(independend from OJB)
+ shipped with a simple <em>performance application</em>
(independend from OJB)
which allows a rudimentarily comparision of OJB with other
(java-based) O/R mapping tools.
<br/>
All involved classes can be found in dirctory
<em>[db-ojb]/src/test</em> in package
@@ -414,23 +392,22 @@
<strong>Steps to set up the test for other O/R
frameworks:</strong>
</p>
<ul>
- <li>Implement a class derived from
+ <li>
+ Implement a class derived from
<a href="ext:api/perf-test"><code>PerfTest</code></a>
</li>
- <li>Implement a class derived from
- <a
href="ext:api/perf-handle"><code>PerfHandle</code></a>
- </li>
- <li>[If persistent objects (used within your mapping
tool) must be derived from a specific
+ <li>
+ If persistent objects (used within your mapping
tool) must be derived from a specific
base class or must be implement a specific interface
write your own persistent
object class by implementing
<a
href="ext:api/perf-article"><code>PerfArticle</code></a>
- interface and <strong>override
- method</strong>
- <code>#newPerfArticle()</code> in your
<code>PerfHandle</code> implementation class.
+ interface and <strong>override method</strong>
<code>#newPerfArticle()</code>
+ in your <code>PerfTest</code> implementation class.
<br/>
- Otherwise a default implementation of
- <a
href="ext:api/perf-article"><code>PerfArticle</code></a>
- was used]
+ Otherwise a default implementation of interface <a
href="ext:api/perf-article"><code>PerfArticle</code></a>
+ was used.
+ <br/>
+ The default implementation class is
<code>org.apache.ojb.performance.PerfArticleImpl</code>.
</li>
</ul>
<p>
@@ -442,15 +419,12 @@
<code>org.apache.ojb.compare.OJBPerfTest</code> in the
test-sources directory
under
<code>[db-ojb]/src/test</code> (when using
source-distribution).
- This implementation class is used to compare performance of
the PB-API,
- ODMG-API, OTM-api and native JDBC.
</p>
<p>
- See more section
- <a href="#multithreaded-performance">multi-threaded
performance</a>.
- <code>OJBPerfTest</code>
- is made up of inner classes. At each case two inner classes
represent a test for
- one api (as described above).
+ This implementation class is used to compare the performance
of the PB-API,
+ ODMG-API, OTM-api and native JDBC (to bunch all API's, for
each API a static inner implementation class of
+ <a href="ext:api/perf-test"><code>PerfTest</code></a> was
used).
+ See more <a href="#multithreaded-performance">about
multi-threaded performance</a>.
</p>
<p>
@@ -483,17 +457,18 @@
[number of test loops]
[number of threads]
[number of insert/fetch/delete loops per thread]
-[boolean - run in stress mode if set true,
-run in performance mode if set false, default false]]]></source>
+[optional boolean - run in stress mode if set true,
+run in performance mode if set false, default false]
+[optional boolean - if 'true' all log messages will be print, else only a
test summary, default 'true']]]></source>
<p>
For example:
</p>
<source><![CDATA[
-java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000
false]]></source>
+java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000]]></source>
<p>
This will use <code>A_PerfTest</code> and
<code>B_PerfTest</code> and perform
three loops each loop run 10 threads and each thread operate
on 2000 objects. The
- test run in <em>performance</em> mode.
+ test run in <em>normal</em> mode and log all messages.
</p>
<p>
Take care of compareable configuration properties when run
@@ -520,40 +495,30 @@
</p>
<ul>
<li>
- The API you use, e.g. PB-api is much faster then the
ODMG-api. See
- <a href="site:faq/api-differences">which API</a> for
more information.
- </li>
- <li>
- The used <a href="site:object-cache">cache
implementation</a>.
+ <p>
+ The API you use, e.g. PB-api is much faster then
the ODMG-api. See
+ <a href="site:faq/api-differences">which API</a>
for more information.
+ </p>
</li>
- <li>
- ConnectionFactory implementation / Connection
pooling. See
+ <li><p>The used <a href="site:object-cache">cache
implementation</a>.</p></li>
+ <li><p>ConnectionFactory implementation / Connection
pooling. See
<a href="site:faq">connection pooling</a>
- for more information.
- </li>
- <li>
- PersistentField class implementation.See
- <a href="ext:ojb.properties">OJB.properties section
- 'PersistentFieldClass'</a> for more information.
- </li>
- <li>
- Used sequence manager implementation. See
+ for more information.</p></li>
+ <li><p>The <em>autocommit</em> setting of used
connections. For best performance
+ it's recommended to use <em>autocommit</em> 'false'
setting in the <em>jdbc-driver</em>
+ to avoid <code>Connection.setAutoCommit(...)</code>
calls by OJB.</p></li>
+ <li><p><a
href="site:advanced-technique/persistent-field"><code>PersistentField</code>
class
+ implementation</a>.See <a
href="ext:ojb.properties">OJB.properties section
+ 'PersistentFieldClass'</a> to change the
implementation.</p></li>
+ <li><p>Used sequence manager implementation. See
<a href="site:sequence-manager">sequence manager</a>
for
- more information.
- </li>
- <li>
- Use of batch mode (when supported by the DB). See
- <a href="ext:repository.dtd">repository.dtd
- element 'jdbc-connection-descriptor'</a>
- for more information.
- </li>
- <li>
- PersistenceBroker pool size. See
- <a href="ext:ojb.properties">OJB.properties</a> for
more information.
- </li>
- <li>
- The <em>JDBC driver</em> settings (e.g. statement
caching on/off).
- </li>
+ more information.</p></li>
+ <li><p>Use of <em>batch mode</em> (when supported by the
DB). See
+ <a
href="site:repository/jdbc-connection-descriptor"><em>jdbc-connection-descriptor</em></a>
+ <em>batch-mode</em> attribute for more
information.</p></li>
+ <li><p>PersistenceBroker pool size. See
+ <a href="ext:ojb.properties">OJB.properties</a> for
more information.</p></li>
+ <li><p>The <em>JDBC driver</em> settings (e.g. statement
caching on/off).</p></li>
</ul>
<p>
To test the different settings use the tests of the
1.1.2.5 +2 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml
Index: platforms.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- platforms.xml 14 Dec 2005 01:19:19 -0000 1.1.2.4
+++ platforms.xml 29 Dec 2005 23:59:31 -0000 1.1.2.5
@@ -318,6 +318,7 @@
This section describes how to use it.
</p>
<section>
+ <anchor id="select-profile"/>
<title>Selecting a platform profile</title>
<p>
OJB ships with support for several popular database
platforms.
1.1.2.16 +14 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
Index: repository.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -u -r1.1.2.15 -r1.1.2.16
--- repository.xml 18 Dec 2005 02:14:38 -0000 1.1.2.15
+++ repository.xml 29 Dec 2005 23:59:31 -0000 1.1.2.16
@@ -281,6 +281,19 @@
OJB switches off batch modus, thus you have to do
'...setBatchMode(true)' on each obtained PB instance
again.
</p>
+ <note>
+ OJB 1.0.4 and earlier:
+ <br/>
+ When using <a
href="site:sequence-manager/identity-columns">database identity columns</a>
+ it's not allowed to enable <em>batch mode</em> for
insert operations.
+ <br/>
+ When using <a
href="site:lock-manager/optimistic-locking">optimistic locking</a> the
+ version check will always succeed for update
operations when <em>batch-mode</em>
+ is enabled - take care!!.
+ <br/>
+ <br/>
+ This will be fixed and automatically handled by OJB
till next major release.
+ </note>
<p>
The
<em>useAutoCommit</em>
No revision
No revision
1.3.2.25 +2 -1
db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml
Index: site.xml
===================================================================
RCS file:
/home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml,v
retrieving revision 1.3.2.24
retrieving revision 1.3.2.25
diff -u -r1.3.2.24 -r1.3.2.25
--- site.xml 19 Dec 2005 16:54:51 -0000 1.3.2.24
+++ site.xml 29 Dec 2005 23:59:31 -0000 1.3.2.25
@@ -121,6 +121,7 @@
</odmg-guide>
<platform label="Platform settings" href="platforms.html">
<internal-tables href="#internal-tables"/>
+ <select-profile href="#select-profile"/>
</platform>
<ojb-properties label="OJB propertyfile"
href="ojb-properties.html"/>
<jdbc-types label="JDBC Types" href="jdbc-types.html">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]