]>
Commit | Line | Data |
---|---|---|
3bd189cb JR |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
2 | <HTML> | |
3 | <HEAD> | |
4 | <TITLE> [IRCServices Coding] A bit more on FD limits (not strictly services-related) | |
5 | </TITLE> | |
6 | <LINK REL="Index" HREF="index.html" > | |
7 | <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20A%20bit%20more%20on%20FD%20limits%20%28not%20strictly%20services-related%29&In-Reply-To=NDBBLDHKLKMANPGMACIGIEPBCPAA.rg%40tcslon.com"> | |
8 | <META NAME="robots" CONTENT="index,nofollow"> | |
9 | <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> | |
10 | <LINK REL="Previous" HREF="000857.html"> | |
11 | <LINK REL="Next" HREF="000859.html"> | |
12 | </HEAD> | |
13 | <BODY BGCOLOR="#ffffff"> | |
14 | <H1>[IRCServices Coding] A bit more on FD limits (not strictly services-related)</H1> | |
15 | <B>Russell Garrett</B> | |
16 | <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20A%20bit%20more%20on%20FD%20limits%20%28not%20strictly%20services-related%29&In-Reply-To=NDBBLDHKLKMANPGMACIGIEPBCPAA.rg%40tcslon.com" | |
17 | TITLE="[IRCServices Coding] A bit more on FD limits (not strictly services-related)">rg at tcslon.com | |
18 | </A><BR> | |
19 | <I>Wed Jun 5 04:39:02 PDT 2002</I> | |
20 | <P><UL> | |
21 | <LI>Previous message: <A HREF="000857.html">[IRCServices Coding] (no subject) | |
22 | </A></li> | |
23 | <LI>Next message: <A HREF="000859.html">[IRCServices Coding] A bit more on FD limits (not strictly services-related) | |
24 | </A></li> | |
25 | <LI> <B>Messages sorted by:</B> | |
26 | <a href="date.html#858">[ date ]</a> | |
27 | <a href="thread.html#858">[ thread ]</a> | |
28 | <a href="subject.html#858">[ subject ]</a> | |
29 | <a href="author.html#858">[ author ]</a> | |
30 | </LI> | |
31 | </UL> | |
32 | <HR> | |
33 | <!--beginarticle--> | |
34 | <PRE>OK, I've done a touch more research on this, the Linux default is | |
35 | maximum 1024 FDs per process, and 4096 in total. A `cat | |
36 | /proc/sys/fs/file-nr` will tell you the number of open FDs, the | |
37 | number in use, and the maximum limit. | |
38 | ||
39 | To increase the maximum number of FDs to 65536 (for a 2.2 kernel - I | |
40 | think 2.4 is the same): | |
41 | ||
42 | 1. In /usr/include/bits/types.h change the "#define __FD_SETZISE | |
43 | 1024" to "#define __FD_SETSIZE 65536" | |
44 | 2. Do the same in /usr/include/linux/posix_types.h | |
45 | 3. Recompile your kernel | |
46 | ||
47 | The following steps need to be performed every time you start the | |
48 | FD-hungry application, or in your init scripts: | |
49 | ||
50 | 4. echo "65536" > /proc/sys/fs/file_max | |
51 | 5. echo "196608" > /proc/sys/fs/inode_max | |
52 | 6. ulimit -HSn 65536 | |
53 | ||
54 | Russ Garrett | |
55 | <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">russ at garrett.co.uk</A> | |
56 | www.faereal.net | |
57 | ||
58 | ||
59 | </PRE> | |
60 | ||
61 | <!--endarticle--> | |
62 | <HR> | |
63 | <P><UL> | |
64 | <!--threads--> | |
65 | <LI>Previous message: <A HREF="000857.html">[IRCServices Coding] (no subject) | |
66 | </A></li> | |
67 | <LI>Next message: <A HREF="000859.html">[IRCServices Coding] A bit more on FD limits (not strictly services-related) | |
68 | </A></li> | |
69 | <LI> <B>Messages sorted by:</B> | |
70 | <a href="date.html#858">[ date ]</a> | |
71 | <a href="thread.html#858">[ thread ]</a> | |
72 | <a href="subject.html#858">[ subject ]</a> | |
73 | <a href="author.html#858">[ author ]</a> | |
74 | </LI> | |
75 | </UL> | |
76 | ||
77 | </body></html> |