From owner-freebsd-questions Sun Sep 8 13:59:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2ACF37B405 for ; Sun, 8 Sep 2002 13:59:26 -0700 (PDT) Received: from bolt.cx (bog515cdy240h.ab.hsia.telus.net [142.179.227.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A43843E4A for ; Sun, 8 Sep 2002 13:59:26 -0700 (PDT) (envelope-from chris-lists@bolt.cx) Received: (qmail 24697 invoked from network); 8 Sep 2002 20:59:48 -0000 Received: from trinity.zero-gravity.org (HELO bolt.cx) (10.0.0.2) by neo.zero-gravity.org with SMTP; 8 Sep 2002 20:59:48 -0000 Message-ID: <3D7BBA44.1080705@bolt.cx> Date: Sun, 08 Sep 2002 14:59:48 -0600 From: Chris Bolt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: How do I increase maxsockets? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm running a very busy web server with thttpd on FreeBSD 4.6-RELEASE, and I need it to be able to handle more than 16,000 connections. I've gone through everything else and I am almost positive that the only bottleneck is the kern.ipc.maxsockets sysctl: # sysctl kern.ipc.maxsockets kern.ipc.maxsockets: 16424 But I can't just set that, since it's ready only. The only way to raise this magic number that I have found is by raising maxusers. man tuning doesn't recommend going any higher than 256, and I'm already at 512 and that's not enough, and when I try 1024 I get a warning when I run config on the kernel, so is there any way of increasing just this one number? Perhaps a line that can go in my kernel config? How about a list of reasons WHY setting maxusers higher than 512 is supposedly bad? Raising NMBCLUSTERS does not affect maxsockets. I've already tried adding this to /boot/loader.conf: kern.ipc.maxsockets="32768" and rebooting, but that did nothing at all. I have a feeling that freebsd's bootloader isn't even being used. For example, top and vmstat don't work: # top top: nlist failed # vmstat vmstat: undefined symbols: _kmemstatistics _bucket _zlist and according to http://www.unixguide.net/freebsd/faq/05.22.shtml it says I may not be using /boot/loader to load the kernel. I don't really have any way of telling if I am or not, since I run the box remotely, so I can't just look at the console when it boots up. When I try setting my main slice as bootable with /stand/sysinstall, even after choosing Write and selecting the FreeBSD Boot Manager, even after it says "Partition table written successfully", the changes to the Flag column are lost when I go back into /stand/sysinstall, with or without a reboot. Another FreeBSD 4.5 box I run has no problems with top or vmstat, and the main slice isn't marked as bootable on that either... so does that mean it's not using the FreeBSD Boot Manager? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message