Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68524 - More filedescriptors for squid
Summary: More filedescriptors for squid
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Andrew Bevitt
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-22 03:48 UTC by Michal Margula
Modified: 2004-12-29 07:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Support for 8192 filedescriptors (squid-2.5.7-8192fds.patch,4.62 KB, patch)
2004-12-29 06:15 UTC, Michal Margula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Margula 2004-10-22 03:48:21 UTC
Current squid version has 1024 limit for number of used filedescriptors. It is not enough. My busy proxy needs over 4096 of them. So it would be safe by enabling, let say 8192 (it does no harm to users not using that limit) by following patch:

--- ./configure.in.org	Tue Sep  2 10:17:16 2003
+++ ./configure.in	Tue Sep  2 10:23:08 2003
@@ -1947,7 +1947,7 @@
 	exit(0);
 }
 ],
-SQUID_MAXFD=`cat conftestval`,
+SQUID_MAXFD=8192,
 SQUID_MAXFD=256,
 SQUID_MAXFD=256)
 AC_MSG_RESULT($SQUID_MAXFD)
Comment 1 Andrew Bevitt 2004-10-22 06:07:30 UTC
Ok ill investigate this after exams.
Comment 2 Andrew Bevitt 2004-12-03 17:57:10 UTC
Fixed in cvs.. Bumped it to 8192 as suggested here, seems reasonable.
Comment 3 Michal Margula 2004-12-14 08:09:06 UTC
I am afraid that bug needs to be reopened. First of all squid misses two fixes - in /etc/conf.d/squid where there should be information changed from

# Max. number of filedescriptors to use. You can increase this on a busy
# cache to a maximum of (currently) 4096 filedescriptors. Default is 1024.

to

# Max. number of filedescriptors to use. You can increase this on a busy
# cache to a maximum of (currently) 8192 filedescriptors. Default is 1024.

It is rather trivial and not so important. Second is about init script, where line 16 should be:

        [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192

But after those obvious fixes there is a problem, still. squid after declaring 8192 descriptors, still uses 4096. Funny thing is that squid taken from another distro (PLD) with 8192 limit compiled in, works fine. I am guessing it is also some trivial change, but can't figure it out.
Comment 4 Michal Margula 2004-12-29 05:46:59 UTC
I did additional "research" on that issue and I can tell that not supporting more than 4096 descriptors is caused by building process when emerging. There are no problems with pure squid sources, which accept 8192 descriptors. I am doing this by issuing 'ulimit -HSn 4096 && ./configure' and it works fine after building and installing. Tried doing the same inside of squid of ebuild, but it does not work as expected (no more than 4096 descriptors, even if squid started manually and not by init.d script).
Comment 5 Michal Margula 2004-12-29 06:14:46 UTC
OK. I found it! It is really trivial. In few minutes I will attach proper patch that does following:

- remove unneeded part of patch that changes SQUID_MAXFD in configure.in (which was mentioned in my first post)
- change description in /etc/conf.d/squid telling that current limit is 8192 filedescriptors
- change initscript so it can handle 8192 squid
- change 129 line of ebuild, which sets the limit
- fixes files digests

Please apply that patch ASAP :).
Comment 6 Michal Margula 2004-12-29 06:15:57 UTC
Created attachment 47112 [details, diff]
Support for 8192 filedescriptors
Comment 7 Andrew Bevitt 2004-12-29 07:19:10 UTC
patch is in cvs