Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th October 2010, 17:58
ivomendonca ivomendonca is offline
Banned
 
Join Date: Sep 2009
Posts: 132
Thanks: 10
Thanked 14 Times in 8 Posts
Default 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.

Last edited by ivomendonca; 9th November 2010 at 20:13.
Reply With Quote
The Following 7 Users Say Thank You to ivomendonca For This Useful Post:
drewb0y (3rd November 2010), edge (26th October 2010), falko (27th October 2010), Horfic (3rd November 2010), Nicram (18th November 2010), teslax (6th February 2014), vaio (6th November 2010)
Sponsored Links
  #2  
Old 3rd November 2010, 16:45
drewb0y drewb0y is offline
Senior Member
 
Join Date: Sep 2010
Posts: 103
Thanks: 10
Thanked 14 Times in 7 Posts
Default

my memory usage for fail2ban went from 23980 blocks to 9412 using
Code:
ps -aux |grep fail2ban
__________________
ISPConfig 3.0.5.4p1 - The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3)
Installed on Debian 7.6 on a KVM VPS
Reply With Quote
  #3  
Old 1st December 2010, 21:01
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 438
Thanks: 34
Thanked 56 Times in 39 Posts
Send a message via Skype™ to SamTzu
Default

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

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #4  
Old 2nd December 2010, 20:26
ivomendonca ivomendonca is offline
Banned
 
Join Date: Sep 2009
Posts: 132
Thanks: 10
Thanked 14 Times in 8 Posts
Default

Quote:
Originally Posted by SamTzu View Post
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.
Reply With Quote
  #5  
Old 4th December 2010, 19:32
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 438
Thanks: 34
Thanked 56 Times in 39 Posts
Send a message via Skype™ to SamTzu
Smile

Quote: Originally Posted by SamTzu
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.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #6  
Old 6th December 2010, 20:55
ivomendonca ivomendonca is offline
Banned
 
Join Date: Sep 2009
Posts: 132
Thanks: 10
Thanked 14 Times in 8 Posts
 
Default

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

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need some Hints to "The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3]" wahid HOWTO-Related Questions 10 25th August 2010 16:18
fail2ban is doing nothing? rlischer Server Operation 16 29th June 2010 08:29
Out of memory errors pan69 General 9 13th April 2010 08:10
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 17:59
Ispconfig and Virtuemart shajazzi Installation/Configuration 7 21st February 2006 21:25


All times are GMT +2. The time now is 07:44.


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