• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lotsa lotsa lotsa FDs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lotsa lotsa lotsa FDs


  • Subject: Re: lotsa lotsa lotsa FDs
  • From: email@hidden
  • Date: Sat, 22 Apr 2006 01:54:07 -0700


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?

Have you set kern.maxfiles in sysctl?

Firstly, I appreciate the help! When I look at what kern.maxfiles is set to, it says:


PugsleyButt:~ jmzorko$ sysctl -a|grep files
kern.maxfiles = 12288
kern.maxfilesperproc = 10240
PugsleyButt:~ jmzorko$

... 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?

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: launchd APIs
  • Next by Date: jabber- ichat sever
  • Previous by thread: Re: lotsa lotsa lotsa FDs
  • Next by thread: launchd APIs
  • Index(es):
    • Date
    • Thread