On Sun, 2009-02-08 at 15:42 -0500, Tim Williams wrote:
> On Tue, Jan 27, 2009 at 8:57 AM, Thorsten Scherler
> <thorsten.scherler....@juntadeandalucia.es> wrote:
> > Hi all,
> >
> > I am running out of ideas why the dispatcher rewrite is not faster then
> > the old one we have.
> >
> > The old dispatcher is around 10% faster and consumes less memory (!!!)
> > then the new one. The new one is using AXIOM to create the final
> > document which supposed to be faster then DOM, but it is not.
> >
> > I switch the contract processing from DOM to AXIOM to finally have SAX.
> >
> > Some sidenotes of my profiling sessions:
> > - we use as testing ground a dedicated linux box which is basically a
> > replica of http://juntadeandalucia.es/index.html
> > - the side is made with cocoon 2.2 and "old" dispatcher cocoon 2.2 block
> > (which is the same as we use here in forrest projects).
> > - The app is running on a tomcat6 and java6.
> > - We using jmeter to have an incremental test run on concurrent threads
> > (starting with 5 to 90 concurrent threads).
> >
> > Jmeter says for 90 threads that we have a throughput of 70 threads/sec
> > with the old one but only 60 threads/sec with the new one.
> >
> > The max memory for the 90 threads are 65 MB for the old one and the new
> > one is using 5 MB more.
> >
> > The total amount of class instances have been around 12.000 in the old
> > and in the new around 15.000.
> >
> > Somebody has any idea I would really appreciate some suggestions, I do
> > not understand why the new one is not significantly faster and resource
> > friendlier.
> 
> I have no clue really, just some thoughts.  

Thank you Tim, I really appreciate them!

> On a side note, if there's
> an easy way for me to setup the same test here, maybe I could help
> more. Assuming I use the rewrite_branch, what site should I set up?

Actually I have set up a some wars to make it easier to test
see for some details https://issues.apache.org/jira/browse/FOR-1157

Basically
https://svn.apache.org/repos/asf/forrest/branches/dispatcher_rewrite/FOR-1157/

has two different wars.

> Have you benchmarked the parsers independent of the dispatcher
> framework?  Maybe its simply a case of the assumptions being wrong?
> AXIOM is specifically fast for small docs, right?  

Not sure I had the perception that it should be faster for bigger docs.
However I am getting your point. 

> Maybe yours are
> larger than the threshold in which AXIOM can be expected to outperform
> others?  I haven't looked at AXIOM but maybe the higher memory is due
> to AXIOM being optimized for certain doc types/size?  Maybe the
> dispatcher isn't wrong, is there a chance your expectations are?

I understand your point and you are completely right in saying that some
parser are optimized to "certain doc types/size". However the only thing
that I cannot explain myself is what I comment in the issue:
"Like you see even if the new transformer is not used at all we are
loosing around 10 requests per second."

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)