correctly set num_sql_sock in sql accoutnig (Erratum)

Alan Buxey A.L.M.Buxey at
Tue Sep 15 00:15:33 CEST 2009


> >   How long do database writes take?
> insert in acccouting db takes ~ 10ms
> delete from accouting db takes ~ 25ms
> For the authtentication database I have about 10 authentication
> queries/s but regularly reaches 30/s when problems on BAS or DSLAM
> outcome (max value since last year is ~80/s). 

from those details it looks like you could handle 100 inserts
per seond with a single process and 40 deletes per second. 
worse case you came up with was 80/s - which is fine for inserts
but tricky for deletes - so you'd need just 2 sockets on a rainy day.

- but then you've got things like table locking if using MySQL 
with eg myISAM engine so you'd have to probably double that to deal
with the slower queries - make it 4 sockets.

I've only made FreeRADIUS cry with mySQL when hitting it with
really big slow queries at which point it choked all its handles
and started to get really angry but a couple of optimisations later
with some indexes and a change of DB engine (InnoDB) and things
were fine - to ensure future happiness a migration to postgres
was undertaken (pretty painless on the FR side of things...updating
other code was more ...interesting... lets say) and we then moved
to buffered_sql for the heavy stuff - that thread chugs along in
the background inserting/updating table values when it needs to.

FreeRADIUS and accouting DB took up too much time a while back..
a distraction that I could have done without but since the move to a 
better DB (I know..i'm stirring now..) and moving to 'out of band'
DB updates its 'just done its job(tm)'

PS there is an upcoming webcast about FreeRADIUS and mysql clusters
- if you are into MySQL and performance/reliability I'd wholely
recommend getting onto that.


More information about the Freeradius-Users mailing list