Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243234 > unrolled thread

pidns: Make pid accounting and pid_max per namespace

Started byZhang Haoyu <yuzhou@mogujie.com>
First post2015-10-09 12:40 +0200
Last post2015-10-10 07:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  pidns: Make pid accounting and pid_max per namespace Zhang Haoyu <yuzhou@mogujie.com> - 2015-10-09 12:40 +0200
    Re: pidns: Make pid accounting and pid_max per namespace Zefan Li <lizefan@huawei.com> - 2015-10-10 05:40 +0200
      Re: pidns: Make pid accounting and pid_max per namespace Zhang Haoyu <yuzhou@mogujie.com> - 2015-10-10 06:50 +0200
        Re: pidns: Make pid accounting and pid_max per namespace Zhang Haoyu <yuzhou@mogujie.com> - 2015-10-10 07:00 +0200

#1243234 — pidns: Make pid accounting and pid_max per namespace

FromZhang Haoyu <yuzhou@mogujie.com>
Date2015-10-09 12:40 +0200
Subjectpidns: Make pid accounting and pid_max per namespace
Message-ID<qhDfI-7Wk-7@gated-at.bofh.it>
I started multiple docker containers in centos6.6(linux-2.6.32-504.16.2),
and there's one bad program was running in one container.
This program produced many child threads continuously without free, so more and
more pid numbers were consumed by this program, until hitting the pix_max limit (32768
default in my system ).

What's worse is that containers and host share the pid numbers resource, so new program
cannot be produced any more in host and other containers.

And, I clone the upstream kernel source from
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
This problem is still there, I'm not sure.

IMO, we should isolate the pid accounting and pid_max between pid namespaces,
and make them per pidns.
Below post had request for making pid_max per pidns.
http://thread.gmane.org/gmane.linux.kernel/1108167/focus=1111210

Thanks,
Zhang Haoyu
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1243802

FromZefan Li <lizefan@huawei.com>
Date2015-10-10 05:40 +0200
Message-ID<qhTaN-5Bn-1@gated-at.bofh.it>
In reply to#1243234
On 2015/10/9 18:29, Zhang Haoyu wrote:
> I started multiple docker containers in centos6.6(linux-2.6.32-504.16.2),
> and there's one bad program was running in one container.
> This program produced many child threads continuously without free, so more and
> more pid numbers were consumed by this program, until hitting the pix_max limit (32768
> default in my system ).
>
> What's worse is that containers and host share the pid numbers resource, so new program
> cannot be produced any more in host and other containers.
>
> And, I clone the upstream kernel source from
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> This problem is still there, I'm not sure.
>
> IMO, we should isolate the pid accounting and pid_max between pid namespaces,
> and make them per pidns.
> Below post had request for making pid_max per pidns.
> http://thread.gmane.org/gmane.linux.kernel/1108167/focus=1111210
>

Mainline kernel already supports per-cgroup pid limit, which should solve
your problem.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1243818

FromZhang Haoyu <yuzhou@mogujie.com>
Date2015-10-10 06:50 +0200
Message-ID<qhUgx-7aq-1@gated-at.bofh.it>
In reply to#1243802
On 10/10/15 11:35, Zefan Li wrote:
> On 2015/10/9 18:29, Zhang Haoyu wrote:
>> I started multiple docker containers in centos6.6(linux-2.6.32-504.16.2),
>> and there's one bad program was running in one container.
>> This program produced many child threads continuously without free, so more and
>> more pid numbers were consumed by this program, until hitting the pix_max limit (32768
>> default in my system ).
>>
>> What's worse is that containers and host share the pid numbers resource, so new program
>> cannot be produced any more in host and other containers.
>>
>> And, I clone the upstream kernel source from
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> This problem is still there, I'm not sure.
>>
>> IMO, we should isolate the pid accounting and pid_max between pid namespaces,
>> and make them per pidns.
>> Below post had request for making pid_max per pidns.
>> http://thread.gmane.org/gmane.linux.kernel/1108167/focus=1111210
>>
>
> Mainline kernel already supports per-cgroup pid limit, which should solve
> your problem.
>
What about pid accounting?
If one pidns consume too many pids, dose it influence the other pid namespaces?

Thanks,
Zhang Haoyu

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1243820

FromZhang Haoyu <yuzhou@mogujie.com>
Date2015-10-10 07:00 +0200
Message-ID<qhUqd-7lP-3@gated-at.bofh.it>
In reply to#1243818
On 10/10/15 12:40, Zhang Haoyu wrote:
> On 10/10/15 11:35, Zefan Li wrote:
>> On 2015/10/9 18:29, Zhang Haoyu wrote:
>>> I started multiple docker containers in centos6.6(linux-2.6.32-504.16.2),
>>> and there's one bad program was running in one container.
>>> This program produced many child threads continuously without free, so more and
>>> more pid numbers were consumed by this program, until hitting the pix_max limit (32768
>>> default in my system ).
>>>
>>> What's worse is that containers and host share the pid numbers resource, so new program
>>> cannot be produced any more in host and other containers.
>>>
>>> And, I clone the upstream kernel source from
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> This problem is still there, I'm not sure.
>>>
>>> IMO, we should isolate the pid accounting and pid_max between pid namespaces,
>>> and make them per pidns.
>>> Below post had request for making pid_max per pidns.
>>> http://thread.gmane.org/gmane.linux.kernel/1108167/focus=1111210
>>>
>> Mainline kernel already supports per-cgroup pid limit, which should solve
>> your problem.
>>
> What about pid accounting?
> If one pidns consume too many pids, dose it influence the other pid namespaces?
I found it, thanks very much.
>
> Thanks,
> Zhang Haoyu


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web