How do I stop reading of detail file after a certain threshold is reached
Hello, We are using Freeradius2 with MySQL at the backend. I understand that the buffered sql takes care of buffering queries. What is the best way to stop querying MySQL altogether and return a negative response, after a certain threshold of processing is reached by the server? Thanks in advance.. vivek
On Mon, Mar 5, 2012 at 12:01 PM, Vivek Mehrotra <vmehro@yahoo.com> wrote:
Hello, We are using Freeradius2 with MySQL at the backend. I understand that the buffered sql takes care of buffering queries. What is the best way to stop querying MySQL altogether and return a negative response, after a certain threshold of processing is reached by the server?
What threshold are you talking about? The detail reader used by buffered sql by default only process one record at a time. In other words, each detail reader only runs one sql thread. So it should have very little impact on load. -- Fajar
As the number of queries increases to a few ten-thousands, mysqld monopolizes the CPU. We wish to stop querying MySQL at that point. There's only so much "load_factor" can help? Would welcome alternate solutions as well.. Regards, vivek
On Mon, Mar 5, 2012 at 12:48 PM, Vivek Mehrotra <vmehro@yahoo.com> wrote:
As the number of queries increases to a few ten-thousands, mysqld monopolizes the CPU. We wish to stop querying MySQL at that point. There's only so much "load_factor" can help? Would welcome alternate solutions as well..
You should hire a dba. Seriously. IF you use buffered sql (note the big IF), then the load from the acct queries should not be a factor. Authorization is. Probably because you're using simultaneous-use check, and your radacct is huge. A dba should be able to help you give the most performance from your db (e.g. by tuning indices, moving old entries out from radacct, etc) I'm not sure about load limit, but you should be able to limit the number of sql threads in sql.conf. Last time I tested, if an access-request packet comes when all sql threads are busy, it will be rejected (which looks like what you want). -- Fajar
Thanks Alan and Fajar, How do I ensure the buffered-sql file gets included by the server? Do I need an additional default Virtual Server configuration to enable the buffered-sql? Where are the SQL queries picked up from if there is no buffered sql? Also, how does dialup admin interface pick up server/sql information if I wish to incorporate that in the product? Thanks in advance, vivek
Hi,
How do I ensure the buffered-sql file gets included by the server? Do I need an additional default Virtual Server configuration to enable the buffered-sql?
you ensure theres a link to it from sites-enabled into sites-available
Where are the SQL queries picked up from if there is no buffered sql?
your current default/inner-tunnel etc virtual servers
Also, how does dialup admin interface pick up server/sql information if I wish to incorporate that in the product?
configuration file alan
Hi,
We are using Freeradius2 with MySQL at the backend. I understand that the buffered sql takes care of buffering queries. What is the best way to stop querying MySQL altogether and return a negative response, after a certain threshold of processing is reached by the server?
buffered_sql takes a detail file and dumps the contents into SQL - theres no querying involved....its just a single thread that runs when the main radiusd processes are quiet(er) - there are some variables in the buffered_sql that allow you to change its load variance and how often it polls the detail file. i think your problem is elsewhere alan
participants (3)
-
Alan Buxey -
Fajar A. Nugraha -
Vivek Mehrotra