]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[OPTIM] make global.maxpipes default to global.maxconn/4 when not specified
authorWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 13:06:58 +0000 (14:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 13:06:58 +0000 (14:06 +0100)
global.maxconn/4 seems to be a good hint for global.maxpipes when that
one must be guessed. If the limit is reached, it's still possible to
set it manually in the configuration.

src/haproxy.c

index fd4b050288d27e5986f37c450fc2f8b4b1d3db4c..8ec217c19266c2b2921e2f870f37b9a370becf16 100644 (file)
@@ -566,6 +566,7 @@ void init(int argc, char **argv)
                global.maxpipes = MAX(nbfe, nbbe);
                if (global.maxpipes > global.maxconn)
                        global.maxpipes = global.maxconn;
+               global.maxpipes /= 4;
        }