Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Sep 2002 14:59:48 -0600
From:      Chris Bolt <chris-lists@bolt.cx>
To:        freebsd-questions@freebsd.org
Subject:   How do I increase maxsockets?
Message-ID:  <3D7BBA44.1080705@bolt.cx>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D7BBA44.1080705>