Subject: mclpool limit reached
To: None <netbsd-users@netbsd.org>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 08/07/2004 03:04:43
I wrote a small application which runs a tight loop, creating a large 
number (60 to 200) of threads as fast as possible. Each thread makes a 
connection to a server, the server is running on another machine on my 
LAN. Each thread calls socket(), connect() and write(). I am using this 
to simulate a large number of client connections and how this impacts 
the performance of the server. The problem is, running this in a very 
tight loop causes the network interface to become inoperable, and the 
following message gets logged into /var/log/kern.log

WARNING: mclpool limit reached; increase NMBCLUSTERS

After this happens, I cannot ping from this machine, and I cannot access 
this machine from other machines on the network. My question is: what 
does the error message mean and why doesn't socket() or connect() fail, 
instead of just causing the network interface to hang and deny service 
to other users/services. Is this error recoverable and what can I do to 
recover from it gracefully, no matter how many simultaneous connections 
are generated.

Thanks

PS this was done on i386 NetBSD-2.0F