Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1740154ybh; Mon, 20 Jul 2020 06:11:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNbnprQjRzPmK7vIqbLZeNI7Ct7iMzcMtvXaXxUeBEw1L8HaoCcFR6jK1nY5M1lfcwEGUV X-Received: by 2002:a05:6402:49:: with SMTP id f9mr14639094edu.112.1595250685730; Mon, 20 Jul 2020 06:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595250685; cv=none; d=google.com; s=arc-20160816; b=f5z46tf46CvRc/CBafCB+EFJ1l5L6aS9GR3V9zNad5lIfYmrHIxsieCo5REuqkj6Uv 3lOVzvnTocavPrwy34BAJuE5TzZa5Yl6Kvbn2p4CwBYVuFDjs+Q+m8wjf6oPScQ26TTU 9LPOWB5MAwKAU9JaPSnNW4V7U933l5epQ1zk+nxnk+3lzU6XVOAY/WX8ixZlAUmLYWmW AIu8wzM6epnXZyF1cs5UieRFiDNdwvnFQkoBxLZCpmupy/xfLJ1LaJwsz363ZtxSn/pU uvI4sirUqz+FigNpMC7v6ZdjVhKexG6veBQs0pQh7OpmKptS1v7Bx6f6a39IRBFKvUWf lOpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZnI6z9XD4HROXBuf4ZFEC55TsWlw3nYumyPptKBD5+U=; b=eKfzEy3IHldayJ4n2Ts5e5F0TN3fAv0m9e5LA4z3AyqNRBRMINLBugIhnEh6/3H0w9 lpSzWppLdEX/yGxnLC7ogl7IpZA3O7B0D3vGSdR0CBJbUOMq1/O1Dwdi5eEGhf0UT9+0 ap11mdmeIdwOcquOejOlg6dilEEyrJ0SB7kbbbyId1zlVrgwOMm0N5MU3FsXGS0pCdV5 EdlkPgzFxedZF5rll8fDRDJZ8jaygw5y0+YT0w1v3SuA7Qjefb9+bybHZ67msY611Sll XUJCvbwfcEyz/Slm9GYrfcMeh/OctJSNu1ShjOv+JP252RWvQ6zvj1DaqnyCYQjDkmd1 Ry9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a8eXAjIK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pj28si8837228ejb.330.2020.07.20.06.10.52; Mon, 20 Jul 2020 06:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a8eXAjIK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbgGTNIY (ORCPT + 99 others); Mon, 20 Jul 2020 09:08:24 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:41511 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726520AbgGTNIY (ORCPT ); Mon, 20 Jul 2020 09:08:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595250502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZnI6z9XD4HROXBuf4ZFEC55TsWlw3nYumyPptKBD5+U=; b=a8eXAjIK8yMU7NyqWyDSnIAQ5HJuxdho2XePJMWP0NYLhS2MMmSU0peWYUQtas99YlhRSn F6lL+h1dP68H57yKGKSULH19pwWBOQydWLTvR4tNBIGKcuLgPU5iNVJ/Rt0J16P2j9L9Ey pN1TSueWPWqT+dDzbJiLRltmsKK42U0= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-Q6-AbQBIN4q75xguUsZmyQ-1; Mon, 20 Jul 2020 09:08:20 -0400 X-MC-Unique: Q6-AbQBIN4q75xguUsZmyQ-1 Received: by mail-qk1-f198.google.com with SMTP id h4so11341301qkl.23 for ; Mon, 20 Jul 2020 06:08:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZnI6z9XD4HROXBuf4ZFEC55TsWlw3nYumyPptKBD5+U=; b=qztPP4h3FCcx1/q20PFBm/BrO33vAVjWB1hQOiFeqBoK8LXUqSh3eVVdt0j72R79G7 pded28OvAGomLGFq3MumqR45uNzEEnaWllWduymJ9dY1Swtko6/Lcko0Ft7fdQV5wYfA 6M17ehb9/vbt8ImLGTYwpd1VuuWoj63XrFbbdyp0HYcONJZqdmSC3I6su2GmWYOwxf0c YsaLC1Ldn3j0aOawc4ojUNwKqbLMhtQhWYh+CS0O8Lh9f5j5IKz2BIuCXF+d6EBDYE46 LQPLPZbMzuX4kOYIIBUS8vPBFjB0TJje0UR23YepvdF7teP21s6nzFRiktN564/ZYdYz o4sA== X-Gm-Message-State: AOAM530d1dGaVErJ0xCmn2dfpLM3Eoj4AA48HI81799acGG6RdgTbDjh 6yXZgtGgl29j+UEbmpH+/IjsorJNBRgMUmD0wtBhAeDH+AWWz0yoe7HqKpvQ5BckcwuXaGudmoa LKFYn3CW2qZG9fmW5b2RHKon41kaj/3RylAonn1Cj X-Received: by 2002:a37:8305:: with SMTP id f5mr9965764qkd.497.1595250500206; Mon, 20 Jul 2020 06:08:20 -0700 (PDT) X-Received: by 2002:a37:8305:: with SMTP id f5mr9965728qkd.497.1595250499886; Mon, 20 Jul 2020 06:08:19 -0700 (PDT) MIME-Version: 1.0 References: <20200622122546-mutt-send-email-mst@kernel.org> <419cc689-adae-7ba4-fe22-577b3986688c@redhat.com> <0a83aa03-8e3c-1271-82f5-4c07931edea3@redhat.com> <20200709133438-mutt-send-email-mst@kernel.org> <7dec8cc2-152c-83f4-aa45-8ef9c6aca56d@redhat.com> <20200710015615-mutt-send-email-mst@kernel.org> <595d4cf3-2b15-8900-e714-f3ebd8d8ca2e@redhat.com> In-Reply-To: <595d4cf3-2b15-8900-e714-f3ebd8d8ca2e@redhat.com> From: Eugenio Perez Martin Date: Mon, 20 Jul 2020 15:07:43 +0200 Message-ID: Subject: Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version To: Jason Wang Cc: "Michael S. Tsirkin" , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, kvm list , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 10:55 AM Jason Wang wrote: > > > On 2020/7/17 =E4=B8=8A=E5=8D=881:16, Eugenio Perez Martin wrote: > > On Fri, Jul 10, 2020 at 7:58 AM Michael S. Tsirkin wro= te: > >> On Fri, Jul 10, 2020 at 07:39:26AM +0200, Eugenio Perez Martin wrote: > >>>>> How about playing with the batch size? Make it a mod parameter inst= ead > >>>>> of the hard coded 64, and measure for all values 1 to 64 ... > >>>> > >>>> Right, according to the test result, 64 seems to be too aggressive i= n > >>>> the case of TX. > >>>> > >>> Got it, thanks both! > >> In particular I wonder whether with batch size 1 > >> we get same performance as without batching > >> (would indicate 64 is too aggressive) > >> or not (would indicate one of the code changes > >> affects performance in an unexpected way). > >> > >> -- > >> MST > >> > > Hi! > > > > Varying batch_size as drivers/vhost/net.c:VHOST_NET_BATCH, > > > Did you mean varying the value of VHOST_NET_BATCH itself or the number > of batched descriptors? > > > > and testing > > the pps as previous mail says. This means that we have either only > > vhost_net batching (in base testing, like previously to apply this > > patch) or both batching sizes the same. > > > > I've checked that vhost process (and pktgen) goes 100% cpu also. > > > > For tx: Batching decrements always the performance, in all cases. Not > > sure why bufapi made things better the last time. > > > > Batching makes improvements until 64 bufs, I see increments of pps but = like 1%. > > > > For rx: Batching always improves performance. It seems that if we > > batch little, bufapi decreases performance, but beyond 64, bufapi is > > much better. The bufapi version keeps improving until I set a batching > > of 1024. So I guess it is super good to have a bunch of buffers to > > receive. > > > > Since with this test I cannot disable event_idx or things like that, > > what would be the next step for testing? > > > > Thanks! > > > > -- > > Results: > > # Buf size: 1,16,32,64,128,256,512 > > > > # Tx > > # =3D=3D=3D > > # Base > > 2293304.308,3396057.769,3540860.615,3636056.077,3332950.846,3694276.154= ,3689820 > > > What's the meaning of buf size in the context of "base"? > Hi Jason. I think that all the previous questions have been answered in the response to MST, please let me know if I missed something. > And I wonder maybe perf diff can help. Great, I will run it too. Thanks! > > Thanks > > > > # Batch > > 2286723.857,3307191.643,3400346.571,3452527.786,3460766.857,3431042.5,3= 440722.286 > > # Batch + Bufapi > > 2257970.769,3151268.385,3260150.538,3379383.846,3424028.846,3433384.308= ,3385635.231,3406554.538 > > > > # Rx > > # =3D=3D > > # pktgen results (pps) > > 1223275,1668868,1728794,1769261,1808574,1837252,1846436 > > 1456924,1797901,1831234,1868746,1877508,1931598,1936402 > > 1368923,1719716,1794373,1865170,1884803,1916021,1975160 > > > > # Testpmd pps results > > 1222698.143,1670604,1731040.6,1769218,1811206,1839308.75,1848478.75 > > 1450140.5,1799985.75,1834089.75,1871290,1880005.5,1934147.25,1939034 > > 1370621,1721858,1796287.75,1866618.5,1885466.5,1918670.75,1976173.5,198= 8760.75,1978316 > > > > pktgen was run again for rx with 1024 and 2048 buf size, giving > > 1988760.75 and 1978316 pps. Testpmd goes the same way. > > >