From: Roman Gushchin <roman.gushchin@linux.dev>
To: Daniel Sedlak <daniel.sedlak@cdn77.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Neal Cardwell" <ncardwell@google.com>,
"Kuniyuki Iwashima" <kuniyu@google.com>,
"David Ahern" <dsahern@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Shakeel Butt" <shakeel.butt@linux.dev>,
"Yosry Ahmed" <yosry.ahmed@linux.dev>,
linux-mm@kvack.org, netdev@vger.kernel.org,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Hocko" <mhocko@kernel.org>,
"Muchun Song" <muchun.song@linux.dev>,
cgroups@vger.kernel.org, "Tejun Heo" <tj@kernel.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Matyas Hurtik" <matyas.hurtik@cdn77.com>
Subject: Re: [PATCH v5] memcg: expose socket memory pressure in a cgroup
Date: Wed, 08 Oct 2025 11:58:46 -0700 [thread overview]
Message-ID: <87qzvdqkyh.fsf@linux.dev> (raw)
In-Reply-To: <20251007125056.115379-1-daniel.sedlak@cdn77.com> (Daniel Sedlak's message of "Tue, 7 Oct 2025 14:50:56 +0200")
Daniel Sedlak <daniel.sedlak@cdn77.com> writes:
> This patch is a result of our long-standing debug sessions, where it all
> started as "networking is slow", and TCP network throughput suddenly
> dropped from tens of Gbps to few Mbps, and we could not see anything in
> the kernel log or netstat counters.
>
> Currently, we have two memory pressure counters for TCP sockets [1],
> which we manipulate only when the memory pressure is signalled through
> the proto struct [2]. However, the memory pressure can also be signaled
> through the cgroup memory subsystem, which we do not reflect in the
> netstat counters. In the end, when the cgroup memory subsystem signals
> that it is under pressure, we silently reduce the advertised TCP window
> with tcp_adjust_rcv_ssthresh() to 4*advmss, which causes a significant
> throughput reduction.
>
> Keep in mind that when the cgroup memory subsystem signals the socket
> memory pressure for a given cgroup, it affects all sockets used in that
> cgroup, including children cgroups.
>
> This patch exposes a new file for each cgroup in sysfs which is a
> read-only single value file showing how many microseconds this cgroup
> contributed to throttling the throughput of network sockets. The file is
> accessible in the following path.
>
> /sys/fs/cgroup/**/<cgroup name>/memory.net.throttled_usec
Hi Daniel!
How this value is going to be used? In other words, do you need an
exact number or something like memory.events::net_throttled would be
enough for your case?
Thanks!
next prev parent reply other threads:[~2025-10-08 18:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 12:50 [PATCH v5] memcg: expose socket memory pressure in a cgroup Daniel Sedlak
2025-10-07 20:01 ` Tejun Heo
2025-10-08 12:46 ` Matyas Hurtik
2025-10-08 18:17 ` Tejun Heo
2025-10-08 18:58 ` Roman Gushchin [this message]
2025-10-09 14:44 ` Daniel Sedlak
2025-10-09 15:32 ` Roman Gushchin
2025-10-09 16:06 ` Shakeel Butt
2025-10-09 17:58 ` Roman Gushchin
2025-10-09 18:32 ` Shakeel Butt
2025-10-09 19:02 ` Roman Gushchin
2025-10-13 14:30 ` Daniel Sedlak
2025-10-14 1:43 ` Roman Gushchin
2025-10-14 13:58 ` Daniel Sedlak
2025-10-14 20:32 ` Shakeel Butt
2025-10-15 13:57 ` Daniel Sedlak
2025-10-15 18:36 ` Shakeel Butt
2025-10-15 18:21 ` Kuniyuki Iwashima
2025-10-15 18:39 ` Shakeel Butt
2025-10-15 18:58 ` Kuniyuki Iwashima
2025-10-15 20:17 ` Roman Gushchin
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=87qzvdqkyh.fsf@linux.dev \
--to=roman.gushchin@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel.sedlak@cdn77.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=hannes@cmpxchg.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-mm@kvack.org \
--cc=matyas.hurtik@cdn77.com \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
--cc=yosry.ahmed@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.