On Thu, May 08, 2014 at 08:45:25PM +0200, Thomas Graf wrote: > A user may set LimitNOFILE through systemd or other means to set > the maximum number of open file descriptors. Only modify the ulimit > if not already set to a higher value by the user. > > Signed-off-by: Thomas Graf <[email protected]>
Seems reasonable. Acked-by: Andy Gospodarek <[email protected]> > --- > utilities/ovs-ctl.in | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > index 0735160..2f39519 100755 > --- a/utilities/ovs-ctl.in > +++ b/utilities/ovs-ctl.in > @@ -227,7 +227,10 @@ start_forwarding () { > # On Linux, ovs-vswitchd needs about three file descriptors > # per bridge and one file descriptor per bridge port, so this > # allows a very large number of bridges and ports. > - ulimit -n 7500 > + MAXFD=7500 > + if [ $(ulimit -n) -lt $MAXFD ]; then > + ulimit -n $MAXFD > + fi > > # Start ovs-vswitchd. > set ovs-vswitchd unix:"$DB_SOCK" > -- > 1.8.3.1 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
