Forum OpenACS Q&A: Correct Configuration Parameters to use all Server Resources

Hello Guys,

I am running OpenACS 5/Oracle 10g/R.H. 3/AolServer 4.0.7 (2 BIG servers, 1 for database and 1 for web server)

Currently running a heavy (full of large queries) application; After 250 Member is logged in and using the application, the server dies (Page cannot be displayed).

I run a new instance of the server, on another port on the same web server, and it runs very quick although the other original server is still out of serving.

My simple conclusion (Correct me if I am wrong) that there is still available resources on the web server that the original instance is not able to use while a new instance is using. (The Configuration Parameters are accused??)
I tried raising the database pools, raising maxconnections and threads, stacksize and did no effect.

Here is a snapshot of the top command:
11:43:05  up 1 day,  2:04,  2 users,  load average: 3.25, 3.45, 3.35
52 processes: 51 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
          total  56.9%    0.0%    1.4%  0.1%    2.0%    0.5%  39.0%
Mem:  3950356k av, 3623712k used,  326644k free,      0k shrd,  207188k buff
          2788172k active,              20744k inactive
Swap: 4080456k av,      0k used, 4080456k free                2349720k cached

And the init file is:
set debug false

ns_section ns/parameters

        ns_param        Group                  web
        ns_param        ServerLog              /web/aol/log/main-error.log
        ns_param        Home                    /web/aol
        ns_param        logroll                true
        ns_param        maxbackup              2000
        ns_param        mailhost                mail.birzeit.edu
        ns_param        debug                  $debug
        ns_param        keepalivetimeout        30
        ns_param        maxkeepalive            100

ns_section ns/threads

        ns_param        StackSize              [expr 256*1024]
        ns_param        SystemScope            on
        ns_param        mutexmeter              true

ns_section ns/mimetypes

        ns_param        Default                text/plain
        ns_param        NoExtension            text/plain
        ns_param        .pcd                    image/x-photo-cd
        ns_param        .prc                    application/x-pilot
        ns_param        .xls                    application/vnd.ms-excel

ns_section ns/servers

        ns_param        ritaj                  "Ritaj"

ns_section ns/db/drivers

        ns_param        nsoracle                nsoracle.so

ns_section ns/db/driver/nsoracle

        ns_param        maxStringLogLength      -1
        ns_param        CharExpansion          2

ns_section ns/db/pools

        ns_param        p1                      p1
        ns_param        p2                      p2
        ns_param        p3                      p3

ns_section ns/db/pool/p1

        ns_param MaxIdle 1000000000
        ns_param MaxOpn  1000000000
        ns_param Driver nsoracle
        ns_param Connections 10
        ns_param DataSource hemis
        ns_param User ****
        ns_param Password ****
        ns_param Verbose $debug
        ns_param logsqlerrors true
        ns_param ExtendedTableInfo true

ns_section ns/db/pool/p2

        ns_param MaxIdle 1000000000
        ns_param MaxOpen 1000000000
        ns_param Driver nsoracle
        ns_param Connections 10
        ns_param DataSource hemis
        ns_param User ****
        ns_param Password ****
        ns_param Verbose $debug
        ns_param logsqlerrors true
        ns_param ExtendedTableInfo true

ns_section ns/db/pool/p3

        ns_param MaxIdle 1000000000
        ns_param MaxOpen 1000000000
        ns_param Driver nsoracle
        ns_param Connections 10
        ns_param DataSource hemis
        ns_param User ****
        ns_param Password ****
        ns_param Verbose $debug
        ns_param logsqlerrors true
        ns_param ExtendedTableInfo true

ns_section ns/server/ritaj

        ns_param        PageRoot                /web/ritaj/www
        ns_param        DirectoryFile          index.tcl,index.html,index.htm
        ns_param        maxconnections          10
        ns_param        maxdropped              0
        ns_param        maxthreads              10
        ns_param        minthreads              0
        ns_param        threadtimeout          3600
        ns_param        globalstats            false
        ns_param        urlstats                false
        ns_param        maxurlstats            1000
        ns_param        flushcontent            true

ns_section ns/server/ritaj/db

        ns_param        Pools                  *
        ns_param        DefaultPool            p1

ns_section ns/server/ritaj/tcl

        ns_param        Library                /web/ritaj/tcl
        ns_param        autoclose              on
        ns_param        debug                  false

ns_section ns/server/ritaj/adp

        ns_param        Map                    /*.adp
        ns_param        DefaultParser          fancy
        ns_param        enabledebug            false
        ns_param        threadcache            false

ns_section ns/server/ritaj/adp/parsers

        ns_param        fancy                  ".adp"

ns_section ns/server/ritaj/modules

        ns_param        nsdb                    nsdb.so
        ns_param        nsperm                  nsperm.so
        ns_param        nslog                  nslog.so
        ns_param        nssha1                  nssha1.so
        ns_param        nscache                nscache.so
        ns_param        nssock                  nssock.so

ns_section ns/server/ritaj/module/nslog

        ns_param        EnableHostnameLookup    false
        ns_param        File                    /web/aol/log/ritaj.log
        ns_param        logcombined            true
        ns_param        maxbackup              1000
        ns_param        rollday                *
        ns_param        rollfmt                %Y-%m-%d-%H:%M
        ns_param        rollhour                0
        ns_param        rollonsignal            true
        ns_param        rolllog                true

ns_section ns/server/ritaj/module/nsperm

        ns_param        model                  Large
        ns_param        enablehostnamelookup    false

ns_section ns/server/ritaj/module/nssock

        ns_param        port                    80
        ns_param        hostname                ritaj.birzeit.edu
        ns_param        address                0.0.0.0

Have you done your homework on the Oracle side? Please have a look here https://openacs.org/doc/current/maint-performance.html

Otherwise it looks like your server is running out of threads to handle requests. Clustering would help very quickly - isn't the clustering package in use in a few of the big .LRN sites?

(And fixing those long-running queries :)

You should also make sure that you don't have any artificial limits on the OS.  For instance, by default a process can have 1024 open files but that can be increased (see ulimit).  That being said, since you have that many users, you probably want to look in to adding additional AOLServers (even on the same machine) instead of upping the one server.  The reason for doing that is in case you need to update a file/config then you can easily take one down, test it off line then bring it back up and take the other one down which will provide a seemless experience for the user.  When looking at your system, try to see what bottlenecks you encounter when you are around 250 users...it could be AOLserver but it could also be that the OS is telling the process to not take up too much resources.
You have minthreads 0, maxthreads 10, maxconnections 10. If this really is a "big" server dedicated solely to running AOLserver for this OpenACS instance, then those settings are pretty absurd. Try bumping up all 3 of those, likely by a lot.