Hi everybody, I have a radacct table with more than 12300000 rows. I have increased RAM memory recently because the data base is working with InnoDB engine and was necessary to load data into the buffer. But, anybody knows some technique that allows freeradius makes authentications with radacct historical tables? I have thought in grouping rows using the UserName, keeping only one row for each user. Also I thought in make quarterly tables but this is a proble to authenticate users. Any ideas? Thanks in advance. Regards, Antonio.
Hi,
that allows freeradius makes authentications with radacct historical tables?
The table radacct is not used for authentication. Radacct stores accounting information only. Hence, it is safe to delete old entries in order to free memory.
Also I thought in make quarterly tables but this is a proble to authenticate users.
I do not understand your point. What exactly is the problem? Here ist what we do: Due to legal right, we are only allowed to store the accounting information for seven days anyway. Hence I wrote I little SQL script that is periodically invoked through crontab. In principle the SQL script performs two steps: 1) For any entry that has an accounting start and an accounting update time that is older than five times the update intervall but has no accounting stop time, the accounting stop time is set to the last accounting update time. Because the update time was not updated recently, we must assume that the sessions is stalled. I.e. the session has stopped, but we missed the acct stop message for some reason. 2) Select any row which most recent time entry (any of start, update, stop time) is older than 7 days and delete that row. Of course, depending on your SQL server you should pay attention to table locking, because freeradius still access the database while the script is running. Matthias 2014/1/17 Antonio Fernández Pérez <antoniofernandez@fabergames.com>
Hi everybody,
I have a radacct table with more than 12300000 rows. I have increased RAM memory recently because the data base is working with InnoDB engine and was necessary to load data into the buffer. But, anybody knows some technique that allows freeradius makes authentications with radacct historical tables?
I have thought in grouping rows using the UserName, keeping only one row for each user. Also I thought in make quarterly tables but this is a proble to authenticate users.
Any ideas?
Thanks in advance.
Regards,
Antonio.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Matthias Nagel Parkstraße 27 76131 Karlsruhe Festnetz: +49-721-96869289 Mobil: +49-151-15998774 e-Mail: matthias.h.nagel@gmail.com ICQ: 499797758 Skype: nagmat84
Hi,
I have a radacct table with more than 12300000 rows. I have increased RAM memory recently because the data base is working with InnoDB engine and was necessary to load data into the buffer. But, anybody knows some technique that allows freeradius makes authentications with radacct historical tables?
????? radacct is just accounting data - nothing to do with authentication of users (unless using it for eg bandwidth management/allowance) - in which case you need to work out how you are going to manage old/stale data. we delete stuff thats of no interest to us anymore. postgresql autovacuum keeps control of the table size and fragmentation. alan
Thanks for your replies. I know that radacct is not used for authentication but, its rows contains information (Seconds) to the counters (To allow or not start a session). So, my problem is that I have all rows in only one table, without historical data. The server is working with NAS (Disk cabin), for this reason sharding and partitioning techniques I think that there are not necessary. Do you know if are there some technique to implement or if FreeRADIUS allows to work with more than one radacct table? Thanks in advance. Regards, Antonio. 2014/1/17 Antonio Fernández Pérez <antoniofernandez@fabergames.com>
Hi everybody,
I have a radacct table with more than 12300000 rows. I have increased RAM memory recently because the data base is working with InnoDB engine and was necessary to load data into the buffer. But, anybody knows some technique that allows freeradius makes authentications with radacct historical tables?
I have thought in grouping rows using the UserName, keeping only one row for each user. Also I thought in make quarterly tables but this is a proble to authenticate users.
Any ideas?
Thanks in advance.
Regards,
Antonio.
Thanks for your reply. Do you think that this is the best option? Anybody has the same problem? What happens if you work with millions of rows? Should I to implement another configuration like proxy ... ? Thanks in advance. Your replies helped me. Regards, Antonio.
Antonio Fernández Pérez wrote:
Do you think that this is the best option?
Move old data into a separate table.
Anybody has the same problem?
Everyone.
What happens if you work with millions of rows?
You buy a large machine which can handle it, and you ensure that the database can handle it.
Should I to implement another configuration like proxy ... ?
No. Alan DeKok.
Again, thank you very much for your replies. Your suggestions help me a lot. So, I should to work in increasing server performance. I'm going to try to work with separate tables ( Maybe work with several tables smaller than the original is better). Regards, Antonio.
Hello,
So, I should to work in increasing server performance.
Of couse this will help and if you really MUST have a database table that big, it will be the only option. But you should be aware of that this is only a temporary solution, because if you do not delete old entries, your database will hit the newly increased limit again some time in the future. Hence, if you really must have 12 million records in your database, increasing the server perfomance is the only way as Alan wrote. But I doubt, that you really need 12 million records. For what purpose? You wrote blandly something about authorization with regard to bandwith. But you did not go into the details. Hence, I can only guess that you want your clients to be kicked off (not authorized anymore) if they reach a certain limit of time, data volume or something like this. Is my guess correct? But I also assume that the decision is only based on the recent entries, i.e. transfer volume in the current month, and not based on a total. So, there is no need to store any entries that are older than those that are needed for your decision. Please also be aware of the fact that it might be illegal to keep personal information longer than a certain amount of time in your country. Anyway it is a good habbit to delete any personal data that is not needed anymore to strenghen privacy. Matthias Am Freitag, 17. Januar 2014, 16:41:18 schrieb Antonio Fernández Pérez:
Again, thank you very much for your replies. Your suggestions help me a lot.
So, I should to work in increasing server performance. I'm going to try to work with separate tables ( Maybe work with several tables smaller than the original is better).
Regards,
Antonio.
-- Matthias Nagel Parkstraße 27 76131 Karlsruhe Festnetz: +49-721-96869289 Mobil: +49-151-15998774 e-Mail: matthias.h.nagel@gmail.com ICQ: 499797758 Skype: nagmat84
Thanks for your reply Matthias. I understand that this a temporal solution. I need all rows because when an user try to use its ticket (UserName and password), FreeRADIUS using its counters (Modules, one-all-session, max-all-session) checks if has spend all the time. If the user has seconds to spend could surface, if not will be reject. The problem is that we have users that can connect for more than one month ... Obviously the best option to work with a good performance is delete old rows or move them into another table as Alan has said. Thanks again. Regards, Antonio.
Hi, you can do rotation of that table by month, using a script at crontab for example, must change in file sql.conf the name of table radacct for radacct%Y%m. Regards, On 17/01/14 08:18, Antonio Fernández Pérez wrote:
Hi everybody,
I have a radacct table with more than 12300000 rows. I have increased RAM memory recently because the data base is working with InnoDB engine and was necessary to load data into the buffer. But, anybody knows some technique that allows freeradius makes authentications with radacct historical tables?
I have thought in grouping rows using the UserName, keeping only one row for each user. Also I thought in make quarterly tables but this is a proble to authenticate users.
Any ideas?
Thanks in advance.
Regards,
Antonio.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- ...................................... Eduardo Costa Centro de Comunicações - Instituto Politécnico de Bragança raposo at ipb.pt http://www.ipb.pt/~raposo/ ......................................
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Antonio Fernández Pérez -
Eduardo Costa -
Matthias Nagel