Date: Wed, 25 Oct 2000 09:34:49 -0700 From: Steve Connet <Steve.Connet@visitalk.com> To: "'freebsd-questions@FreeBSD.ORG'" <freebsd-questions@FreeBSD.ORG> Subject: kern.ipc.maxsockets & maxusers Message-ID: <D327499E8D1FD411A88A0008C733729B0117FA1F@exchange.nt.zoo.int>
next in thread | raw e-mail | index | archive | help
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" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4207.2601" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>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.</FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>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.</FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>1) How do I increase the number of 'free' sockets that can be connected? </FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>2) What is the 'equation' used to determine max sockets based upon maxusers? Seems maxusers is multiplied by roughly 32?</FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>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.</FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>Thank you in advance,</FONT></SPAN></DIV> <DIV><SPAN class=431462516-25102000><FONT face=Arial size=2>Steve</FONT></SPAN></DIV></BODY></HTML> ------_=_NextPart_001_01C03EA1.7E50B890-- 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?D327499E8D1FD411A88A0008C733729B0117FA1F>