> -----Original Message-----
> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, December 20, 2017 11:18 PM
> To: Chris Mi <chr...@mellanox.com>
> Cc: netdev@vger.kernel.org; gerlitz...@gmail.com
> Subject: Re: [patch iproute2] tc: add -bs option for batch mode
> 
> On Wed, 20 Dec 2017 09:23:34 +0000
> Chris Mi <chr...@mellanox.com> wrote:
> 
> > > Your real performance win is just not asking for ACK for every rule.
> > No. Even if batch_size > 1, we ack every rule. The real performance
> > win is to send multiple rules in one system call. If we are not asking
> > for ACK for every rule, the performance will be improved further.
> 
> Try the no ACK method.
> 
> When we were optimizing routing daemons like Quagga, it was discovered
> that an ACK for every route insert was the main bottleneck. Doing
> asynchronous error handling got a bigger win than your batching.
> 
> Please try that, doing multiple messages using iov is not necessary.

This is my testing result to insert 1,000,000 rules:

1. batch_size = 1, acking

real    0m15.125s
user    0m6.982s
sys     0m8.080s

2. batch_size = 10, acking

real    0m12.772s
user    0m5.984s
sys     0m6.723s

3. batch_size = 1, no acking

real    0m14.484s
user    0m6.919s
sys     0m7.498s

4. batch_size = 10, no acking

real    0m11.664s
user    0m6.017s
sys     0m5.578s

As we can see from above test result, the bottleneck is not in acking.
Without acking or with asynchronous error handling, we can improve the 
performance further.
It is worth to do that. But I think that should be in another patch. This patch 
only adds
the -bs option.

Reply via email to