Actually I'm using freeradius 2.1.10 and mysql 5.5.38 with 50K users and 40K accounting rows (they are purged each month). When I try an authentication request, it seems too slow: time echo "User-Name = user1,Password = xxxx" | radclient -x a.b.c.d:1812 auth testing123 Sending Access-Request of id 122 to 50.0.1.4 port 1812 User-Name = "3337822263" Password = "o24nu" rad_recv: Access-Accept packet from host a.b.c.d port 1812, id=122, length=26 Idle-Timeout = 600 real 0m0.870s user 0m0.012s sys 0m0.007s I have only 3 clients and in radius.log I see a lot of Fri Jul 15 10:01:19 2016 : Error: Discarding duplicate request from client owdata4 port 50368 - ID: 209 due to unfinished request 309 My clients are connected on the same lan of the freeradius server and I added indexes on table in mysql. Is there a way to speeding up my freeradius installation? Please let me know if I have to add more details. Thank you
Hi,
When I try an authentication request, it seems too slow:
yep
I have only 3 clients and in radius.log I see a lot of
only 3 clients could be a small issue - each client can only have a limited number of RADIUS connections. the main issue is number of users - and amount of accounting transactions being undertaken due to them. authentication isnt the headache that accounting is. so, 1) have you tweaked any of the SQL settings for performance in FreeRADIUS eg have more connections number of connections per client etc? 2) MyISAM or InnoDB if using MySQL ? former is default..and sucks. use InooDB if using MySQL. 3) do you need realtime accounting or can you have a slight delay of seconds? if the latter, then consider using the buffered-sql virtual server 4) upgrade alan
Hi Alan, thank you for your support. 1) Actually I have thread pool { start_servers = 5 max_servers = 32 min_spare_servers = 3 max_spare_servers = 10 max_requests_per_server = 0 } Furthermore, in sql.conf num_sql_socks = 10 But I don't know where I can set the number of connections per client 2) I'm using InnoDB, checked settings with mysqltuner and mysql tuning primer 3) I can have a slight delay in accounting requests if freeradius in the meantime responds ok to the request, so clients don't have to wait mysql write. Is this possible with freeradius 2.x?? 4) Unfortunately I cannot upgrade at the moment. But seriously, I'm planning the upgrade. Marco Regards 2016-07-15 10:19 GMT+02:00 <A.L.M.Buxey@lboro.ac.uk>:
Hi,
When I try an authentication request, it seems too slow:
yep
I have only 3 clients and in radius.log I see a lot of
only 3 clients could be a small issue - each client can only have a limited number of RADIUS connections. the main issue is number of users - and amount of accounting transactions being undertaken due to them. authentication isnt the headache that accounting is.
so,
1) have you tweaked any of the SQL settings for performance in FreeRADIUS eg have more connections number of connections per client etc?
2) MyISAM or InnoDB if using MySQL ? former is default..and sucks. use InooDB if using MySQL.
3) do you need realtime accounting or can you have a slight delay of seconds? if the latter, then consider using the buffered-sql virtual server
4) upgrade
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sorry.... Is there something that I can do for better performance? Buffered-sql for accounting could be a solution, but how can I increase the number of connections per client? thank you 2016-07-15 10:46 GMT+02:00 Marco Marino <marino.mrc@gmail.com>:
Hi Alan, thank you for your support. 1) Actually I have thread pool { start_servers = 5 max_servers = 32 min_spare_servers = 3 max_spare_servers = 10 max_requests_per_server = 0 } Furthermore, in sql.conf num_sql_socks = 10
But I don't know where I can set the number of connections per client
2) I'm using InnoDB, checked settings with mysqltuner and mysql tuning primer 3) I can have a slight delay in accounting requests if freeradius in the meantime responds ok to the request, so clients don't have to wait mysql write. Is this possible with freeradius 2.x?? 4) Unfortunately I cannot upgrade at the moment. But seriously, I'm planning the upgrade.
Marco Regards
2016-07-15 10:19 GMT+02:00 <A.L.M.Buxey@lboro.ac.uk>:
Hi,
When I try an authentication request, it seems too slow:
yep
I have only 3 clients and in radius.log I see a lot of
only 3 clients could be a small issue - each client can only have a limited number of RADIUS connections. the main issue is number of users - and amount of accounting transactions being undertaken due to them. authentication isnt the headache that accounting is.
so,
1) have you tweaked any of the SQL settings for performance in FreeRADIUS eg have more connections number of connections per client etc?
2) MyISAM or InnoDB if using MySQL ? former is default..and sucks. use InooDB if using MySQL.
3) do you need realtime accounting or can you have a slight delay of seconds? if the latter, then consider using the buffered-sql virtual server
4) upgrade
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Jul 16, 2016, at 9:15 AM, Marco Marino <marino.mrc@gmail.com> wrote:
Sorry.... Is there something that I can do for better performance?
FreeRADIUS (even version 2) can easily do 20K packets/s on normal hardware. If you're having trouble with 10 packets/s, the problem is not FreeRADIUS. Fix the database so it isn't slow. Be sure that *all* SQL queries have indexes. Be sure that the accounting tables don't have millions of rows. And as always, the default config works. If you install v2 and the v2 SQL schemas, you'll easily be able to get 200 packets/s, even to SQL. So... what changed in your system? What part of it is *not* using the default config? Alan DeKok.
Hi, Could be the same reason I had? Are you using the checkrad script to control the active sessions on your nas? 16 июля 2016 г. 16:48 пользователь "Alan DeKok" <aland@deployingradius.com> написал:
On Jul 16, 2016, at 9:15 AM, Marco Marino <marino.mrc@gmail.com> wrote:
Sorry.... Is there something that I can do for better performance?
FreeRADIUS (even version 2) can easily do 20K packets/s on normal hardware. If you're having trouble with 10 packets/s, the problem is not FreeRADIUS.
Fix the database so it isn't slow. Be sure that *all* SQL queries have indexes. Be sure that the accounting tables don't have millions of rows.
And as always, the default config works. If you install v2 and the v2 SQL schemas, you'll easily be able to get 200 packets/s, even to SQL.
So... what changed in your system? What part of it is *not* using the default config?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ok, problem solved! The issue is related to mysql and the structure of the radius db created by some incompetent developer for an embedded application that shares the radius db. Basically, all radius table is a view (yes, a view, not a table! And a really complicated view!! I know.... this is terrifying). So, nothing related to freeradius or to the original mysql structure of the radius db. Thanks for your support. Marco 2016-07-16 19:26 GMT+02:00 Roman <romeo.r@gmail.com>: > Hi, > > Could be the same reason I had? Are you using the checkrad script to > control the active sessions on your nas? > > 16 июля 2016 г. 16:48 пользователь "Alan DeKok" <aland@deployingradius.com > > > написал: > > > On Jul 16, 2016, at 9:15 AM, Marco Marino <marino.mrc@gmail.com> wrote: > > > > > > Sorry.... Is there something that I can do for better performance? > > > > FreeRADIUS (even version 2) can easily do 20K packets/s on normal > > hardware. If you're having trouble with 10 packets/s, the problem is not > > FreeRADIUS. > > > > Fix the database so it isn't slow. Be sure that *all* SQL queries have > > indexes. Be sure that the accounting tables don't have millions of rows. > > > > And as always, the default config works. If you install v2 and the v2 > > SQL schemas, you'll easily be able to get 200 packets/s, even to SQL. > > > > So... what changed in your system? What part of it is *not* using the > > default config? > > > > Alan DeKok. > > > > > > - > > List info/subscribe/unsubscribe? See > > http://www.freeradius.org/list/users.html > - > List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html >
On Jul 22, 2016, at 10:31 AM, Marco Marino <marino.mrc@gmail.com> wrote:
Ok, problem solved! The issue is related to mysql and the structure of the radius db created by some incompetent developer for an embedded application that shares the radius db. Basically, all radius table is a view (yes, a view, not a table! And a really complicated view!! I know.... this is terrifying). So, nothing related to freeradius or to the original mysql structure of the radius db.
I'm not surprised. We've put a *lot* of effort into ensuring that the default configuration works, and is fast. When people mangle the default configuration (including SQL schema), it usually causes a lot of problems.
Thanks for your support.
It's what we do... Alan DeKok.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Marco Marino -
Roman