You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by cocorossello <co...@gmail.com> on 2017/01/27 08:51:07 UTC

Tomee 7.0.2 performance

Hi,

Since I upgraded to tomee 7.0.2, from 7.0.1 I can see a signficant
performance degradation, not a stopper, but I'm wondering if this has been
identified.

I can see that the startup time increases from 27 seconds to 35. And our end
to end test suite (about 60 parallel phantomjs tests) takes 140 seconds
(from about 120).

I have no idea of where this may come from, but if I replace openejb-core
with that of 7.0.1 performance is the same again.

Any ideas?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by cocorossello <co...@gmail.com>.
Tested, it is faster now.

Thank you!



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680970.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by cocorossello <co...@gmail.com>.
Thanks, I will try that tomorrow



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680965.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by Romain Manni-Bucau <rm...@gmail.com>.
pushed a cache on master for that method, if you try test the snapshot
(build it yourself or wait tomorrow deployment). It is relevant only if you
have a tons of @PersistenceContext but seems it can be the case seeing the
numerous entities you deploy.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-01-27 14:52 GMT+01:00 cocorossello <co...@gmail.com>:

> No, I already tried setting that in system.properties with no luck.
> Regarding
> the security manager, I have no clue on how to do that so I guess not.
>
> I think the problem is in
>
> org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.
> getProvider
> ()      0.0 ms (0%)     6,583 ms (0.7%)
>
> that is trying to load the class each time.
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680961.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Tomee 7.0.2 performance

Posted by cocorossello <co...@gmail.com>.
No, I already tried setting that in system.properties with no luck. Regarding
the security manager, I have no clue on how to do that so I guess not.

I think the problem is in 

org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.getProvider
()	0.0 ms (0%)	6,583 ms (0.7%)

that is trying to load the class each time. 





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680961.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Interesting. still having a hard time to see why it is that slow - do you
run with a security manager?. What can be way slower is the fact tomee
7.0.2 activate CDI for JPA is the provider supports it so this can slow
down it since a "new X()" will become a CDI lookup. Can you try setting
tomee.jpa.cdi=false in your persistence unit or as a system property to see
if it helps?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-01-27 13:40 GMT+01:00 cocorossello <co...@gmail.com>:

> The problem has to be in JTAEntityManager.isJPA21, now is much slower.
>
> org.apache.openejb.persistence.JtaEntityManager.<init> (String,
> org.apache.openejb.persistence.JtaEntityManagerRegistry,
> javax.persistence.EntityManagerFactory, java.util.Map, boolean, String)
> 91.7
> ms (0.3%)       10,206 ms (1%)
>
> org.apache.openejb.persistence.JtaEntityManager.isJPA21
> (javax.persistence.EntityManagerFactory)        20.0 ms (0.1%)  10,063 ms
> (1%)
>
>
> org.apache.openejb.persistence.JtaEntityManager.hasMethod (Class, String,
> Class[])        575 ms (2%)     984 ms (0.1%)
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680957.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Tomee 7.0.2 performance

Posted by cocorossello <co...@gmail.com>.
The problem has to be in JTAEntityManager.isJPA21, now is much slower.

org.apache.openejb.persistence.JtaEntityManager.<init> (String,
org.apache.openejb.persistence.JtaEntityManagerRegistry,
javax.persistence.EntityManagerFactory, java.util.Map, boolean, String)	91.7
ms (0.3%)	10,206 ms (1%)

org.apache.openejb.persistence.JtaEntityManager.isJPA21
(javax.persistence.EntityManagerFactory)	20.0 ms (0.1%)	10,063 ms (1%)


org.apache.openejb.persistence.JtaEntityManager.hasMethod (Class, String,
Class[])	575 ms (2%)	984 ms (0.1%)




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680957.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by cocorossello <co...@gmail.com>.
Hi, 

I can see that the big difference is in 

org.apache.openejb.persistence.JtaEntityManager.<init> (String,
org.apache.openejb.persistence.JtaEntityManagerRegistry,
javax.persistence.EntityManagerFactory, java.util.Map, boolean, String)

75.6ms in 7.0.1 and 9631 in 7.0.2 (no other change involved at all). 


I'll try to figure out what's going on. We are using eclipselink 2.6.3 with
about 200 tables and 300 "persistence classes" (entities, converters and so
on)



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-2-performance-tp4680954p4680956.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Tomee 7.0.2 performance

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

Not much idea with that, it can be linked to a lot of things including
scanning exclusions. Since several seconds are lost at startup, can you try
to do some jstack (I would try jstack <pid> and jstack -F <pid>) during
these moments? Can help to dig into the first level of the analyzis.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-01-27 9:51 GMT+01:00 cocorossello <co...@gmail.com>:

> Hi,
>
> Since I upgraded to tomee 7.0.2, from 7.0.1 I can see a signficant
> performance degradation, not a stopper, but I'm wondering if this has been
> identified.
>
> I can see that the startup time increases from 27 seconds to 35. And our
> end
> to end test suite (about 60 parallel phantomjs tests) takes 140 seconds
> (from about 120).
>
> I have no idea of where this may come from, but if I replace openejb-core
> with that of 7.0.1 performance is the same again.
>
> Any ideas?
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Tomee-7-0-2-performance-tp4680954.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>