Optimize your fail2ban memory use by 90%.

Discussion in 'Tips/Tricks/Mods' started by ivomendonca, Oct 26, 2010.

  1. ivomendonca

    ivomendonca Banned

    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: Nov 9, 2010
  2. drewb0y

    drewb0y Member

    my memory usage for fail2ban went from 23980 blocks to 9412 using
    Code:
    ps -aux |grep fail2ban
     
  3. SamTzu

    SamTzu Member HowtoForge Supporter

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

    ivomendonca Banned

    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.
     
  5. SamTzu

    SamTzu Member HowtoForge Supporter

    Quote: Originally Posted by SamTzu [​IMG]
    Did not seem to work with me.
    Service did not restart.


    ..or maybe your instructions were actually false or inaccurate?



    It worked without the quotes. thx.
     
  6. ivomendonca

    ivomendonca Banned

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

Share This Page