From: Ronen Hod <rhod@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Michael Dalton <mwdalton@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org, Daniel Borkmann <dborkman@redhat.com>,
virtualization@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
Date: Wed, 13 Nov 2013 18:43:01 +0200 [thread overview]
Message-ID: <5283AC15.8090706@redhat.com> (raw)
In-Reply-To: <1384352348.28458.102.camel@edumazet-glaptop2.roam.corp.google.com>
On 11/13/2013 04:19 PM, Eric Dumazet wrote:
> On Wed, 2013-11-13 at 10:47 +0200, Ronen Hod wrote:
>
>> I looked at how ewma works, and although it is computationally efficient,
>> and it does what it is supposed to do, initially (at the first samples) it is strongly
>> biased towards the value that was added at the first ewma_add.
>> I suggest that you print the values of ewma_add() and ewma_read(). If you are
>> happy with the results, then ignore my comments. If you are not, then I can
>> provide a version that does better for the first samples.
>> Unfortunately, it will be slightly less efficient.
> Value is clamped by (GOOD_PACKET_LEN, PAGE_SIZE - hdr_len)
>
> So initial value is conservative and not really used.
Hi Eric,
This initial value, that you do not really want to use, will slowly fade, but it
will still pretty much dominate the returned value for the first RECEIVE_AVG_WEIGHT(==64)
samples or so (most ewma implementations suffer from this bug).
Naturally, it doesn't matter much if you just keep it running forever.
However, if you will want to restart the learning process more often, which might make
sense upon changes, then the auto-tuning will be very sub-optimal.
Ronen.
> Thanks
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-11-13 16:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 22:21 [PATCH net-next 1/4] virtio-net: mergeable buffer size should include virtio-net header Michael Dalton
2013-11-12 22:21 ` [PATCH net-next 2/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill Michael Dalton
2013-11-12 22:42 ` Eric Dumazet
2013-11-12 22:21 ` [PATCH net-next 3/4] virtio-net: use per-receive queue page frag alloc for mergeable bufs Michael Dalton
2013-11-12 22:43 ` Eric Dumazet
2013-11-12 22:21 ` [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance Michael Dalton
2013-11-12 22:41 ` [PATCH net-next 1/4] virtio-net: mergeable buffer size should include virtio-net header Eric Dumazet
2013-11-13 6:53 ` Jason Wang
[not found] ` <1384294885-6444-4-git-send-email-mwdalton@google.com>
2013-11-13 7:10 ` [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance Jason Wang
2013-11-13 7:40 ` Eric Dumazet
2013-11-20 2:06 ` Rusty Russell
2013-11-13 17:42 ` Michael S. Tsirkin
2013-11-16 9:06 ` Michael Dalton
2013-11-13 8:47 ` Ronen Hod
2013-11-13 14:19 ` Eric Dumazet
2013-11-13 16:43 ` Ronen Hod [this message]
2013-11-13 17:18 ` Eric Dumazet
2013-11-13 17:39 ` [PATCH net-next 1/4] virtio-net: mergeable buffer size should include virtio-net header Michael S. Tsirkin
2013-11-13 17:43 ` Michael S. Tsirkin
2013-11-14 7:38 ` David Miller
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=5283AC15.8090706@redhat.com \
--to=rhod@redhat.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=mst@redhat.com \
--cc=mwdalton@google.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).