netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Tariq Toukan <tariqt@mellanox.com>,
	Martin KaFai Lau <kafai@fb.com>,
	Willem de Bruijn <willemb@google.com>,
	Brenden Blanco <bblanco@plumgrid.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH v2 net-next 00/14] mlx4: order-0 allocations and page recycling
Date: Sun, 12 Feb 2017 19:24:10 +0200	[thread overview]
Message-ID: <f21e77a6-86e4-a317-38a5-5822ffb1916c@gmail.com> (raw)
In-Reply-To: <CANn89iJxk=7qqGyVMwo8p5vFtPLK49JY1eHMwwakOdCE+vnxXA@mail.gmail.com>



On 12/02/2017 5:32 PM, Eric Dumazet wrote:
> On Sun, Feb 12, 2017 at 7:04 AM, Tariq Toukan <ttoukan.linux@gmail.com> wrote:
>
>> We consistently see this behavior: the higher the BW, the sharper the
>> degradation.
>>
>> This is because the page-cache is of a fixed-size. Any fixed-size page-cache
>> will always meet one of the following:
>> 1) Too small to keep the pace when load is high.
>> 2) Too big (in terms of memory footprint) when load is low.
>>
> So, we had the order-0 allocations for years at Google, then made the
> horrible mistake to rebase mlx4 driver from the upstream one,
> and we had all these issues under load.
>
> I decided to redo the work I did years ago and upstream it.
Thanks for that. I really appreciate and like your re-factorization.
>
> I have warned Mellanox in the past (for cx-5 driver) that _any_ high
> order allocation strategy was nice in benchmarks, but terrible in face
> of real server workloads.
> ( And I am not even referring to malicious attacks )
In mlx5, we fully completed the transition to order-0 allocations in 
Striding RQ.
> Think about what happens on real servers : In the order of 100,000 TCP
> sockets opened.
>
> Then some incast or outcast problem (Mapreduce jobs are fond of this)
> make thousands of TCP socket accumulate _millions_ of TCP messages in
> their out of order queue per second.
>
> There is no way you can hold millions of pages in mlx4 driver.
> A "dynamic" page pool is going to fail very badly.
I understand your point. Today I am totally aware of the advantages in 
using order-0 pages, I am just trying
to have the bread buttered on both sides, by reducing the allocation 
overhead.
Even though the iperf benchmarks are less realistic than the ones you 
described, I think it is still nice
if we could find solutions for the page allocator in order to keep the 
high rates we had before.
As a common bottleneck, we will always gain by improving the page 
allocator, no matter what is the pages order.

Just two points regarding the dynamic page-cache I implemented:
1) We define an upper limit for the size of the dynamic page-cache, so 
the mata-data do not grow too much.
2) When load is high, our dynamic page-cache _does not exclusively hold 
too many pages_, it just keeps track
     of pages that are being anyway processed in stack. In memory 
footprints accounting, I would not account
     such page into the "driver's footprint", as it is being used by the 
stack.


>
> Sure, your iperf bench will look great. But who cares ? Doyou really
> have customers dedicating hosts to run 1 iperf full time ?
>
> Make sure you run tests with 100,000 TCP sockets, and add networking
> small flaps, with 5% packet losses.
> This is what we really care here.
I definitely agree that benchmarks should improve to reflect more 
realistic use cases.
>
> I will send the v3 of the patch series, I really hope that it will go
> in, because we at Google very much need it ASAP, and I would rather
> not have to keep it private in our tree.
>
> Do not focus on your benchmarks, that is marketing only
> Focus on ability of the servers to _survive_ and continue their work.
>
> You did not answer to my questions by the way.
>
> ethtool -g eth0
> ethtool -l eth0
Yes, sorry the delayed reply, it was sent separately.
>
> Thanks.

  reply	other threads:[~2017-02-12 17:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 13:58 [PATCH v2 net-next 00/14] mlx4: order-0 allocations and page recycling Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 01/14] mlx4: use __skb_fill_page_desc() Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 02/14] mlx4: dma_dir is a mlx4_en_priv attribute Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 03/14] mlx4: remove order field from mlx4_en_frag_info Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 04/14] mlx4: get rid of frag_prefix_size Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 05/14] mlx4: rx_headroom is a per port attribute Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 06/14] mlx4: reduce rx ring page_cache size Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 07/14] mlx4: removal of frag_sizes[] Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 08/14] mlx4: use order-0 pages for RX Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 09/14] mlx4: add page recycling in receive path Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 10/14] mlx4: add rx_alloc_pages counter in ethtool -S Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 11/14] mlx4: do not access rx_desc from mlx4_en_process_rx_cq() Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 12/14] mlx4: factorize page_address() calls Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 13/14] mlx4: make validate_loopback() more generic Eric Dumazet
2017-02-09 13:58 ` [PATCH v2 net-next 14/14] mlx4: remove duplicate code in mlx4_en_process_rx_cq() Eric Dumazet
2017-02-09 17:15   ` Saeed Mahameed
2017-02-09 17:26     ` Eric Dumazet
     [not found] ` <3c48eac5-0c4f-f43a-1d76-75399e5fc1b8@gmail.com>
2017-02-09 16:44   ` [PATCH v2 net-next 00/14] mlx4: order-0 allocations and page recycling Eric Dumazet
2017-02-09 16:49     ` Tariq Toukan
2017-02-09 16:56       ` Eric Dumazet
     [not found]         ` <8ffca63d-62f4-9d6b-fe06-20a0e28dc44d@gmail.com>
2017-02-12 15:32           ` Eric Dumazet
2017-02-12 17:24             ` Tariq Toukan [this message]
2017-02-12 16:31         ` Tariq Toukan
2017-02-12 20:57           ` Eric Dumazet
2017-02-12 22:38             ` Jesper Dangaard Brouer
2017-02-13  0:33               ` Eric Dumazet
     [not found] ` <9b098a3d-aec0-4085-2cd5-ea3819927071@mellanox.com>
     [not found]   ` <b7f2d119-3c84-b911-eeb4-880427299213@mellanox.com>
2017-02-12 16:48     ` Eric Dumazet
2017-02-13  8:50       ` Tariq Toukan
2017-02-13 19:33         ` Eric Dumazet

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=f21e77a6-86e4-a317-38a5-5822ffb1916c@gmail.com \
    --to=ttoukan.linux@gmail.com \
    --cc=ast@kernel.org \
    --cc=bblanco@plumgrid.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@mellanox.com \
    --cc=willemb@google.com \
    /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).