From owner-freebsd-net Sun Nov 14 19:14:44 1999 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 3ECE514D32 for ; Sun, 14 Nov 1999 19:14:41 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id WAA04068; Sun, 14 Nov 1999 22:14:36 -0500 (EST) (envelope-from wollman) Date: Sun, 14 Nov 1999 22:14:36 -0500 (EST) From: Garrett Wollman Message-Id: <199911150314.WAA04068@khavrinen.lcs.mit.edu> To: "Vince Kosmac" Cc: Subject: Help with MAX sockets In-Reply-To: <002d01bf2b8e$ee857fa0$1eea6bce@vince_svr.travauto.com> References: <002d01bf2b8e$ee857fa0$1eea6bce@vince_svr.travauto.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Does anyone know the resource requirements for a single BSD=20 > socket ? I am tring to open 2,000 sockets on a single machine with=20 > 512meg of ram. I can only get 648 sockets before it locks up. I did a = Please do not send HTML-mail. It really irritates a lot of people, and makes you look like a clueless newbie. To answer your question: a TCP socket requires 448 (tcpcb) + 192 (socket) + 64 (file) = 704 bytes of kernel state for each open socket. Closed sockets in TIME_WAIT state require 640 bytes (everything but the file struct). As to why you can only get 648 sockets before ``it locks up'', I can't help you unless you are far more specific. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message