|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v5 2/2] tools/xenstore: set open file descriptor limit for xenstored
Juergen Gross writes ("Re: [PATCH v5 2/2] tools/xenstore: set open file
descriptor limit for xenstored"):
> Hmm, maybe I should just use:
>
> prlimit --nofile=$XENSTORED_MAX_OPEN_FDS \
> $XENSTORED --pid-file @XEN_RUN_DIR@/xenstored.pid $XENSTORED_ARGS
I guess that would probably work (although it involves another
exec) but I don't understand what's wrong with ulimit, which is a
shell builtin.
I think this script has to run only on Linux and all reasonable Linux
/bin/sh have `ulimit`. (I have checked dash and bash.)
So I think just
ulimit -n $XENSTORED_MAX_OPEN_FDS
$XENSTORED --pid-file @XEN_RUN_DIR@/xenstored.pid $XENSTORED_ARGS
will DTRT. You could also do this
ulimit -n $XENSTORED_MAX_OPEN_FDS || true
which will arrange that if, somehow, this fails, the system is likely
to continue to mostly-work despite the error. Whether that would be
desirable is a matter of taste I think.
(I have RTFM again, and setting -H and -S separately is not needed;
omitting -H or -S means to set both.)
Ian.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |