Slow "update radacct ..." query

Alan DeKok aland at
Tue Jun 2 12:31:31 CEST 2009

Marinko Tarlac wrote:
> After some investigation, I found that accounting start packets was
> received before update packets and session was already in database
> before the update happen. (AcctStartTime < MySQL time in slow query log)
> Also, after few tests I have:
> - 10 000 row updates which doesn't exist was done in avg. 4 seconds
> (tested 3 times)
> - 10 000 inserts in less then 9 seconds (avg. tested 3 times)

  Hmm... that would seem to indicate that MySQL is OK.

>>  Odds are that replaying it with the MySQL command-line client will be
>> just as slow as you saw with FreeRADIUS.
> I'll try this and that is the reason why I installed FR2.1.6.

  Thanks.  That will help us track it down.

  If replaying the sqltrace file is very fast, then there's some kind of
magic going on... Most people find MySQL sufficiently fast, so it's hard
to understand why some people run into issues.

> Another option is to update MySQL to latest available version 5.0.x (in
> 5.0 generation) because there are some indication that 5.0.45 has some
> bugs with cache and InnoDB storage engine...


  Alan DeKok.

More information about the Freeradius-Users mailing list