From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: Re: [patch iproute2 v6 0/3] tc: Add -bs option to batch mode Date: Mon, 8 Jan 2018 14:31:50 +0100 Message-ID: <20180108133150.GE14358@orbyte.nwl.cc> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dsahern@gmail.com" , "marcelo.leitner@gmail.com" , "netdev@vger.kernel.org" , "gerlitz.or@gmail.com" , "stephen@networkplumber.org" To: Chris Mi Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:52674 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932660AbeAHNbw (ORCPT ); Mon, 8 Jan 2018 08:31:52 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Hi Chris, On Mon, Jan 08, 2018 at 02:03:53AM +0000, Chris Mi wrote: > > On Thu, Jan 04, 2018 at 04:34:51PM +0900, Chris Mi wrote: > > > The insertion rate is improved more than 10%. > > > > Did you measure the effect of increasing batch sizes? > Yes. Even if we enlarge the batch size bigger than 10, there is no big improvement. > I think that's because current kernel doesn't process the requests in parallel. > If kernel processes the requests in parallel, I believe specifying a bigger batch size > will get a better result. But throughput doesn't regress at some point, right? I think that's the critical aspect when considering an "unlimited" batch size. On Mon, Jan 08, 2018 at 08:00:00AM +0000, Chris Mi wrote: > After testing, I find that the message passed to kernel should not be too big. > If it is bigger than about 64K, sendmsg returns -1, errno is 90 (EMSGSIZE). > That is about 400 commands. So how about set batch size to 128 which is big enough? If that's the easiest way, why not. At first, I thought one could maybe send the collected messages in chunks of suitable size, but that's probably not worth the effort. Cheers, Phil