1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding] A bit more on FD limits (not strictly services-related)
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=">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"000858.html">
11 <LINK REL=
"Next" HREF=
"000860.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices Coding] A bit more on FD limits (not strictly services-related)
</H1>
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="
17 TITLE=
"[IRCServices Coding] A bit more on FD limits (not strictly services-related)">martinpels at hotmail.com
19 <I>Wed Jun
5 04:
57:
15 PDT
2002</I>
21 <LI>Previous message:
<A HREF=
"000858.html">[IRCServices Coding] A bit more on FD limits (not strictly services-related)
23 <LI>Next message:
<A HREF=
"000860.html">[IRCServices Coding] Again with the dual mode setting
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#859">[ date ]
</a>
27 <a href=
"thread.html#859">[ thread ]
</a>
28 <a href=
"subject.html#859">[ subject ]
</a>
29 <a href=
"author.html#859">[ author ]
</a>
34 <PRE>I restarted services with httpd disabled, to see if that helps. but the
37 /proc/sys/fs/file-nr gives me
1864 136 4096
40 I did notice this in the log when restarting Services:
42 [Jun
05 13:
25:
12 2002] IRC Services
5.0pre1 starting up
43 [Jun
05 13:
25:
13 2002] sockets: [v]sockprintf() with NULL socket!
45 ----- Original Message -----
46 From:
"Russell Garrett
" <<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">rg at tcslon.com
</A>>
47 To:
<<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">ircservices-coding at ircservices.za.net
</A>>
48 Sent: Wednesday, June
05,
2002 1:
39 PM
49 Subject: [IRCServices Coding] A bit more on FD limits (not strictly
53 ><i> OK, I've done a touch more research on this, the Linux default is
54 </I>><i> maximum
1024 FDs per process, and
4096 in total. A `cat
55 </I>><i> /proc/sys/fs/file-nr` will tell you the number of open FDs, the
56 </I>><i> number in use, and the maximum limit.
58 </I>><i> To increase the maximum number of FDs to
65536 (for a
2.2 kernel - I
59 </I>><i> think
2.4 is the same):
61 </I>><i> 1. In /usr/include/bits/types.h change the
"#define __FD_SETZISE
62 </I>><i> 1024" to
"#define __FD_SETSIZE
65536"
63 </I>><i> 2. Do the same in /usr/include/linux/posix_types.h
64 </I>><i> 3. Recompile your kernel
66 </I>><i> The following steps need to be performed every time you start the
67 </I>><i> FD-hungry application, or in your init scripts:
69 </I>><i> 4. echo
"65536" > /proc/sys/fs/file_max
70 </I>><i> 5. echo
"196608" > /proc/sys/fs/inode_max
71 </I>><i> 6. ulimit -HSn
65536
73 </I>><i> Russ Garrett
74 </I>><i> <A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">russ at garrett.co.uk
</A>
75 </I>><i> www.faereal.net
77 </I>><i> ------------------------------------------------------------------
78 </I>><i> To unsubscribe or change your subscription options, visit:
79 </I>><i> <A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
88 <LI>Previous message:
<A HREF=
"000858.html">[IRCServices Coding] A bit more on FD limits (not strictly services-related)
90 <LI>Next message:
<A HREF=
"000860.html">[IRCServices Coding] Again with the dual mode setting
92 <LI> <B>Messages sorted by:
</B>
93 <a href=
"date.html#859">[ date ]
</a>
94 <a href=
"thread.html#859">[ thread ]
</a>
95 <a href=
"subject.html#859">[ subject ]
</a>
96 <a href=
"author.html#859">[ author ]
</a>