netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Eugenio Perez Martin <eperezma@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org, kvm list <kvm@vger.kernel.org>,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
Date: Mon, 20 Jul 2020 16:55:20 +0800	[thread overview]
Message-ID: <595d4cf3-2b15-8900-e714-f3ebd8d8ca2e@redhat.com> (raw)
In-Reply-To: <CAJaqyWf1skGxrjuT9GLr6dtgd-433y-rCkbtStLHaAs2W2jYXA@mail.gmail.com>


On 2020/7/17 上午1:16, Eugenio Perez Martin wrote:
> On Fri, Jul 10, 2020 at 7:58 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>> 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 instead
>>>>> 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 in
>>>> 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
> # ===
> # 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"?

And I wonder maybe perf diff can help.

Thanks


> # Batch
> 2286723.857,3307191.643,3400346.571,3452527.786,3460766.857,3431042.5,3440722.286
> # Batch + Bufapi
> 2257970.769,3151268.385,3260150.538,3379383.846,3424028.846,3433384.308,3385635.231,3406554.538
>
> # Rx
> # ==
> # 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,1988760.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.
>


  reply	other threads:[~2020-07-20  8:55 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 11:34 [PATCH RFC v8 00/11] vhost: ring format independence Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 01/11] vhost: option to fetch descriptors through an independent struct Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version Michael S. Tsirkin
2020-06-11 15:22   ` Konrad Rzeszutek Wilk
2020-06-15 12:28     ` Eugenio Perez Martin
2020-06-19 18:07       ` Eugenio Perez Martin
2020-06-19 18:25         ` Eugenio Perez Martin
2020-06-22  9:07         ` Jason Wang
2020-06-22 10:44           ` Eugenio Perez Martin
2020-06-22 15:55         ` Michael S. Tsirkin
2020-06-22 16:11           ` Eugenio Perez Martin
2020-06-22 16:29             ` Michael S. Tsirkin
2020-06-23 16:15               ` Eugenio Perez Martin
2020-07-01 10:43                 ` Eugenio Perez Martin
2020-07-01 11:11                   ` Michael S. Tsirkin
2020-07-01 12:56                     ` Eugenio Perez Martin
2020-07-01 12:39                   ` Jason Wang
2020-07-01 13:04                     ` Eugenio Perez Martin
2020-07-01 14:09                       ` Jason Wang
2020-07-09 16:46                         ` Eugenio Perez Martin
2020-07-09 17:37                           ` Michael S. Tsirkin
2020-07-10  3:56                             ` Jason Wang
2020-07-10  5:39                               ` Eugenio Perez Martin
2020-07-10  5:58                                 ` Michael S. Tsirkin
2020-07-16 17:16                                   ` Eugenio Perez Martin
2020-07-20  8:55                                     ` Jason Wang [this message]
2020-07-20 13:07                                       ` Eugenio Perez Martin
2020-07-20  9:27                                     ` Michael S. Tsirkin
2020-07-20 11:16                                       ` Eugenio Pérez
2020-07-20 11:45                                         ` Michael S. Tsirkin
2020-07-21  2:55                                         ` Jason Wang
2020-07-29 18:37                                           ` Eugenio Perez Martin
2020-07-10  6:44                                 ` Jason Wang
2020-06-17  3:19   ` Jason Wang
2020-06-19 17:56     ` Eugenio Perez Martin
2020-06-22 16:00     ` Michael S. Tsirkin
2020-06-23  2:51       ` Jason Wang
2020-06-23  7:00         ` Eugenio Perez Martin
2020-06-23  7:15           ` Jason Wang
2020-06-23  8:25           ` Michael S. Tsirkin
2020-06-23 15:54             ` Eugenio Perez Martin
2020-06-11 11:34 ` [PATCH RFC v8 03/11] vhost/net: pass net specific struct pointer Michael S. Tsirkin
2020-06-15 16:08   ` Eugenio Perez Martin
2020-06-11 11:34 ` [PATCH RFC v8 04/11] vhost: reorder functions Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 05/11] vhost: format-independent API for used buffers Michael S. Tsirkin
2020-06-15 16:11   ` Eugenio Perez Martin
2020-06-11 11:34 ` [PATCH RFC v8 06/11] vhost/net: convert to new API: heads->bufs Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 07/11] vhost/net: avoid iov length math Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 08/11] vhost/test: convert to the buf API Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 09/11] vhost/scsi: switch to buf APIs Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 10/11] vhost/vsock: switch to the buf API Michael S. Tsirkin
2020-06-11 11:34 ` [PATCH RFC v8 11/11] vhost: drop head based APIs Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=595d4cf3-2b15-8900-e714-f3ebd8d8ca2e@redhat.com \
    --to=jasowang@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).