Open aderumier opened 5 years ago
The maps take a significant amount of memory because they are hot-updatable. They keep a reference to the original format so that when you update one entry, it's immediately propagated through all usages (even if used under different formats).
We thought about ways to significantly reduce the maps' memory usage in the past (typically divide in half) but this would imply the loss of ability to hot-update them. We figured that it was not really an acceptable tradeoff (even if configurable per map) because practically speaking those eating tons of memory are precisely the ones that need to be updated at run time (like geoloc).
In your case what is sad is that it eats twice the memory because the map is also loaded in the master process used to speak with systemd. We initially wanted it to switch to wait-mode after startup so that it doesn't hold all the config in RAM but William figured some corner cases which would be hard to address (I don't remember which ones and maybe it's not the case anymore). I'm marking this for "future fix" so that we don't forget it.
Thanks for the explain !
Hi, I have an acl with a geoip map
ls -lah /etc/haproxy/geoip/geoip.lst -rw-r--r-- 1 root root 29M juil. 23 14:55 /etc/haproxy/geoip/geoip.lst
cat /etc/haproxy/geoip/geoip.lst|wc -l 1413857
sample of content from geoip.list
memory usage is around 2x400mb
Not sure if it's a bug, or if it could be reduce ?