Project

General

Profile

Actions

Bug #4829

closed

flow: flows not evicted & freed in time

Added by Victor Julien almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Flows have been shown to linger for a long time w/o giving up their
resources. This would lead to higher memory use and memcaps getting
reached.

Three main causes have been identified:

Slow passes hash passes. By default the flow manager will scan the
flow hash slowly. It is based on the flow timeout settings, and with
the default config it will take 4 minutes for a full scan to be
complete. This leaves a window for flows that are timed out to linger
for minutes longer than expected.

Flow Manager yields under pressure. The per row TryLock causes work
to be delayed more. The Flow manager will use trylock on a hash row
and will yield immediately if the row is busy. This means that it will
take a full pass before the row is revisited again. If the row holds
busy flows, this could happen many times in a row.

Flow Manager favors evicted flows over active flows. The Flow Manager
will only process the evicted flows if they are present. These flows
have been evicted by workers. The active flows on that hash row will
have to wait until the next hash pass. Of course by then there could
be more evicted flows.

Combined these factors could lead to flows not being considered for
freeing and logging for a very long time, potentially even
indefinitely.

The slow hash passes are tracked in #4808.


Related issues 1 (0 open1 closed)

Copied from Suricata - Bug #4828: flow: flows not evicted & freed in timeClosedVictor JulienActions
Actions #1

Updated by Victor Julien almost 3 years ago

  • Copied from Bug #4828: flow: flows not evicted & freed in time added
Actions #2

Updated by Victor Julien almost 3 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF