On 27/01/16 07:19, Vincent Schwarzer wrote:
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) ?
You need to raise the system-wide limit. However, that limit is not
currently available via sysctl for various reasons, among them that
AFAIK nobody ever wanted to open 20000 file descriptors in a rump kernel
before.
So for now, you can build the rump kernel with -DMAXFILES=yourlimit, or
hack it into src-netbsd/sys/conf/param.c, or change the value of
rumpns_maxfiles from gdb, or -- very naughty -- assign extern unsigned
int rumpns_maxfiles from an application. (all suggestions are, of
course, untested, but at least one should work ;)