From: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Cc: Ivan Babrou <ivan-lDpJ742SOEtZroRs9YW3xA@public.gmane.org>,
Linux MM <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
Linux Kernel Network Developers
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Roman Gushchin
<roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>,
Muchun Song <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Eric Dumazet <edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Hideaki YOSHIFUJI
<yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.org>,
David Ahern <dsahern-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Jakub Kicinski <kuba-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Paolo Abeni <pabeni-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team <kernel-team-lDpJ742SOEtZroRs9YW3xA@public.gmane.org>
Subject: Re: Low TCP throughput due to vmpressure with swap enabled
Date: Mon, 5 Dec 2022 19:28:14 +0000 [thread overview]
Message-ID: <20221205192814.diiwtktsrgxzccw2@google.com> (raw)
In-Reply-To: <Y4T43Tc54vlKjTN0-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
On Mon, Nov 28, 2022 at 01:07:25PM -0500, Johannes Weiner wrote:
>
[...]
> > With the patch applied I'm capped at ~120MB/s, which is a symptom of a
> > clamped window.
> >
> > I can't find any sockets with memcg->socket_pressure = 1, but at the
> > same time I only see the following rcv_ssthresh assigned to sockets:
>
> Hm, I don't see how socket accounting would alter the network behavior
> other than through socket_pressure=1.
>
I think what is happening is that the tcp stack is calling
tcp_under_memory_pressure() and making decisions without going through
the memcg charge codepath which set or reset memcg->socket_pressure.
Most probably the socket is clamped due to memcg->socket_pressure and
then the kernel never tried to grow its buffers because
memcg->socket_pressure is still set and thus never tried the memcg
charge codepath which would have reset memcg->socket_pressure. (Maybe)
That is my guess but network experts CCed can correct me.
Anyways, I don't think the pressure mechanism which relies on successful
charging will work. I am brainstorming towards memory.high based network
throttling. Basically use penalty_jiffies (or something similar) to set
memcg->socket_pressure. However I want this to be opt-in as we do have
applications which prefer to be killed than be throttled. So, still
working on the fine details how this can be done without introducing a
rigid API.
next prev parent reply other threads:[~2022-12-05 19:28 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 0:53 Low TCP throughput due to vmpressure with swap enabled Ivan Babrou
2022-11-22 18:01 ` Eric Dumazet
[not found] ` <CANn89iLzARPp6jW1xS0rf+-wS_RnwK-Kfgs9uQFYan2AHPRQFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-22 18:11 ` Ivan Babrou
[not found] ` <CABWYdi2TWJej806yif9hi7cxD9P9-EpMB9EU_72wWw9fFqtt4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-22 18:23 ` Eric Dumazet
[not found] ` <CABWYdi0G7cyNFbndM-ELTDAR3x4Ngm0AehEp5aP0tfNkXUE+Uw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-22 18:59 ` Yu Zhao
[not found] ` <CAOUHufbQ_JjW=zXEi10+=LQOREOPHrK66Rqayr=sFUH_tQbW1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-22 19:05 ` Ivan Babrou
[not found] ` <CABWYdi3aOtJuMe4Z=FFzBb3iR6Cc9k8G2swSuZ_GDnaESuE_EQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-22 19:08 ` Yu Zhao
2022-11-22 19:46 ` Yu Zhao
2022-11-22 20:05 ` Yu Zhao
[not found] ` <CAOUHufYSeTeO5ZMpnCR781esHV4QV5Th+pd=52UaM9cXNNKF9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-23 0:44 ` Yu Zhao
2022-11-23 21:22 ` Johannes Weiner
[not found] ` <Y36PF972kOK3ADvx-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-11-24 1:18 ` Yu Zhao
2022-11-24 1:29 ` Yu Zhao
2022-11-22 20:05 ` Johannes Weiner
2022-11-22 22:11 ` Ivan Babrou
2022-11-23 1:28 ` Ivan Babrou
[not found] ` <CABWYdi0qhWs56WK=k+KoQBAMh+Tb6Rr0nY4kJN+E5YqfGhKTmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-28 18:07 ` Johannes Weiner
[not found] ` <Y4T43Tc54vlKjTN0-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-12-05 19:28 ` Shakeel Butt [this message]
2022-12-05 23:57 ` Ivan Babrou
[not found] ` <CABWYdi0z6-46PrNWumSXWki6Xf4G_EP1Nvc-2t00nEi0PiOU3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-12-06 0:50 ` Ivan Babrou
2022-12-06 19:00 ` Johannes Weiner
[not found] ` <Y4+RPry2tfbWFdSA-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-12-06 19:13 ` Eric Dumazet
[not found] ` <CANn89iJfx4QdVBqJ23oFJoz5DJKou=ZwVBNNXFNDJRNAqNvzwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-12-06 20:51 ` Johannes Weiner
[not found] ` <Y4+rNYF9WZyJyBQp-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-12-06 23:10 ` Shakeel Butt
2022-12-07 12:53 ` Johannes Weiner
2022-12-08 0:31 ` Shakeel Butt
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=20221205192814.diiwtktsrgxzccw2@google.com \
--to=shakeelb-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dsahern-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=ivan-lDpJ742SOEtZroRs9YW3xA@public.gmane.org \
--cc=kernel-team-lDpJ742SOEtZroRs9YW3xA@public.gmane.org \
--cc=kuba-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pabeni-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org \
--cc=songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
--cc=yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.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