site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Peter, ... so I figure i'm not doing it right. Is ulimit -n / -s not enough? Can I do something else to allow for the thousands of descriptors i'll be creating / using? PugsleyButt:~ jmzorko$ sysctl -a|grep files kern.maxfiles = 12288 kern.maxfilesperproc = 10240 PugsleyButt:~ jmzorko$ Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Have you set kern.maxfiles in sysctl? Firstly, I appreciate the help! When I look at what kern.maxfiles is set to, it says: ... which is way beyond what i'm trying (6000 connections, though I eventually want to try 10K, 20K, 100K even). I wrote a quick Perl script that makes n connections to a test C++ server I wrote (running on another machine), and waits for data from each of those sockets. I've tried this on wired (100mb/s) and wireless (54mb/s) networks, and eventually the script will make my PowerBook exhibit the following behavior: 1. I can't ctrl-C the Perl script (it hangs) 2. I can't kill the Perl script via the kill command (it hangs) 3. I can't check mail / use Safari / etc. (spinning beach ball everywhere) ... sometimes it works (the Perl script comes back when the server has finished sending everything), sometimes I can ctrl-C the Perl script and it will be fine, but the more often I run it (with high #s of connections it's creating to the server), the more likely it is to exhibit the above behavior. I first thought it was my kqueue() experiments going south, then I tried rewriting the server to use the libEvent library (thinking it will do the kqueue thing correctly), but it still did it, then I made libEvent use poll() instead of kqueue, but it still did it, then I put the server on another machine entirely, and just running the Perl client makes the problem appear, so it seems to have something to do with large (thousands) numbers of descriptors being active at once, and nothing to do with kqueue / poll / libEvent. This is on a 12" 1.5ghz PowerBook G4, running 10.4.6, 1.25GB RAM. Is there some other setting that I can tweak to make this problem go away with large numbers of connections? This email sent to site_archiver@lists.apple.com