High CPU usage after SQL failure when using buffered-sql
Stephen Fulton
sf at lists.esoteric.ca
Tue May 5 20:57:34 CEST 2009
Hi all,
First, I've used FreeRADIUS for a number of years in a number of installations,
and I'm fairly comfortable with it. I have looked through the archives, as well
as read the documentation, FAQ, wiki and the notes within each of the
configuration files that make up FR, such as the virtual servers and modules
that would be used. Now onto the issue:
During testing of a new RADIUS cluster, I implemented the buffered-sql virtual
server, which works fine, with the detail file poll interval set to 10 seconds.
However, when I simulate a failure of the accounting MySQL server to which it
normally writes, CPU usage spikes significantly, from an average of ~ 1-2% to
30+ over time. If the accounting MySQL server is unavailable for longer than
2-3 minutes, the spikes occur much more frequently.
Once the SQL server returns to service, accounting records stored in the detail
file are properly read and inserted into the DB, then the files are cleared, as
I expected. However, the RADIUS process still maintains a higher than normal
CPU load (according to top) of around 10%, which spikes to 30-40% when it is
handling a new request (note the singular). The server is a dual Xeon
3.something, with 2GB RAM and SCSI disks. The server is running Debian Linux
2.6.26-2-686. FreeRADIUS is running version 2.1.4, compiled manually.
During previous debugging, while running FR in debugging mode, I noted that it
was attempting to read the detail file every second, sometimes less. This
matches a comment made by Alan in a similar sounding issues discussed on the
list in April 2008.
(http://www.mail-archive.com/freeradius-users@lists.freeradius.org/msg44137.html)
Is there any way to mitigate these CPU issues in version 2.1.4?
-- Stephen
More information about the Freeradius-Users
mailing list