radsqlrelay performance issues with network latency
p.mayers at imperial.ac.uk
Thu Dec 13 15:20:38 CET 2012
On 13/12/12 13:47, Dr. Uwe Meyer-Gruhl wrote:
> However, I found out that with latency of 25ms between a MySQL database
> server and the FreeRADIUS machine, there still is a performance problem:
> In our large-scale installation with > 100 log entries per seconds, we
> saw that the sqlrelay log file was constantly growing. It grew faster
> than radsqlrelay was able to shift the data to the database server.
> Another FreeRADIUS instance with < 1ms latency had no problem.
> The root cause is that each SQL statement is handled individually within
> radsqlrelay. So, with a network latency of 25ms, there can be at most
> 1000ms/25ms = 40 database operations per second, while with 1ms latency,
> there can be 1000 per second.
Yes. In fact, not only is each request handled as a separate query, each
request is a single transaction, which overloads the SQL server :o(
We use a bespoke Python script that is compatible with radsqlrelay
locking scheme to insert the data, and it works much better, but it's
specific to our environment and queries, so isn't generally useful.
But it uses a similar approach - so I endorse your idea ;o)
More information about the Freeradius-Devel