[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230508190515.60f090c7@kernel.org>
Date: Mon, 8 May 2023 19:05:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Cathy Zhang <cathy.zhang@...el.com>
Cc: edumazet@...gle.com, davem@...emloft.net, pabeni@...hat.com,
jesse.brandeburg@...el.com, suresh.srinivas@...el.com,
tim.c.chen@...el.com, lizhen.you@...el.com, eric.dumazet@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: Add sysctl_reclaim_threshold
On Sun, 7 May 2023 19:08:01 -0700 Cathy Zhang wrote:
> Add a new ABI /proc/sys/net/core/reclaim_threshold which allows to
> change the size of reserved memory from reclaiming in sk_mem_uncharge.
> It allows to keep sk->sk_forward_alloc as small as possible when
> system is under memory pressure, it also allows to change it larger to
> avoid memcg charge overhead and improve performance when system is not
> under memory pressure. The original reclaim threshold for reserved
> memory per-socket is 2MB, it's selected as the max value, while the
> default value is 64KB which is closer to the maximum size of sk_buff.
>
> Issue the following command as root to change the default value:
>
> echo 16384 > /proc/sys/net/core/reclaim_threshold
While we wait for Eric to pass judgment - FWIW to me it seems a bit
overzealous to let users tune this. Does cgroup memory accounting
or any other socket memory accounting let users control the batching
parameters?
Powered by blists - more mailing lists