Forum OpenACS Q&A: DB-Aolserver tuning and performance

Hello every body,
Can anybody help me tuning my server to allocate the best performance of a DB system?
the system is running a heavy DB application with much queries. and it is extremely slow

our system is getting like 3 - 6 views/second.
Thanks in Advance.

Configuration File

ns_section ns/db/drivers

        ns_param ora9 ora9.so

ns_section ns/db/pool/main

        ns_param MaxIdle 1000000000
        ns_param MaxOpn 1000000000
        ns_param Driver ora9
        ns_param Connections 3
        ns_param DataSource ""
        ns_param User portal
        ns_param Password password
        ns_param Verbose Off
        ns_param ExtendedTableInfo On


ns_section ns/db/pool/subquery

        ns_param MaxIdle 1000000000
        ns_param MaxOpen 1000000000
        ns_param Driver ora9
        ns_param Connections 2
        ns_param DataSource ""
        ns_param User portal
        ns_param Password password
        ns_param Verbose Off
        ns_param ExtendedTableInfo On


ns_section ns/db/pool/log

        ns_param MaxIdle 1000000000
        ns_param MaxOpen 1000000000
        ns_param Driver ora9
        ns_param Connections 2
        ns_param DataSource ""
        ns_param User portal
        ns_param Password password
        ns_param Verbose Off
        ns_param ExtendedTableInfo On

ns_section ns/db/pools

        ns_param main main
        ns_param subquery subquery
        ns_param log log


ns_section ns/parameters

        ns_param User nsadmin
        ns_param Group web
        ns_param ServerLog /ns/log/portal-error.log
        ns_param Home /ns
        ns_param StackSize 500000
        ns_param MaxKeepAlive 0

ns_section ns/threads

        ns_param   stacksize       [expr 128*1024]
        # use more than 1 processor (Solaris)
        ns_param SystemScope on


ns_section ns/server/portal

        ns_param threadtimeout   160     
        ns_param PageRoot /ns/web/portal/www
        ns_param DirectoryFile 
index.tcl,index.adp,index.html,index.htm
        ns_param Webmaster abukhait@birzeit.edu
        ns_param NoticeBgColor ""#ffffff""
        ns_param EnableTclPages On
        ns_param NotFoundResponse /global/file-not-found.html
        ns_param ServerBusyResponse /global/busy.html
        ns_param ServerInternalErrorResponse /global/error.html
        ns_param MaxThreads 60
        ns_param MaxWait 2


ns_section ns/server/portal/db

        ns_param Pools main,subquery,log
        ns_param DefaultPool main


ns_section ns/server/portal/adp

        ns_param   cache           true    
        ns_param   cachesize       [expr 5000*1024]
        ns_param Map /*.adp
        ns_param DefaultParser fancy


ns_section ns/server/portal/module/nslog

        ns_param EnableHostnameLookup Off
        ns_param File /ns/log/portal.log
        ns_param LogCombined On
        ns_param LogRefer Off
        ns_param LogUserAgent Off
        ns_param MaxBackup 5
        ns_param RollDay *
        ns_param RollFmt %Y-%m-%d-%H:%M
        ns_param RollHour 0
        ns_param RollOnSignal On
        ns_param RollLog On


ns_section ns/server/portal/module/nsperm

        ns_param model Small
        ns_param enablehostnamelookup Off


ns_section ns/server/portal/module/nssock

        ns_param timeout 120
        ns_param Hostname www.domain.com
        ns_param Port 80

ns_section ns/server/portal/modules

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

ns_section ns/server/portal/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_section ns/server/portal/tcl

        ns_param Library /ns/web/portal/tcl


ns_section ns/servers

        ns_param portal DEV
Collapse
Posted by Don Baccus on
You need to figure out where the bottleneck is before you can start thinking about speeding it up.
Collapse
Posted by Iuri Sampaio on
How do i best setup aolserver and postgresql to my machine?

96Mb memoria ram, 4 gb hd, 30GB file transfer
linux debian3.1
postgresql 7.4
aolserver 4

I know the machine doesn't help too much. It's slow.
but even if had a better resources i would be aware to cleverly use them

I went through "/postgresql.conf"
https://openacs.org/doc/current/postgres.html#postgres-tune

and "/config.tcl" and set

#
# Server parameters
#
ns_section ns/server/${server}
ns_param maxconnections 100 ;# Max connections to put on queue
ns_param maxdropped 0
ns_param maxthreads 5
ns_param minthreads 1
ns_param threadtimeout 120 ;# Idle threads die at this rate