Freeradius 3.0.7 and multiple buffered-sql servers - detail file issues
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Fri Apr 17 00:05:08 CEST 2015
> I am trying to migrate the freeradius 2.2.5 to 3.0.7. The server is doing just Acounting request processing and is loading requests to MariaDB with radacct table on InnoDB engine allowing row level locking. There are 128 detail files derived from Calling-Station-Id attribute using mod 128:
Your config has spawned 128 threads, each with their own set of file descriptors to access the detail files, and then two more for communication with the master thread for inserting packets into the packet queue. I assume you also have 128 detail writers so that's another 128.
So that's at least 512 file descriptors, which by itself, I guess, isn't a problem.
However, on the master thread side of some of those descriptors sits a select() loop, which, with 128 file descriptors, will be a problem. In fact, it'll likely cause a large drop in throughput.
I imagine the error is being thrown by the exfiles API, because you have a large number of different files that are open, and you've hit a compiled in limit.
Compiled in limits are usually to stop people doing stupid things. Stop doing stupid things and the server will work.
The detail file reader is considerably faster in v3.0.7 than 2.2.5, you probably don't need 128 detail queues. One would likely be enough, 10 at most.
Also is there a reason why you're not doing direct inserts into the database? buffered sql was intended primarily for buffering SQL data when the database went offline, not for insertion into the normal request flow. It'll always be slower than blocking inserts.
You can set the MySQL client library timeout sufficiently low that the module will will trash all its connections, and failover to the detail writer before the server starts dropping packets.
Set retry_delay in the sql module pool to something like 60 to stop the server continuously trying to open new connections when a MySQL server does down.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150416/1af7c5e6/attachment.sig>
More information about the Freeradius-Users
mailing list