On one server it's (supposedly) using 192m - but only 5m is resident, the rest is swapped out or unused.
On other 52m virt, but only 4m resident.
All the damn thing needs to do is keep a couple of running counters on a short buffer of IPs and run iptables when limits are met, and a periodic parse of a log file. This feels like something where 64k ought to be enough for anyone, much less 640k!
Sure, we can get by with a fifth of a gigabyte of swap space for this task. Ugh. I've spent too much of my life in debugger CPU views. Jack's quivering tower of abstractions writhes in repulsion.
There's about 200K of source code, but basically all the overhead is the python runtime.
(The memory usage of python doing nothing varied on different machines, but was always virtually identical to the usage of fail2ban.)
Also, the virt usage is mostly large memory mapped logfiles, not actual swap usage.