[OpenWrt-Devel] procd limits usage

Yousong Zhou yszhou4tech at gmail.com
Wed Jan 7 08:19:38 EST 2015


On 7 January 2015 at 20:16, Karl Palsson <karlp at tweak.net.au> wrote:
>
> Yousong Zhou <yszhou4tech at gmail.com> wrote:
>>
>> Which libc was in use?  Because RLIMIT_DATA only applies to those
>> allocated by brk() and sbrk(), while malloc() of glibc may fallback to
>> mmap() if sbrk() fails.  AFAIK, malloc() of uClibc for MIPS in OpenWrt
>> utilizes only sbrk() with the default config.
>
> whatever the default was for "atheros" in OpenWrt 1407.  so,
> uClibc 0.9.33.2

Okay.  But then I have no idea what's going wrong.  You can try adding
getrlimit() call to hogger to see whether the soft/hard limit has
indeed been imposed before exec() by procd.  BTW, the format of limits
params allows setting both soft and hard limit for each resource type.
As in the following

                procd_set_params limits "data=4000 8000"

If only one value was given, only the soft limit is supposed to be
changed with the hard limit left as it is.

>>
>> > But procd does nothing that I can see, no logging, no restarting.  Is
>> > this the correct usage? Is there some other way these procd limits are
>> > meant to be used?  The only reference to a procd init script using this
>> > feature is
>> > https://github.com/zqlee/smartproxy/blob/master/files/smartproxy.init
>>
>> "as=" (RTLIMIT_AS) is another option you can try.
>
> What does that actually limit?  Matching up names from the procd commit
> RTLIMIT_xxx with "man ulimit" for instance isn't always obvious (to me
> at least)

My bad, should be RLIMIT_AS.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list