HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   Optimize your fail2ban memory use by 90%. (http://www.howtoforge.com/forums/showthread.php?t=49666)

ivomendonca 26th October 2010 16:58

Optimize your fail2ban memory use by 90%.
 
The solution turns out to be a one-liner on Debian Lenny

append the ulimit command to /etc/default/fail2ban file.

Add (to the file) on last line :

"ulimit -s 256"

Using this sets the default stack size for the Python instances running fail2ban to 256 KB and lowers the memory consumption of fail2ban approximately by a factor of 10.

I had 256mb use -> now less than 20.

drewb0y 3rd November 2010 15:45

my memory usage for fail2ban went from 23980 blocks to 9412 using
Code:

ps -aux |grep fail2ban

SamTzu 1st December 2010 20:01

Did not seem to work with me.
Service did not restart.

ivomendonca 2nd December 2010 19:26

Quote:

Originally Posted by SamTzu (Post 245589)
Did not seem to work with me.
Service did not restart.

Is only a line in a file, there is nothing to fail.
I think maybe windows is better for you.


dont include the " ", maybe is that.

SamTzu 4th December 2010 18:32

Quote: Originally Posted by SamTzu http://static.howtoforge.com/forums/...s/viewpost.gif
Did not seem to work with me.
Service did not restart.


Quote:

Is only a line in a file, there is nothing to fail.
I think maybe windows is better for you.
..or maybe your instructions were actually false or inaccurate?


Quote:

/etc/default/fail2ban: line 24: ulimit -s 256: command not found
Restarting authentication failure monitor: fail2ban.

It worked without the quotes. thx.

ivomendonca 6th December 2010 19:55

" " are only used in strings with space.
In windows too.


All times are GMT +2. The time now is 01:14.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.