You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Gaffga <cg...@triplemind.com> on 2003/09/29 00:36:25 UTC

Strange Perfomance Effect with Cocoon

hi,

i have a strange effect when I run code inside of cocoon, it seems to
slowdown more then 10 times!! :(

I call the main-method from my test class the command line.
- The method does lookup an Entity EJB on JBoss server.
- Get a Property from the Bean
- Serialize the Bean using Betwixt

Then I tested the same by callingthe same method from an cocoon action. It
slowes down dramatically:

          |Command Line | Cocoon Action
----------+-------------+--------------
Lookup    |  144 ms     |  2825 ms
Getter    |   17 ms     |  3560 ms
Serialize |  708 ms     | 73342 ms

Has anybody an idea what causes this slowdown, or anybody seen something
similar before?
Any help would be apriciated.

Thanks a lot,

Christoph Gaffga
cgaffga@triplemind.com





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Strange Perfomance Effect with Cocoon

Posted by Christoph Gaffga <cg...@triplemind.com>.
> > i have a strange effect when I run code inside of cocoon, it seems to
> > slowdown more then 10 times!! :(
> > I call the main-method from my test class the command line.
> > - The method does lookup an Entity EJB on JBoss server.
> > - Get a Property from the Bean
> > - Serialize the Bean using Betwixt
> > Then I tested the same by callingthe same method from an cocoon action.
It
> > slowes down dramatically:
> >           |Command Line | Cocoon Action
> > ----------+-------------+--------------
> > Lookup    |  144 ms     |  2825 ms
> > Getter    |   17 ms     |  3560 ms
> > Serialize |  708 ms     | 73342 ms
> > Has anybody an idea what causes this slowdown, or anybody seen something
> > similar before?
> > Any help would be apriciated.
>
> How much memory is allocated for your jvm in your test environment?  Can
> you tell if memory appears to be paging out to disk during your cocoon
> test?

I have adjusted the jvm startup parameters, so the command-line test starts
up with "-server -Xms1200m -Xmx1200m", the same as tomcat/cocoon.

> Is the code literally identical - if so, how are you calling it from
> your action?

Yes, it's the same class. In cocoon from my action I call the method
"TestClient.main(new String[] {});", the same as from command line. The
output is written to stdout, under tomcat it's in catalina.out-file.
That's what makes the problem so strange, it's exactly the same code!

> What else is "installed" in Cocoon - in other words, what blocks, etc.
> (trying to get an idea if classloading is an issue).

That was my first Idea, I thought, perheaps reflection slows down because of
all the classes loaded with the jboss-client/tomcat/cocoon-jars. So I added
the complete classpath to my command line test. The commandline test slows
down also, but only about 10% or so, not 1000%!
Perheaps the problem has nothing to do with cocoon, perheaps it's about the
tomcat classloader, that is what I will test next, I will run the
main-method of the test class from within an servlet.

> Does this happen over and over, or only soon after startup of cocoon?

There is no perfomance increase, when I request the pipeline (containing the
test action) a second, third... time, so it seems that it has nothing to do
with the cocoon startup.

Any Ideas?

Regards
Christoph



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Strange Perfomance Effect with Cocoon

Posted by Christoph Gaffga <cg...@triplemind.com>.
I checked the perfomance, when I run the code inside the action as an
servlet outside of cocoon. It was slow as the action was.
So my issue might be off-topic, I try it on the tomcat mailing list.

Regards
Christoph


"Geoff Howard" <co...@leverageweb.com> schrieb im Newsbeitrag
news:3F776919.3010607@leverageweb.com...
> Christoph Gaffga wrote:
>
> > hi,
> >
> > i have a strange effect when I run code inside of cocoon, it seems to
> > slowdown more then 10 times!! :(
> >
> > I call the main-method from my test class the command line.
> > - The method does lookup an Entity EJB on JBoss server.
> > - Get a Property from the Bean
> > - Serialize the Bean using Betwixt
> >
> > Then I tested the same by callingthe same method from an cocoon action.
It
> > slowes down dramatically:
> >
> >           |Command Line | Cocoon Action
> > ----------+-------------+--------------
> > Lookup    |  144 ms     |  2825 ms
> > Getter    |   17 ms     |  3560 ms
> > Serialize |  708 ms     | 73342 ms
> >
> > Has anybody an idea what causes this slowdown, or anybody seen something
> > similar before?
> > Any help would be apriciated.
>
> How much memory is allocated for your jvm in your test environment?  Can
> you tell if memory appears to be paging out to disk during your cocoon
> test?
>
> Is the code literally identical - if so, how are you calling it from
> your action?
>
> What else is "installed" in Cocoon - in other words, what blocks, etc.
> (trying to get an idea if classloading is an issue).
>
> Does this happen over and over, or only soon after startup of cocoon?
>
> Geoff




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Strange Perfomance Effect with Cocoon

Posted by Geoff Howard <co...@leverageweb.com>.
Christoph Gaffga wrote:

> hi,
> 
> i have a strange effect when I run code inside of cocoon, it seems to
> slowdown more then 10 times!! :(
> 
> I call the main-method from my test class the command line.
> - The method does lookup an Entity EJB on JBoss server.
> - Get a Property from the Bean
> - Serialize the Bean using Betwixt
> 
> Then I tested the same by callingthe same method from an cocoon action. It
> slowes down dramatically:
> 
>           |Command Line | Cocoon Action
> ----------+-------------+--------------
> Lookup    |  144 ms     |  2825 ms
> Getter    |   17 ms     |  3560 ms
> Serialize |  708 ms     | 73342 ms
> 
> Has anybody an idea what causes this slowdown, or anybody seen something
> similar before?
> Any help would be apriciated.

How much memory is allocated for your jvm in your test environment?  Can 
you tell if memory appears to be paging out to disk during your cocoon 
test?

Is the code literally identical - if so, how are you calling it from 
your action?

What else is "installed" in Cocoon - in other words, what blocks, etc. 
(trying to get an idea if classloading is an issue).

Does this happen over and over, or only soon after startup of cocoon?

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org