On 1/10/06, Mark Thomas <[EMAIL PROTECTED]> wrote:
> Costin Manolache wrote:
> > I guess the better solutions are to either deal with this in the
> > servlet facade ( i.e. the HttpServletResponse impl ) - or to just
> > remove the cached fields from coyote Response.
> >
> > The second is harder - but the right one IMO, it's bad to have methods
> > in Response that don't do what people would expect them to do and
> > workaround in facade to deal with complexity. And we already have a
> > cache ( for converted int values ) in MessageBytes.
> >
> > I'm sure Remy would be happier with the first solution, and it's
> > simpler to implement. But I agree that we shouldn't add this to
> > Response.
> >
> > Costin
>
> Given we are working around the cached fields in coyote response, I
> wanted to keep the work around as close to coyote response as possible.
>
> I agree removing the cached fields is the right way to go if we can. I
> did take a quick look at it but was concerned about possible
> performance impacts and wanted to get a better fix out sooner that I
> would have been able to otherwise.

The quickest fix is on the facade ( servlet implementation ), as Remy suggested.



> A related concern was a lack of a test case to check any performance
> impact. I'll put together a simple JMeter test for this. Given that we
> are concerned about request overhead, does the following test case
> sound reasonable?
> - simple servlet (approx 1K output)

Since you want to test the header - probably a small output would be better.


> - explicitly set content length and type in servlet
> - JMeter test case that uses 50 concurrent threads to make 10000 requests

I would test this kind of change with a larger thread count ( 100 + ).
I usually use "ab", not sure how much overhead is in jmeter.

> - set min threads on the connector to >50
> - measure average time per request

All 3 times matter. Make sure you 'warm up' the server.


BTW - I was suggesting to cache instead the MessageBytes corresponding
to the value in the MimeHeaders. But it may be interesting to find if
just removing the cache completely and having simpler code would have
any impact - there are a lot of surprises when you deal with
performance...

Another way to test that would minimize the tomcat overhead is to use
the connector 'standalone' - i.e. write a simple main() that
instantiates the connector, with a simple Adapter that just generates
the content in the buffer. There is some code in sandbox that does
most of this ( in standalone ). This way you test the raw performance
of coyote, without mapper / servlet API / valves / etc.


Costin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to