1 |
On Tue, 2007-04-17 at 11:19 +1200, Christopher Sawtell wrote: |
2 |
> On Tuesday 17 April 2007 01:10:20 Chris Gianelloni wrote: |
3 |
> [ ... ] |
4 |
> |
5 |
> > Yeah, ulimit won't do it. We hit this issue with mimedefang, actually. |
6 |
> > Our problem is that the kernel is doing the limiting. We ended up |
7 |
> > having to split things up a good bit into multiple processes to get |
8 |
> > everything working. We also added another machine to the cluster to try |
9 |
> > to reduce the load on any one server at a time. Nothing we did with |
10 |
> > ulimit made a bit of difference. |
11 |
> |
12 |
> http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ |
13 |
|
14 |
The problem isn't open files. It is file descriptors. |
15 |
|
16 |
wolf31o2@vertigo /usr/src/linux/include $ head -n 25 linux/posix_types.h |
17 |
#ifndef _LINUX_POSIX_TYPES_H |
18 |
#define _LINUX_POSIX_TYPES_H |
19 |
|
20 |
#include <linux/stddef.h> |
21 |
|
22 |
/* |
23 |
* This allows for 1024 file descriptors: if NR_OPEN is ever grown |
24 |
* beyond that you'll have to change this too. But 1024 fd's seem to be |
25 |
* enough even for such "real" unices like OSF/1, so hopefully this is |
26 |
* one limit that doesn't have to be changed [again]. |
27 |
* |
28 |
* Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in |
29 |
* <sys/time.h> (and thus <linux/time.h>) - but this is a more logical |
30 |
* place for them. Solved by having dummy defines in <sys/time.h>. |
31 |
*/ |
32 |
|
33 |
/* |
34 |
* Those macros may have been defined in <gnu/types.h>. But we always |
35 |
* use the ones here. |
36 |
*/ |
37 |
#undef __NFDBITS |
38 |
#define __NFDBITS (8 * sizeof(unsigned long)) |
39 |
|
40 |
#undef __FD_SETSIZE |
41 |
#define __FD_SETSIZE 1024 |
42 |
|
43 |
-- |
44 |
Chris Gianelloni |
45 |
Release Engineering Strategic Lead |
46 |
Alpha/AMD64/x86 Architecture Teams |
47 |
Games Developer/Council Member/Foundation Trustee |
48 |
Gentoo Foundation |