On Fri, Feb 03, 2006 at 12:49:43PM -0500, Nima wrote:
> Dossy..when you look at the hardware would you say that I need more 
> dynamic servers and can I run serveral dynamic servers against on 
> postgresql? Using pound I add some more aolservers behind the scenes 
> connected to one databse.

Of course you can - in fact that's the whole point, typically there is
no other way to do it.

On Fri, Feb 03, 2006 at 12:38:56PM -0500, Nima wrote:
> I would like to understand more the relation between:
> - number of concurrent requests
> - number of required threads
> - number of required database connections in the pool
> 
> Can someone kindly give more insight on that?

This depends entirely on your application and needs to be determined
empirically, by load testing on a separate server and/or profiling of
your Production database.  I've never done that for large OpenACS
installations, but other people have.  Maybe they have some rules of
thumb.

> Let's say I have 50 concurrent users. How many threads do I need
> with how many db connections for each db pool?

It depends entirely on your application, there is no easy answer to
this question.

> Also what is the relation between usage of RAM and number of threads?

That also depends.  By default AOLserver loads ALL Tcl procs
separately into every single thread, and OpenACS has a LOT of Tcl
procs, as when using OpenACS AOLserver threads suck up a lot of
memory.

To reduce your RAM usage, you would definitely want to investigate
ttrace, included in the Tcl Threads Extension.  However, you don't
seem to be running out memory, so this is unlikely to be that big a
help in your case.

> When I look at top the aolserver currently in top it says:
> %MEM   PID USER      PR  NI  VIRT  RES  SHR S %CPU    TIME+  COMMAND   
> 41.7 27147 unima2    25   0 1796m 1.6g 7448 S  0.0   
> 0:36.66 /opt/aolserver4/bin/nsd -u unima2 -t /www/unima2/etc/config.tcl
> 
> with basically 44 users who do nothing but still the server uses 41% of 
> the RAM.

Number of browser clients has almost nothing to do with how much RAM
AOLserver uses, and everything to do with how you've configured
AOLserver.

On Fri, Feb 03, 2006 at 12:51:01PM -0500, Nima wrote:

> If I increase max_threads how do I have to increase the number of db
> connections for each pool?

Again, that depends entirely on your application.  If you have slow
Tcl code but all your queries are very fast, then you can probably get
away with a lot fewer db connections than you have conn threads.

If on the other hand your Tcl code is faster, or you have slow
queries, or you hold a db handle when you don't really need it, then
you might need as many db connections as you have conn threads, plus a
few extra for non-conn threads.  Or you might conceivably even need
that many db connections in EACH db pool.  (Conceivably - I don't know
what's likely in practice.)

With OpenACS, the first one or two db pools probably get the most use
by far, so you should have more db connections there and fewer in
other pools.  What particular balance is most appropriate, I don't
know.  I also don't know what the over head of extra db connections
is.  Might be large, might be small, I dunno.

Ideally there would be some sort of unified monitor application that
would track all this on a live Production site.  Check out Gustaf's
request monitor / throttler, it might include some of that
functionality.  Oh, I see you're already using it:

  http://openacs.org/forums/message-view?message_id=347126
  http://openacs.org/forums/message-view?message_id=339132

-- 
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to