Re: 0% cpu usasge after fresh boot or net restart but 10% CPU if kernel flush route cache

cold cold
2010-01-29T07:38:34Z

On Thu, Jan 28, 2010 at 11:16 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 28 janvier 2010 à 20:49 +0200, cold cold a écrit :
>> what you mean drop packets ?
>>
>> i test 2 different things and shearing results with you
>> first test with high CPU is with garbage collection function
>> second results represent CPU usage with totally disabled  garbage collection
>
> ell, you didnt describe your benchmark method.
>
> 1) your results were on different rx/tx workload, and describing your
> workload is very important to be able to compare results. Then it should
> be exactly same workload.
>
> For example, when tx/tx load is high enough, less cpu overhead is spent
> on irq processing, since each IRQ delivers more packets per round.
>
> 2) you didnt sent "perf top" results for the second/last one.
>
>  But the first "perf top" results showed less than 1% of cpu time was
> used by cache cleanup. I guess you dont want to focus on this, since
> its already very good.
>
>
>
> Usually, when we want to bench a router, we study how it deals with DDOS
> workload. Feeding lot of packets to the device and study what percentage
> of them are actually transmitted. Goal being 100% of legit packets of
> course.
>
> Route cache settings matter in DDOS situations, and the flush operation
> can have a big impact on dropped frames because of cpu/ram congestion.
>
> Because of 600 seconds oscillations, its pretty hard to study exact cpu
> use of a router, unless taking samples on long periods.
>
>
>
>

I'm totally agree with you there must be some scheduler to release
route cache over the time.
So far i see garbage collector do this, but it cost a lot of CPU
probably its is a bug or design problem don't know
for this i make this 2 test to compare CPU usage with and without GC.

/ secret_interval 10 min, 1300000 route entries in cash ofter 10 min,
7k new route on empty cache 2k on 1300000 /
all route cache parameters default. I try also with gc_elasticity from
8 to 2 and gc_interval from 60 to 1 but don't have
too much difference.

What I'm trying to say is that flush cash is almost instant ( less
then second on 1 CPU) so releasing of cash is not so heavy job
( you are right can have a big impact on dropped frames because of
cpu/ram congestion ) but my point is why GC need 5-6min
10% no 4 CPU to do same job ?