Re: gc_thresh, maxsize (?)
Thu, 28 Jan 1999 19:27:37 +0300

In article <> you wrote:

: So, what is the gc_thresh for? I also noticed "gc_elasticity" and some
: others...I tried to look around for some documentation explaining them but
: I was not able to find any.

Garbage collector has bug, which effectively limits dst creation rate
with default parameter settings to very low value (sort of 50 per second).

max_size - hard limit on number of dst entries.
gc_thresh - after number of routes exceeds this number, gc starts.
gc_min_interval - gc is not invoked more frequently (in seconds).
BUG#1: interval is measured in seconds, so that
it cannot be made <1sec.
gc_elasticity - this number determines dynamic "equilibrium" point,
where dst cache size stops to grow further.
Ideally max_size should not be ever achieved.
The greater it is, the less agressive GC is.

Bug is that only limited number of routes (<256) can be freed during
one GC round. It means that now rate of flow creations is limited
by 256/gc_min_interval :-(

Please, try to leave gc_thresh and max_size at their default values,
but to decrease gc_min_interval to 1 and to decrease gc_elasticity to
2,3 etc. It should help a bit. As extremal measure you may set
gc_min_interval to 0 and/or to increase gc_thresh. It is better to leave
max_size intact.

Bug is supposed to be fixed in the patch
You need not the whole patch: only chunks patching
ipv4/route.c, function rt_garbage_collect()

Alexey Kuznetsov

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at