From: Leone Fernando <leone4fernando@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
dsahern@kernel.org, willemb@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/4] net: dst_cache: add input_dst_cache API
Date: Mon, 8 Jul 2024 10:45:46 +0200 [thread overview]
Message-ID: <b6fcb866-f24e-4508-97f5-eb2b63f6eec7@gmail.com> (raw)
In-Reply-To: <CANn89iKLWtyVP9-YU4a8cnE4Mj0zMNtzQkzkHgM0uqdQV-mcPQ@mail.gmail.com>
Hi Eric
> It targets IPv4 only, which some of us no longer use.
The same optimization can be implemented and applied to IPv6 as well and
I'm planning to do so.
> Also, what is the behavior (loss of performance) of this cache under
> flood, when 16 slots need to be looked up for each packet ?
I did some more measurements under flood as you asked, those are the results:
Total PPS:
number of IPs(x# cache size) mainline patched delta
Kpps Kpps %
20000(x40) 6498 6123 -5.7
35000(x70) 6502 5261 -19
50000(x100) 6503 4986 -23.3
I found out that most of the negative effect under extreme flood is
as a result of the atomic operations.
I have some ideas on how to solve this problem. it will demand a bit more memory
percpu, if that's reasonable I can do V3.
IMO the boost in the average case is worth the flood case penalty.
> This patch adds 10MB of memory per netns on host with 512 cpus,
> and adds netns creation and dismantle costs (45% on a host with 256 cpus)
Is such a memory penalty a deal breaker considering the performance gain?
Also I think adding a sysctl to control the size of the cache might be a good
solution for those who want to keep their memory usage lower. what do you think?
Thanks,
Leone
next prev parent reply other threads:[~2024-07-08 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:24 [RESEND PATCH net-next v2 0/4] net: route: improve route hinting Leone Fernando
2024-07-02 14:24 ` [PATCH net-next v2 1/4] net: route: expire rt if the dst it holds is expired Leone Fernando
2024-07-02 14:24 ` [PATCH net-next v2 2/4] net: dst_cache: add input_dst_cache API Leone Fernando
2024-07-02 15:15 ` Eric Dumazet
2024-07-08 8:45 ` Leone Fernando [this message]
2024-07-02 14:24 ` [PATCH net-next v2 3/4] net: route: always compile dst_cache Leone Fernando
2024-07-02 14:24 ` [PATCH net-next v2 4/4] net: route: replace route hints with input_dst_cache Leone Fernando
-- strict thread matches above, loose matches on Subject: below --
2024-05-07 12:42 [PATCH net-next v2 0/4] net: route: improve route hinting Leone Fernando
2024-05-07 12:42 ` [PATCH net-next v2 2/4] net: dst_cache: add input_dst_cache API Leone Fernando
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=b6fcb866-f24e-4508-97f5-eb2b63f6eec7@gmail.com \
--to=leone4fernando@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®