rlm_ippool memory footprint
James Chapman
jchapman at katalix.com
Wed Oct 14 22:19:34 CEST 2020
I sometimes see freeradius killed by OOM-killer at boot time. On
investigating this, freeradius seems to allocate a lot of RAM to manage
IP address pools (rlm_ippool). Is it possible to reduce this footprint?
I have a large IP pool configured (64k addresses) using rlm_ippool.
range_start = 172.28.0.1
range_stop = 172.28.255.254
netmask = 255.255.0.0
cache_size = 65535
freeradius allocates 600M with this configuration:
# pgrep freeradius
4681
# ps -p 4681 --format "%cpu %mem rss"
%CPU %MEM RSS
2.1 61.5 616644
Reducing cache_size in the pool config to 255 results in far less memory
being allocated (92M) :
# pgrep freeradius
4245
# ps -p 4245 --format "%cpu %mem rss"
%CPU %MEM RSS
0.0 9.2 93148
But freeradius docs say that cache_size should be set to the number of
entries in the pool. In a test setup, using a cache_size that is much
less than the pool size seems to work. Other than for performance
reasons, is there a reason why cache_size should be set to the number of
entries in the pool? It seems like a lot of memory is otherwise needed
for managing an IP address pool...
My system is a minimal Ubuntu 20.04 VM with 1G RAM. freeradius is
version 3.0.20. I attach output of freeradius -X.
Thanks
James
More information about the Freeradius-Users
mailing list