Forum OpenACS Q&A: Chat extremly slow?

Collapse
Posted by Rocael Hernández Rizzardini on
Hi all!
 
I using Openacs in a RH6.2 box, celeron 600Mhz, 512 RAM..
running aolserver 3.2+ad10, postgres 7.0.2 with the Don's tips:
su -l postgres -c '/usr/local/pgsql/bin/postmaster -B 1000 -o "-S
2000" -S -D /usr/local/pgsql/data

by now the service is quite fast just the chat part, doesn't matter is
you have a lot of users or if you have just one user is very slow, do
you have any suggestion to speed it up, or to find out why is so
slow... specially when you are posting..
check it out at here!.

Thank you for the help.

Collapse
Posted by Rocael Hernández Rizzardini on
Well, I figured out that a chat room with more than 8K rows will be difficult, so I deleted till leave 1000 and now the chat is fast again! 
Is there a way to deal with this, I mean leave 10000 rows without having a slow chat?? I guess the problem is with postgres...

Hey guys, I hear the web conference today at arsdigita!
Go OpenSource!!!!!!!!!!!
Collapse
Posted by Don Baccus on
Huh, why should it be a problem with more than 8,000 rows?  Is something not indexed that should be indexed?  Or is there an index that shouldn't be there? (updating indices takes time, too).

Have you tried running the postmaster with "-F".  The stops the fsynch  that follows every insert/update query.  Chat does a lot of updates.  If this speeds things up, you'll know this is the cause.

Using "-F" is unsafe and you should really only test with this flag.  If it helps, though, it will tell you that PG 7.1 will help you a lot,  because insert/updates are much, much faster in PG 7.1.  If "-F" helps, start planning your upgrade to PG 7.1 ASAP.

Collapse
Posted by Don Baccus on
Also, have you VACUUM ANALYZEd the database regularly?
Collapse
Posted by Rocael Hernández Rizzardini on
No Don, I haven't, how to do that?
bye,
Collapse
Posted by Don Baccus on
Get into the database with psql and say "vacuum analyze;"

You should set up a script to do this nightly, see the documentation on backing up and other routine tasks.