Re: counting file descriptors with a cgroup controller

2017-03-08 Thread Tejun Heo
On Wed, Mar 08, 2017 at 10:52:18AM +0100, Krzysztof Opasiak wrote: > Well detecting failures of open is not enough and it has couple of problems: > > 1) open(2) is not the only syscall which creates fd. In addition to other > syscalls like socket(2), dup(2), some ioctl() on drivers (for example vi

Re: counting file descriptors with a cgroup controller

2017-03-08 Thread Tejun Heo
Hello, On Tue, Mar 07, 2017 at 09:06:49PM +0100, Krzysztof Opasiak wrote: > Personally, I don't want to use rlimit for this as it ends up returning > error code from for example open() when we hit the limit. This may lead to > some unpredictable crashes in services (esp. those poor proprietary bi

Re: counting file descriptors with a cgroup controller

2017-03-08 Thread Krzysztof Opasiak
On 03/07/2017 09:48 PM, Tejun Heo wrote: Hello, On Tue, Mar 07, 2017 at 09:06:49PM +0100, Krzysztof Opasiak wrote: Personally, I don't want to use rlimit for this as it ends up returning error code from for example open() when we hit the limit. This may lead to some unpredictable crashes in

Re: counting file descriptors with a cgroup controller

2017-03-08 Thread Krzysztof Opasiak
On 03/08/2017 03:59 AM, Parav Pandit wrote: Hi, On Tue, Mar 7, 2017 at 2:48 PM, Tejun Heo wrote: Hello, On Tue, Mar 07, 2017 at 09:06:49PM +0100, Krzysztof Opasiak wrote: Personally, I don't want to use rlimit for this as it ends up returning error code from for example open() when we hit

Re: counting file descriptors with a cgroup controller

2017-03-07 Thread Parav Pandit
Hi, On Tue, Mar 7, 2017 at 2:48 PM, Tejun Heo wrote: > > Hello, > > On Tue, Mar 07, 2017 at 09:06:49PM +0100, Krzysztof Opasiak wrote: > > Personally, I don't want to use rlimit for this as it ends up returning > > error code from for example open() when we hit the limit. This may lead to > > som

Re: counting file descriptors with a cgroup controller

2017-03-07 Thread Krzysztof Opasiak
On 03/07/2017 08:41 PM, Tejun Heo wrote: Hello, Krzysztof. On Tue, Mar 07, 2017 at 12:19:52PM +0100, Krzysztof Opasiak wrote: So maybe let me clarify our use case so we can have some more discussion about this. We are dealing with task of monitoring system services on an IoT system. So this s

Re: counting file descriptors with a cgroup controller

2017-03-07 Thread Tejun Heo
Hello, Krzysztof. On Tue, Mar 07, 2017 at 12:19:52PM +0100, Krzysztof Opasiak wrote: > So maybe let me clarify our use case so we can have some more discussion > about this. We are dealing with task of monitoring system services on an IoT > system. So this system needs to run as long as possible w

Re: counting file descriptors with a cgroup controller

2017-03-07 Thread Krzysztof Opasiak
Hi On 03/06/2017 07:58 PM, Tejun Heo wrote: Hello, On Fri, Feb 17, 2017 at 12:37:11PM +0100, Krzysztof Opasiak wrote: We need to limit and monitor the number of file descriptors processes keep open. If a process exceeds certain limit we'd like to terminate it and restart it or reboot the whole

Re: counting file descriptors with a cgroup controller

2017-03-06 Thread Tejun Heo
Hello, On Fri, Feb 17, 2017 at 12:37:11PM +0100, Krzysztof Opasiak wrote: > > We need to limit and monitor the number of file descriptors processes > > keep open. If a process exceeds certain limit we'd like to terminate it > > and restart it or reboot the whole system. Currently the RLIMIT API >

Re: counting file descriptors with a cgroup controller

2017-02-17 Thread Krzysztof Opasiak
+ cgroups mailing list + cgroup maintainers On 02/17/2017 10:37 AM, Ɓukasz Stelmach wrote: > Hi, > > We need to limit and monitor the number of file descriptors processes > keep open. If a process exceeds certain limit we'd like to terminate it > and restart it or reboot the whole system. Current