High CPU usage after SQL failure when using buffered-sql
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.h...) Is there any way to mitigate these CPU issues in version 2.1.4? -- Stephen
Thanks Alan, I'll do that. -- Stephen Alan DeKok wrote:
Stephen Fulton wrote:
Is there any way to mitigate these CPU issues in version 2.1.4?
No.
You will need to either upgrade, or *manually* pull the patches from git into a local copy of 2.1.4.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alan, I forgot to ask, is the fix part of stable or development? Thanks, -- Stephen Stephen Fulton wrote:
Thanks Alan, I'll do that.
-- Stephen
Stephen Fulton wrote:
Is there any way to mitigate these CPU issues in version 2.1.4?
No.
You will need to either upgrade, or *manually* pull the patches from git into a local copy of 2.1.4.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alan DeKok wrote: - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks Alan. To follow-up, 2.1.5 was tested using my parameters, and the condition did not reappear. Cheers, -- Stephen Alan DeKok wrote:
Stephen Fulton wrote:
I forgot to ask, is the fix part of stable or development?
Both. The next release will be off of the "stable" tree.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Stephen Fulton