There is one query in notifications that is slow to run on openacs.org. I tested the same query on the same data on cvs.openacs.org and it runs much more quickly.
Both are running FC4 with PG 8.0.7.
They both have 1G or ram and about 18Mb free ram. cvs.openacs.org is using 500M or 1000M of swap. openacs.org us using 24M of 2000M of swap.
on openacs.org nsd is currently at 300M with PG using 17M of ram. No other signifigant use of ram.
on cvs.openacs.org nsd is currently at 500M with PG using around 16M of ram. Nothing else to speak of RAM-wise.
Both have the same settings in postgresql.conf, the defaults for everything.
On cvs.openacs.org the query runs the first time in 6ms according to explain analyze, and .05 ms for future runs of explain analyze.
On openacs.org the quer takes 16 seconds, and is the same if you run it again.
Before vacuum openacs.org was taking 30 seconds. (the machine is vacuumed --full --analyze at midnight every day as well) and the query plan was doing a sequential scan on acs_objects. After it does an index scan and the plan is identical on both boxes.
Any ideas where else to look?