On 06/20/2015 12:25 PM, Michael Grant wrote: > I recently updated from 0.8.x to 0.9.2. fail2ban-server is now consuming a > gig+ of memory in my server. Before it was tiny fraction of this. > > I thought fail2ban just did a sort of complex grep though the tail of the > logs. Why would it need to keep huge amounts of data in memory? Things are > working fine but it's a huge resource hog. Is there something I can do to > reduce it's memory footprint without breaking something?
What exactly to you mean by "consuming a gig+ or memory"? For example, on one of my machines, /proc/PID/status reports: VmPeak: 2277900 kB VmSize: 2205532 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 79880 kB VmRSS: 69712 kB VmData: 598436 kB VmStk: 136 kB VmExe: 4 kB VmLib: 11428 kB VmPTE: 1952 kB VmSwap: 13824 kB So while the total virtual size of the process is over 2GBs, the actual use is only about 80MB. It this case, looking at smaps/lsof indicates that most of this is due to mmapping the systemd journal logs: # lsof -p 25124 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME fail2ban- 25124 root cwd DIR 9,3 4096 2 / fail2ban- 25124 root rtd DIR 9,3 4096 2 / fail2ban- 25124 root txt REG 9,2 7136 1051505 /usr/bin/python2.7 fail2ban- 25124 root mem REG 0,18 41943040 67475885 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-0000000000994def-0005191112b1c403.journal fail2ban- 25124 root mem REG 0,18 41943040 67263546 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-000000000098a24f-0005190c3c1a3644.journal fail2ban- 25124 root mem REG 0,18 41943040 67864600 /run/log/journal/6edadee517b84856b2979f66eea3100d/system.journal fail2ban- 25124 root mem REG 0,18 41943040 66696659 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-000000000096afa5-000518fd189fa6c8.journal fail2ban- 25124 root mem REG 0,18 41943040 67062707 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-000000000097fa91-000519075d7fb78c.journal fail2ban- 25124 root mem REG 0,18 41943040 66499850 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-00000000009604f2-000518f8a02fa888.journal fail2ban- 25124 root mem REG 0,18 41943040 66302174 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-0000000000955bbd-000518f3fbf7daa0.journal fail2ban- 25124 root mem REG 0,18 41943040 66116506 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-000000000094b574-000518ef093a53ff.journal fail2ban- 25124 root mem REG 0,18 41943040 67681562 /run/log/journal/6edadee517b84856b2979f66eea3100d/system@0e0f13c02f274f0fb62eaf46679f4237-000000000099f703-00051916332e637f.journal .... So I doubt that you are actually "consuming" 1+GB of RAM. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane [email protected] Boulder, CO 80301 http://www.nwra.com ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Fail2ban-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fail2ban-users
