Very poor performance when writing into db

classic Classic list List threaded Threaded
5 messages Options
tex
Reply | Threaded
Open this post in threaded view
|

Very poor performance when writing into db

tex
Hi,

I've just installed Tomee 1.0 Web Profile, I've copied eclipse* jar into the lib folder (EclipseLink JPA 2.0 persistence provider) and started the server with 512MB of heap (on a 4GB Notebook Ubuntu workstation).

The startup of Tomee was fine, my app was deployed but when I run my datapump process (reading data from CSV and writing to entity beans on MySQL db) the process is about 40x slower than Glassfish.

Apache tomee 1.0.0 web profile: process 1 csv record every 3 seconds (0.3 records/sec on empty db)
Glassfish 3.1.2.2: process 12 csv records every 1 second (12 records/sec on empty db)

To test the speed I've put System.out.println messages, maybe Glassfish has some optimizations for these kind of messages ?

The only strange thing I've noticed is that I've some warnings at tomee startup:

Can't load log handler "1catalina.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
Can't load log handler "1catalina.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
Can't load log handler "2localhost.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
Can't load log handler "3manager.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 3manager.org.apache.juli.FileHandler
Can't load log handler "4host-manager.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 4host-manager.org.apache.juli.FileHandler

I cannot understand, must I configure something into Tomee to speed up my session/entity beans ?

Many thanks in advance...
Reply | Threaded
Open this post in threaded view
|

Re: Very poor performance when writing into db

Romain Manni-Bucau
The warning are clearly weird.

About perf tomee doesnt configure a lot for eclipselink so i think you need
to do it through properties (glassfish has pby some more config).

Some thread stack can help too
Le 5 sept. 2012 11:41, "tex" <[hidden email]> a écrit :

> Hi,
>
> I've just installed Tomee 1.0 Web Profile, I've copied eclipse* jar into
> the
> lib folder (EclipseLink JPA 2.0 persistence provider) and started the
> server
> with 512MB of heap (on a 4GB Notebook Ubuntu workstation).
>
> The startup of Tomee was fine, my app was deployed but when I run my
> datapump process (reading data from CSV and writing to entity beans on
> MySQL
> db) the process is about 40x slower than Glassfish.
>
> Apache tomee 1.0.0 web profile: process 1 csv record every 3 seconds (0.3
> records/sec on empty db)
> Glassfish 3.1.2.2: process 12 csv records every 1 second (12 records/sec
> on
> empty db)
>
> To test the speed I've put System.out.println messages, maybe Glassfish has
> some optimizations for these kind of messages ?
>
> The only strange thing I've noticed is that I've some warnings at tomee
> startup:
>
> Can't load log handler "1catalina.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
> Can't load log handler "1catalina.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
> Can't load log handler "2localhost.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
> Can't load log handler "3manager.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 3manager.org.apache.juli.FileHandler
> Can't load log handler "4host-manager.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 4host-manager.org.apache.juli.FileHandler
>
> I cannot understand, must I configure something into Tomee to speed up my
> session/entity beans ?
>
> Many thanks in advance...
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Very-poor-performance-when-writing-into-db-tp4657289.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Very poor performance when writing into db

Bjorn Danielsson
In reply to this post by tex
In a minimalistic test, I got ~20 records per second with
Eclipselink on TomEE with MySQL database on 7200-rpm RAID-1,
and ~140 records/s on an SSD. The filesystem was ext4 with
the default options data=ordered,barrier=1 on both occasions,
and a KVM virtualization layer at the bottom.

Does your app have a lot of concurrency in the JPA transactions?
That's the only situation where I have seen slow performance from
Eclipselink, due to lock wait timeouts in MySQL UPDATE statements.

--
Bjorn Danielsson
Cuspy Code AB


tex <[hidden email]> wrote:

> Hi,
>
> I've just installed Tomee 1.0 Web Profile, I've copied eclipse* jar into the
> lib folder (EclipseLink JPA 2.0 persistence provider) and started the server
> with 512MB of heap (on a 4GB Notebook Ubuntu workstation).
>
> The startup of Tomee was fine, my app was deployed but when I run my
> datapump process (reading data from CSV and writing to entity beans on MySQL
> db) the process is about 40x slower than Glassfish.
>
> Apache tomee 1.0.0 web profile: process 1 csv record every 3 seconds (0.3
> records/sec on empty db)
> Glassfish 3.1.2.2: process 12 csv records every 1 second (12 records/sec on
> empty db)
>
> To test the speed I've put System.out.println messages, maybe Glassfish has
> some optimizations for these kind of messages ?
>
> The only strange thing I've noticed is that I've some warnings at tomee
> startup:
>
> Can't load log handler "1catalina.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
> Can't load log handler "1catalina.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
> Can't load log handler "2localhost.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
> Can't load log handler "3manager.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 3manager.org.apache.juli.FileHandler
> Can't load log handler "4host-manager.org.apache.juli.FileHandler"
> java.lang.ClassNotFoundException: 4host-manager.org.apache.juli.FileHandler
>
> I cannot understand, must I configure something into Tomee to speed up my
> session/entity beans ?
>
> Many thanks in advance...
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Very-poor-performance-when-writing-into-db-tp4657289.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
tex
Reply | Threaded
Open this post in threaded view
|

Re: Very poor performance when writing into db

tex
Hi,

many thanks for your responses....

@Romain:
I cannot figure out where to find glassfish configurations for EclipseLink optimizations... )

@Bjorn:
your tests seems good, in my linux box tomee is 40x slower than glassfish simply switching the deployment from glassfish to tomee (from netbeans), concurrency is the same of Glassfish because the app, the db, the persistence provider etc. are all the same, and I cannot understand where is the gotcha...

@All:
ASAP I'll try to investigate more deeply...
Reply | Threaded
Open this post in threaded view
|

Re: Very poor performance when writing into db

Romain Manni-Bucau
Just share some stacks and we'll understand ;)
Le 6 sept. 2012 21:54, "tex" <[hidden email]> a écrit :

> Hi,
>
> many thanks for your responses....
>
> @Romain:
> I cannot figure out where to find glassfish configurations for EclipseLink
> optimizations... )
>
> @Bjorn:
> your tests seems good, in my linux box tomee is 40x slower than glassfish
> simply switching the deployment from glassfish to tomee (from netbeans),
> concurrency is the same of Glassfish because the app, the db, the
> persistence provider etc. are all the same, and I cannot understand where
> is
> the gotcha...
>
> @All:
> ASAP I'll try to investigate more deeply...
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Very-poor-performance-when-writing-into-db-tp4657289p4657318.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>