From owner-freebsd-questions Wed Oct 25 9:34:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from exchange.nt.zoo.int (mail.visitalk.com [63.147.103.201]) by hub.freebsd.org (Postfix) with ESMTP id 28D0837B4C5 for ; Wed, 25 Oct 2000 09:34:20 -0700 (PDT) Received: by exchange.nt.zoo.int with Internet Mail Service (5.5.2650.21) id ; Wed, 25 Oct 2000 09:34:53 -0700 Message-ID: From: Steve Connet To: "'freebsd-questions@FreeBSD.ORG'" Subject: kern.ipc.maxsockets & maxusers Date: Wed, 25 Oct 2000 09:34:49 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C03EA1.7E50B890" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C03EA1.7E50B890 Content-Type: text/plain; charset="iso-8859-1" I wrote a server app that receives incoming tcp connections. I would like to have a max of 5000 persistent connections. Right now when I do a 'sysctl vm.zone' it says max sockets for tcp are 1064 but only shows 10 free. I can only make 10 connections before my 'accept' statement fails. Someone on a newsgroup suggested I increase 'maxusers' and recompile the kernel. I tried this. I increased maxusers to 256 and recompiled the kernel. This changed the number of max sockets to 8232. However sysctl vm.zone revealed only 10 free still. I increased maxusers to 512 and recompiled the kernel. Max sockets now shows 16424 but free is still only 10. I have two questions. 1) How do I increase the number of 'free' sockets that can be connected? 2) What is the 'equation' used to determine max sockets based upon maxusers? Seems maxusers is multiplied by roughly 32? I am a novice to freeBSD. Just started with it a few weeks ago. So any explanations would help especially if they are in detail and give exact instructions on what I need to do. For example, simply saying, "change xyz" doesn't help. Where is xyz? What must I do to change it? When does it take affect? Etc. Thank you in advance, Steve ------_=_NextPart_001_01C03EA1.7E50B890 Content-Type: text/html; charset="iso-8859-1"
I wrote a server app that receives incoming tcp connections. I would like to have a max of 5000 persistent connections. Right now when I do a 'sysctl vm.zone' it says max sockets for tcp are 1064 but only shows 10 free. I can only make 10 connections before my 'accept' statement fails.
Someone on a newsgroup suggested I increase 'maxusers' and recompile the kernel. I tried this. I increased maxusers to 256 and recompiled the kernel. This changed the number of max sockets to 8232. However sysctl vm.zone revealed only 10 free still. I increased maxusers to 512 and recompiled the kernel. Max sockets now shows 16424 but free is still only 10. I have two questions.
 
1) How do I increase the number of 'free' sockets that can be connected?
2) What is the 'equation' used to determine max sockets based upon maxusers? Seems maxusers is multiplied by roughly 32?
 
I am a novice to freeBSD. Just started with it a few weeks ago. So any explanations would help especially if they are in detail and give exact instructions on what I need to do. For example, simply saying, "change xyz" doesn't help. Where is xyz? What must I do to change it? When does it take affect? Etc.
 
Thank you in advance,
Steve
------_=_NextPart_001_01C03EA1.7E50B890-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message