but mysql is optimized for that kind of lookups, there is huge difference. then again, you can increase the mysql memory cache that mysql can cache the whole db inside the ram if it is small enough.
Now about searching in ram is better than using a database backend. I wonder why companies do not store their database data in text files and load them to ram :) now the problem is that also everytime you reload radius it reloads the whole file since it cant know where the changed data is. Thus uses far more cpu. It is definetely not a good thing if you want your users to change their passwords from web, then you need to write to users file and reload radius if you do not use sql. If you use sql you can create a user which can only change some parts of the database and limit the access. It is even more secure when configured properly. It is 100 times easier to write a php script which does that than writing it in c or perl
Evren
Graeme Hinchliffe wrote:
On Mon, 4 Aug 2003 18:01:07 +0200 "Andrea Coppini" <[EMAIL PROTECTED]> wrote:
DB backends are good, and save alot of admin, but don't expect them to
be
faster than a memory scan :-)
I haven't done any tests, but I would presume an SQL backend would be more 'robust' than freeradius.
The way I see it, having 1 request a minute is definitely faster with a users file in memory, but when the load hits and you have 10,000 hits per minute, freeradius would grind to a halt having to look up the credentials and handling all NAS comms simultaneously, while freeradius + sql would just continue doing their respective jobs as normal.
But as the same CPU would be working on the DB lookups AND the freeRADIUS code as well, it would slow down by a much larger factor. You would now have 2 processes sharing the memory and CPU resources and bus of the system etc..
Fact is Disk access is horribly slow compared to memory.
Look at the spec of a fairly old (now) PC.. 100MHz FSB.. so thats around 100,000,000*4 bytes per SECOND which is a tiny bit faster than a HDD don't you think.
Just look at the clock speed of your PC.. even if the data wasn't indexed in memory and was searched in a linear manner it would still be extremely quick in comparison to a db.
Graeme
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
