"F. Scott Johnson" wrote:

> Hi,
>   My question is: Does the servlet session object
> scale up to one hundred simultaneous users and
> approximately 10,000 unique sessions per day?

>
> This is running on a SPARC 4000 with 4 Gig of memory.
>
> The system currently works fine without servlet sessions,
> but we want to introduce sessions to accomplish
> several important objectives.
>
> If I shove all those users and hits into sessions, will
> it work or will it all blow up?
>

The answer, of course, is "it depends on your application."  A couple of things
to think about:

* The number of unique sessions you are describing is not very
  large, but the constraint that matters is the number of simultaneous
  sessions.  Again, 100 is not a big number.

* The session collection object used inside the servlet engine
  itself is usually a Hashtable or something like it.  So, access
  to retrieve the session won't bog down with only 100.  Likewise,
  user data objects are stored in a Hashtable or something similar
  inside each session for fast access.

* How much user data do you plan to have cached in the sessions
  while the user is active?  The sum total of the memory requirements
  for all active sessions has to be stored in the heap memory of your
  JVM -- you might have to set command line switches to increase
  the maximum heap size.

* Can your CPU and database keep up with the processing demands
  of 100 simultaneous users?  The additional CPU overhead of sessions
  is usually neglible compared to the CPU overhead of the app itself.
  (In fact, if you use the session to cache information that would otherwise
  need to be read from the database on every request, performance will
  normally improve because accessing the cached data is much cheaper
  than doing another database call.)

>
> -Scott
>

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to