Maybe you should read my entire message since I clearly stated that I wasn't
using SingleThreadModel ..

----- Original Message -----
From: "Richard Wu" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 3:45 AM
Subject: Re: multiple instances of a servlet?


> if you really care performance, you shouldn't use singlethreadmodel in
first
> place.
> ----- Original Message -----
> From: "Ville Rinne" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 07, 2001 7:06 PM
> Subject: RE: multiple instances of a servlet?
>
>
> > Kevin, let me know how your tests came out. I did some more testing
myself
> > and I found it strange that when I created a specific simple
test-servlet
> > for this case I didn't manage to get more than one instance of it
created.
> > I'll do some more testing tomorrow but there is definitely something
> > strange going on. Obviously the amount my testservlet takes to complete
a
> > request is smaller than the amount of time my request-controller takes
but
> > at this point I honestly don't have a clue :P
> >
> > Anyhow, since servlets aren't synchronized in any way by default, how
> > would it increase performance even if there was more than one instance
of
> > them in existance?
> >
> > cheers,
> > Ville Rinne
> >
> > Of course it isn't a huge problem
> >
> > On Tue, 7 Aug 2001, Duffey, Kevin wrote:
> >
> > > Keep in mind that every app server is allowed to implement the spec in
> their
> > > own manner. It does sound peculiar, but it is very possible that Orion
> gets
> > > its performance by pooling a few servlet instances even without the
> single
> > > threaded model. I don't know for sure, but that seems logical. By
having
> > > even two or three instances, it could increase the ability to handle
ore
> > > requests..although myself I thought that a single instance would be
> plenty
> > > fast to have literally thousands of requests per second hit it. Each
> time a
> > > request comes in, the container should create a new thread for that
> request
> > > then send it on its way to the servlet instance. A PIII600 system can
> run
> > > over 1billion instructions per second. Figure that with the JVM
> interpreter,
> > > your code and any resources, you should still be able to iterate
> thousands
> > > of requests per second, unless object creation in a servlet (and
> depending
> > > on what it is doing) slows things down. The one factor I am not sure
of
> is
> > > how many "threads" a JVM can handle at one time. I have heard of
single
> > > servers handling 1000's of hits per second, and if each request goes
to
> a
> > > JSP or servlet, that should equate to one new thread per request..even
> if
> > > the session id is the same (for example, the user somehow opened a new
> > > window from the browser window..and could possibly submit two (or
more)
> > > requests at the same time).
> > >
> > > At any rate, it sounds to me like perhaps either there is a bug, or
that
> > > Orion is doing this pooling automatically to increase performance.
> > > Interesting though..I will now check out to see if my MVC framework
does
> the
> > > same thing.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Ville Rinne [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, August 07, 2001 7:59 AM
> > > To: Orion-Interest
> > > Subject: multiple instances of a servlet?
> > >
> > >
> > > We've implemented the request-controller pattern using a servlet as
the
> > > entry-point of all our jsp-pages. For some reason Orion creates
multiple
> > > instances of this servlet even though it isn't implementing
> > > SingleThreadModel and there isn't anything peculiar about it. I have
the
> > > servlet printing to System.out every time init() is run and every time
> it
> > > receives a request, it also prints the memory address of the instance
> that's
> > > handling it. For some reason with this servlet there are multiple
> instances
> > > (up to 3 so far) that handle these requests. There doesn't seem to be
> any
> > > larger logic in which instance gets to handle the request. It's not a
> > > problem per se but I just find it rather strange since I assumed that
> only
> > > one instance of a servlet would be created. Anyone else ran into this
?
> > >
> > > cheers,
> > > Ville Rinne
> > >
> > >
> >
>
>


Reply via email to