Problem with Discarding packets. It is the Radius, MySQL or PostgreSQL?
Hello guys, I would like an opinion concerning a situation that is happening with us. I'm sure you have faced a similar situation. Currently I have about 3000 clients connected simultaneously in 8 concentrators Mikrotik. These concentrators authenticate to 3 servers freeradius doing consulting and accounting users in a mysql db. The time we have the message "Discarding duplicate request ..." and " Discarding conflicting ..." and in recent days began using ippool in postgresql where we started having problems duplicating IPs. We believed that such duplication was due to these messages which were caused by our server mysql which was ancient and did not allow more make the necessary adjustments as the number of clients and memory. So we did the installation of new server Mysql and changed the parameters possible and even indicated by mysqltunner and mysqlprimer, but the message continued Discarding occurs. So we started using two tables for the radacct, but the message remains. Finally, we migrated the radacct for postgresql, where the number (two tables) where the incidence of this message decreased, but remains on average 50 per hour to about 1300 sections with pppoe interim-update 5 minutes. What are the parameters that could be changed to make the tuning of freeradius? The question that remains ... MySQL or PostgreSQL? We've done several settings in radius and mysql and still can not stop these messages. Attached my freeradius settings. I appreciate the attention and the help of everyone, Att
Hi,
I would like an opinion concerning a situation that is happening with us. I'm sure you have faced a similar situation.
yes. live accounting to DB requires REALLY optimised DB. you've made the move to postgres, which will help...and you can spend some time adjusting the buffers, threads etc but you probably want to look at eg buffered-sql module to take the live element out of the picture.... depending on your needs, having a clean-up thread 10s behing auths may be all you need for your purpose. I would suggest increasing the number of RADIUS threads too for loading from clients and going through your config removing modules that are not being used (are you using eg unix, digest, radutmp etc? alan
On Thu, Apr 25, 2013 at 3:20 AM, Michell <bill.cvel@gmail.com> wrote:
So we did the installation of new server Mysql and changed the parameters possible and even indicated by mysqltunner and mysqlprimer, but the message continued Discarding occurs.
( sigh ) no program can replace a qualified dba. It helps, but is not a replacement. Thinking "i have used program X tune the db, thus my db is 100% optimum and there's nothing more I can do on db side" is simply wrong.
Finally, we migrated the radacct for postgresql, where the number (two tables) where the incidence of this message decreased, but remains on average 50 per hour to about 1300 sections with pppoe interim-update 5 minutes.
IMHO 5 minutes is usually overkill. Then again, you only have 3k users, so that sums up to about 10 interim updates per second. Is your db capable of handling 10k updates to radacct table? (hint: if you don't know, ask a dba)
What are the parameters that could be changed to make the tuning of freeradius?
Search my post to the list yesterday. Even something as simple as regular maintenance to keep radacct small-enough and managable helps.
The question that remains ... MySQL or PostgreSQL?
I say use whatever you're familiar with. I'm a certified mysql dba, so I stick with mysql on my implementations. It can handle many simultaneous writes if you use innodb, have optimum table structure and db settings, and have sufficient hardware power. Simply switching from mysql to postgres would probably only give as much improvement as using innodb storage engine, so don't treat it like a silver bullet. However if you're more familiar with postgres and can perform the necessary optimizations, you should definitely use that instead. As Alan mentioned, using buffered-sql (or decoupled accounting) might help in some situations. But again, don't treat it like a silver bullet. -- Fajar
Michell wrote:
What are the parameters that could be changed to make the tuning of freeradius?
Nothing. Fix your database. If you have 3000 clients connected simultaneously with 5min updates, that's 10 accounting packets/s. ANY database should be able to handle that with minimal tuning. You need a database admin to tell you what's wrong with your database. If it can't handle 10 writes/s, your database is *very* wrong. Alan DeKok.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Fajar A. Nugraha -
Michell