Hey, I have to bring this up once more. Is there a hard limit of file descriptors in proc.2.rlimit.descriptors.soft since I cant raise ist above the value of 1772?
Everything above that value I get: > rumpctrl (tcp://xxx.xx.xx.xxx:12345)$ sysctl -w > proc.2.rlimit.descriptors.soft=1773 > sysctl: proc.2.rlimit.descriptors.soft: Invalid argument But I currently require a much higher # since a server needs at least 1 sometimes 2 FD for each connection. How can I set an even higher number of FD (e.g. 200000) ? Thanks! Best, Vincent 2016-01-25 17:50 GMT+01:00 <[email protected]>: > Hey Antti, > > thank you so much! :) I tested with a similar command but didn't guess > right the process ID (tried 0 and 1). > > Best, > > Vincent > > > > > Antti Kantee <[email protected]> schrieb am 17:44 Montag, 25.Januar 2016: > > > On 25/01/16 15:00, Vincent Schwarzer wrote: > > @Martin: Would be helpful for my case, especially that I don't have to > use > > an extra program (Rumpctrl) > > > > I tried to change the number of available # of File Descriptors with > sysctl > > without any luck. > > It seems that i have to adjust them with ulimit (which has to be pulled > > from the NetBSD sources) or > > is there another workaround ? > > rumpctrl (tcp://10.0.0.2:12345/)$ sysctl -w > proc.2.rlimit.descriptors.soft=512 > proc.2.rlimit.descriptors.soft: 128 -> 512 > > Tested against the program at the end of the mail. Seems to work fine. > Might be easier if rumpctrl had ps, but the first program really > always is 2, next one is 3, ... I can't actually remember if there's > some trick to list the processes without ps (except gdb). I'm almost > sure I knew how to do it 5 years ago, but apparently time heals all > synapses. Or at least I remember having to fix a bunch of stuff for > sockstat to get the command lines to display right .... > > #include <sys/times.h> > #include <sys/resource.h> > > #include <err.h> > #include <stdio.h> > > int > main() > { > struct rlimit rl; > > > for (;;) { > > if (getrlimit(RLIMIT_NOFILE, &rl) == -1) > err(1, "getrlimit"); > printf("%lld %lld\n", > (long long)rl.rlim_cur, (long long)rl.rlim_max); > sleep(1); > } > return 0; > > } > > > >
