Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!gatech!newsfeed.internetmci.com!newsxfer2.itd.umich.edu!agate!news.Stanford.EDU!lyra.stanford.edu!pct From: pct@lyra.stanford.edu (Peter Tam) Newsgroups: comp.unix.bsd.netbsd.misc Subject: How to run a process in NetBSD with more than 20 sockets Date: 8 Jan 1996 08:22:06 GMT Organization: Stanford University Lines: 21 Message-ID: <4cqk7e$1gi@nntp.Stanford.EDU> NNTP-Posting-Host: lyra.stanford.edu There is a limit of file descriptors table size in NetBSD, it is 20 I guess. I think by getfdtablesize() I can get it. The problem is I would like to run up at least 100 sockets/file descriptors in one process, so that it can serve at least a hundred tcp connections. I tried, but the software crashed with "Broken Pipe" after the 19-22 sockets get connected. That is not going to help my requirements. Anyone knows where in kernel code that spec the file descriptor table size, and may be by hacking it I can get NetBSD to do the thing I want it to do. Another solution to my problem can be I can fork() at least 100 processes to serve 100 tcp connections. But in NetBSD, processes are expensive, kernel panic after 40th processes, and hangs. If in each process I can reducee the virtual space to my needs only, freeing up VM addresses for fellow processed, I may be able to make it, but how to free up Virtual Memory in each process ? Thanks for any help.