Forum OpenACS Development: Gathering response time statistics in OpenACS/OpenACS.org

I want to start gathering information on OpenACS performance and scalability. For that I need to collect statistical information...I have been going thru the PG docs and need to look a bit harder there - any suggestions?. Oracle offers Statspack - very comprehensive.

What is there in AOLserver or OpenACS?

I added this line to the end of rp_filter in acs-tcl/tcl/request-processor-procs.tcl:

ns_log Notice "Monitoring: Handled request [ad_conn method] [ad_conn url]?[ad_conn query] for user_id [ad_conn user_id] with [expr [clock clicks] - $startclicks] clicks"

So I get response time statistics right in my error.log file which can be parsed easily and reformatted nicely. It should be very light-weight too.

I have two questions:

a) Does this work or do I miss something?

b) Granted it works, what about installing this on OpenACS to gather data there? (With the promise to make it a "really fast site" (tm))

The first thing you need to look into is the pg_stat_* tables. There are a number of configuration parameters in postgresql.conf you need to change to enable them globally, including these (from my postgresql.conf file):

#stats_start_collector = true
#stats_reset_on_server_start = true
stats_command_string = true
#stats_row_level = false
#stats_block_level = false

This doc page will give you more information on the statistics views and functions.