Hi all. I have a question about rlm_ippool and cache-size option. Info from description: cache-size: The gdbm cache size for the db files. Should be equal to the number of ip's available in the ip pool. Also, note the cache size matches the number of IP's in your pool. More is OK but wasteful, less is very bad. My pool size is 32k. And I'm using this pool only for fallback issue. So, I'll need it rarely in the future. If cache-size = 32768, then radiusd process takes all memory. "Mon Sep 13 12:33:46 2010 : Error: Couldn't fork: Cannot allocate memory" If cache-size = 16384 : top: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3061 freerad 20 0 304m 261m 1080 S 0 52.1 0:00.00 radiusd radiusd takes 261m! :-[ ] So, here is my question. If I'll use default cache-size =800, and at some point radius will start using this pool, what will happen if all 800 ip-addresses will be taken? Will the system slowdown, or if there will be a segmentation fault or something else? Why is "less is very bad"?
Konstantin Chekushin wrote:
My pool size is 32k. And I'm using this pool only for fallback issue. So, I'll need it rarely in the future.
For 32K IP's, I'd suggest using a database.
If cache-size = 32768, then radiusd process takes all memory. "Mon Sep 13 12:33:46 2010 : Error: Couldn't fork: Cannot allocate memory" If cache-size = 16384 : ... radiusd takes 261m! :-[ ]
<shrug> That's how in-memory databases work. They use memory.
So, here is my question. If I'll use default cache-size =800, and at some point radius will start using this pool, what will happen if all 800 ip-addresses will be taken? Will the system slowdown, or if there will be a segmentation fault or something else? Why is "less is very bad"?
If you have 32K IP's, use a database. See the "sqlippool" module. Alan DeKok.
Thanks for advice, but I am using database for main solution (I've writen my module for this issue, which uses rlm_sql functions for sql logic). And I wont to use file-based for redundancy only. So, the main question - what will happens, if query-cache will be less, then ip-range? I have made a simple test, when ip-range is 90 ip-s, and cache is 10. It looks that it works fine. Quoting *Alan DeKok <aland@deployingradius.com>*:
Konstantin Chekushin wrote:
My pool size is 32k. And I'm using this pool only for fallback issue. So, I'll need it rarely in the future.
For 32K IP's, I'd suggest using a database.
If cache-size = 32768, then radiusd process takes all memory. "Mon Sep 13 12:33:46 2010 : Error: Couldn't fork: Cannot allocate memory" If cache-size = 16384 : ... radiusd takes 261m! :-[ ]
That's how in-memory databases work. They use memory.
So, here is my question. If I'll use default cache-size =800, and at some point radius will start using this pool, what will happen if all 800 ip-addresses will be taken? Will the system slowdown, or if there will be a segmentation fault or something else? Why is "less is very bad"?
If you have 32K IP's, use a database. See the "sqlippool" module.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Konstantin Chekushin wrote:
Thanks for advice, but I am using database for main solution (I've writen my module for this issue, which uses rlm_sql functions for sql logic). And I wont to use file-based for redundancy only. So, the main question - what will happens, if query-cache will be less, then ip-range? I have made a simple test, when ip-range is 90 ip-s, and cache is 10. It looks that it works fine.
If it works... Alan DeKok.
participants (2)
-
Alan DeKok -
Konstantin Chekushin