X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/bsd/dev/unix_startup.c diff --git a/bsd/dev/unix_startup.c b/bsd/dev/unix_startup.c index 0f36920f0..ddb2baa68 100644 --- a/bsd/dev/unix_startup.c +++ b/bsd/dev/unix_startup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2010 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -328,15 +328,18 @@ bsd_scale_setup(int scale) desiredvnodes = maxfiles; vnodes_sized = 1; if (scale > 4) { - /* clip them at 32G level */ + /* clip somaxconn at 32G level */ somaxconn = 2048; - /* 64G or more the hash size is 32k */ + /* + * For scale > 4 (> 32G), clip + * tcp_tcbhashsize to 32K + */ + tcp_tcbhashsize = 32 *1024; + if (scale > 7) { /* clip at 64G level */ - tcp_tcbhashsize = 16 *1024; max_cached_sock_count = 165000; } else { - tcp_tcbhashsize = 32 *1024; max_cached_sock_count = 60000 + ((scale-1) * 15000); } } else {