]> git.ipfire.org Git - thirdparty/suricata.git/commit
flow: free spare pool more aggressively 6438/head
authorVictor Julien <victor@inliniac.net>
Mon, 4 Oct 2021 14:01:47 +0000 (16:01 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Oct 2021 07:48:58 +0000 (09:48 +0200)
commitfa72a5add8d9ebdcc4da5e05a8cd4259ede572d7
tree14f09f73ed7aa4867f9e84ba50cf6c0efa3dee63
parentff97d7c15da0a8a7b8ea1a0d461f4f56ca2052d6
flow: free spare pool more aggressively

The flows exceeding the spare pools config setting would be freed
per at max 100 flows a second. After a high speed test this would
lead to excessive memory use for a long time.

This patch updates the logic to free 10% of the excess flows per
run, freeing multiple blocks of flows as needed.

Bug: #4731.
src/flow-spare-pool.c