Re: Hard-limits for kern.maxproc
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com After a frustrating and long search for the root of the various problems I was having with my new Xserve serving email via IMAP, I was tipped off by... http://support.apple.com/kb/TS1659 ...that the kernel has insanely low defaults (for a server) for kern.maxproc (532), which controls the maximum amount of processes allowed to run on the system. While trying to raise the default to a reasonable value (Linux defaults to 32,768 for example), I discovered that I couldn't raise it above 2500. Peter O'Gorman tells me off that this is a hard-coded limit in Xnu: ./bsd/conf/param.c:#define HNPROC 2500 /* based on thread_max */ I've already filed rdar://6536876 asking that this be raised, but as I've had very poor returns with my filed bugs that I spent a long time researching, and very good returns on Apple mailing lists (go apple-x11!), I thought I'd post here too. :-) Is there any reason the hard limit couldn't be raised an order of magnitude or two? Resource limits are tuned Even with raising kern.maxproc (and kern.maxprocperuid and the launchd settings that mirror it and launchd's maxfiles setting, etc. etc) my Xserve will run into the process limit far before it exhausts CPU, RAM, disk, or bandwidth resources. I'd be happy to provide some legwork (testing, doing some sanity checks on stuff in the kernel source code, etc.) if that would help. I am a registered ADC member and I'm willing to get my hands dirty to get this fixed. I've set up four-dozen OS X stations up in my company, as well as 200 linux stations, all of which access our Xserve for mail. It was very embarassing when we switched from our email hosting provider (who used OpenBSD) to our own Apple Xserve (I didn't want to have to learn to configure courier+cyrus+postfix+whatever all by myself on a Linux server) that we had so many problems for so long and it took two months to narrow it down to an apparently arbitrarily small value for kern.maxproc (and launchd). ~ Nathan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/tlambert%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... On Jan 29, 2009, at 11:15 AM, Nathan <nathan.stocks@gmail.com> wrote: Yes. Fragility under resource starvation conditions. This has already been asked and answered in this mailing list previously (search the archives for "resource limits"), but the tuning values you specify for a general purpose system have to be lower than those for a role based system, since a general system has to be able to handle all the resources if every type being consumed. Role based systems use a set of resources whose type is constrained by the role. In trade for tuning down (or simply not using), and administrator may safely tune up the resources used in that role, making the system a better fit for the role. This email sent to tlambert@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert