Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob

From: Cong Wang
Date: Sat Sep 09 2017 - 00:35:48 EST


On Fri, Sep 8, 2017 at 6:25 PM, äæå <yanhaishuang@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
>> On 2017å9æ9æ, at äå6:13, Cong Wang <xiyou.wangcong@xxxxxxxxx> wrote:
>>
>> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan
>> <yanhaishuang@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> Different namespace application might require different maximal number
>>> of TCP sockets independently of the host.
>>
>> So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans
>> in a whole system, right? This just makes OOM easier to trigger.
>>
>
> From my understanding, before the patch, we had N * net->ipv4.sysctl_tcp_max_orphans,
> and after the patch, we could have ns1.sysctl_tcp_max_orphans + ns2.sysctl_tcp_max_orphans
> + ns3.sysctl_tcp_max_orphans, is that right? Thanks for your reviewing.

Nope, by N I mean the number of containers. Before your patch, the limit
is global, after your patch it is per container.