On Tue, Aug 12, 2003 at 08:56:23AM -0400, Jeff Sullivan wrote: > I have freeradius doing auth and acct to protgres. > System is P3 1000 with 512MB RedHat. the other day I had to do > some maintenance on my switch which severed the link between > my dial-in ras and the radius server. When the link was > established again, postgres could not keep up with all the > stored accounting requests in the ras. The load average > would climb to 14+ and not recover. I let the system run > for about 20min and still no change. I stopped logging accounting > to postgres and went to detail and the system dropped to > less than 1. Now the load is 0.00 0.00 0.00 with accounting > still going to detail. Normal load with all going to postgres > was about 0.18. What can I do to prevent this from happening again? > I would like to go back to all postgres.
Did you ANALYZE accounting queries? Older versions of db_postgresql.sql used weird indices, which caused acct_stop_query to do a seq scan on the whole radAcct table. It probably was not a big problem in normal operation, but when request/sec rate grew up, the performance went down significally. Try creating a partial index (PG 7.2+): CREATE INDEX radacct_active_user_idx ON RadAcct (UserName) WHERE AcctStopTime IS NULL; See also db_postgresql.sql and postgresql.conf from 0.9 or current CVS. Hope this helps. -- Fduch M. Pravking - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
