Project

General

Profile

Actions

Bug #4828

closed

flow: flows not evicted & freed in time

Added by Victor Julien 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:
Needs backport to 6.0

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 3 (0 open3 closed)

Related to Bug #4650: Stream TCP raw reassembly is leakingClosedVictor JulienActions
Related to Bug #4808: flow: worker-evicted flows need to be processed quickerClosedVictor JulienActions
Copied to Bug #4829: flow: flows not evicted & freed in timeClosedVictor JulienActions
Actions #2

Updated by Victor Julien 11 months ago

  • Related to Bug #4650: Stream TCP raw reassembly is leaking added
Actions #3

Updated by Victor Julien 11 months ago

  • Related to Bug #4808: flow: worker-evicted flows need to be processed quicker added
Actions #4

Updated by Victor Julien 11 months ago

  • Copied to Bug #4829: flow: flows not evicted & freed in time added
Actions

Also available in: Atom PDF