tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodrigo Ruiz" <rr...@gridsystems.com>
Subject Re: Forking high loaded servlet
Date Mon, 07 Jul 2003 09:52:44 GMT
Depending on the kind of request you are trying to accelerate, you could
also do some caching in the response.
Depending on what the servlet is intended to do, the strategies to apply can
vary a lot.
A description of the servlet execution would allow people to help you better
:)

Regards,
Rodrigo Ruiz

----- Original Message -----
From: "Peter Lin" <tcw00lfel@yahoo.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Friday, July 04, 2003 5:31 PM
Subject: Re: Forking high loaded servlet


>
> I haven't followed this thread too closely, but what kind of concurrent
requests you looking at?  i ask this because the number of concurrent
threads in most cases is the result of hardware limitations.
>
> if you want to double the concurrent requests, get more cpu and multiple
gigabit ethernet cards.  trying to do it with servlet tricks (aside from
server.xml configuration) won't do much in the long run.
>
> peter
>
>
> Sergio Juan <sjuan@gridsystems.com> wrote:
>
> ----- Original Message -----
> From: "Diego Castillo"
> To:
> Sent: Friday, July 04, 2003 3:05 PM
> Subject: Forking high loaded servlet
>
>
> > Hi all,
> >
> > I have a servlet that receives a heavy load. I would like to process
> > multiple requests in parallel in order to increase throughput.
> >
> > Tomcat creates one single instance of the servlet. This is right
> > according to servlet specification paragraph 3.2, but it does not suit
> > my needs.
> >
> > I have tried extending SingleThreadModel and Tomcat does create multiple
> > instances, but I get the exact same throughput.
>
> Tomcat automatically creates one thread per request. If your servlet does
> not have synchronization issues, it will be the same creating an object
per
> thread that using the same object (in fact a little heavier in the first
> case, because of the overhead of creating objects).
> >
> > I have also tried launching a new thread for handling HttpServletRequest
> > & HttpServletResponse, but as soon as the servlet exits service(), the
> > response output stream gets closed by Tomcat.
> >
> Same here.. you are launching a Thread inside of an already independent
> Thread.
>
> > Is there any spec compliant strategy to increase the number of requests
> > per second that a servlet can handle?
> >
> In configuration you can set the processors number, but I think it is not
> the issue. If the problem is that you got a bottleneck in your host (CPU
or
> disk at nearly 100%) you should consider load balancing between multiple
> servers in different machines or using common programming performance
tricks
> (but I think you have already done that).
>
> Regards.
>
> > Thanks in advance,
> >
> >
> > Diego
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message