I checked in some code yesterday to rlm_files that gets rid of 99.9% of the linked list walking. In my tests with 200k entries in a "users" file, the CPU time goes from large to negligible. The code changes are pretty trivial, which is a little surprising. It's based on the new growable hash functions, so most of the magic is hidden from the module. Is there any need for rlm_fastusers any more? It was always a bit of a hack, and with rlm_files being fast now, there doesn't appear to be much need for rlm_fastusers. I don't even know if anyone is using it... About the only difference is the reload support. I think the solution is to add a "need_reload" entry to each module, or maybe a "reload". The idea would be either that on HUP, the module would be able to say "no files change, I don't need a reload", or the module would be able to selectively reload the files that have changed. Comments? Alan DeKok.
Hi,
About the only difference is the reload support. I think the solution is to add a "need_reload" entry to each module, or maybe a "reload". The idea would be either that on HUP, the module would be able to say "no files change, I don't need a reload", or the module would be able to selectively reload the files that have changed.
I've been wondering why the server needs to be reloaded to read in the users/client files... of course, moving off to SQL based methods removes the reload requirement but cant the module check the status of the file and if the file has changed, re-read the file itself (eg check the modify stamp of the file?) alan
A.L.M.Buxey@lboro.ac.uk wrote:
I've been wondering why the server needs to be reloaded to read in the users/client files...
Mostly historical reasons, coupled with the issue that's it's a bit of a problem to re-load data structures while they're in use.
of course, moving off to SQL based methods removes the reload requirement but cant the module check the status of the file and if the file has changed, re-read the file itself (eg check the modify stamp of the file?)
No. Do you really want the server to automatically re-load the file when you're in the middle of an editing session? The server *should* cache the last modified time, so it doesn't have to reload files that didn't change. But it should *not* reload files until told to do so. Alan DeKok.
participants (2)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok