Here's what I do:
1) Get 2.0.36
2) Apply Oskar's patch (version 8.03)
3) Set File-descriptor limit to 3000.
4) Build and install kernel. Reboot.
5) echo "16384" > /proc/sys/kernel/file-max
6) echo "32768" > /proc/sys/kernel/inode-max
7) Hateful: Change the definition of __FD_SETSIZE in
/usr/include/gnu/types.h to 3072.
8) Go to the top of your squid tree.
9) Type 'ulimit -n 3000'
10) make distclean
11) ./configure ..etc...
12) install.
13) Change the squid startup script to run 'ulimit -n 3000' before
running squid.
And that's 3000 working file-descriptors. If you don't change the
__FD_SETSIZE definition, then your squid will likely crash after using
about 257 descriptors.
D
Mohammed Hamed wrote:
>
> What about increasing beyond 1024 ? it seems squid uses the min of
> Squid_MaxFD which is 2048 on my Linux 2.0.36 system after applying the patch
> , and FD_SETSIZE which for no apparent reason , the patch didnot change.
> So even after recompiling , squid still detects no more than 1024 FDs which
> are simply not enough for our cache load.
> I'm not sure about what FD_SETSIZE does, and dunno which value is dependable
> NR_OPEN which is increased by the patch , or FD_SETSIZE ?
> If I change the source to force squid to always use Squid_MaxFD (2048),
> shall it be ok to exceed the value of FD_SETSIZE (1024) as long as NR_OPEN
> (2048) still not exceeded ?
>
> Regards,
> --Mohammed Hamed
> -----Original Message-----
> From: Henrik Nordstrom <hno@hem.passagen.se>
> To: Klaus-Peter.Neurohr@toshiba-teg.com
> <Klaus-Peter.Neurohr@toshiba-teg.com>
> Cc: squid-users <squid-users@ircache.net>
> Date: Thursday, November 26, 1998 11:53 PM
> Subject: Re: FD's again: ulimit shows 1024, but recompiled squid...
>
> >Did you remember to run "make distclean" in the Squid source directory
> >after applying the kernel FD patch?
> >
> >What is the output of ulimit -aH?
> >
> >Are you really really sure you are running a copy of Squid that was
> >compiled after the kernel change?
> >
> >--
> >Henrik Nordsrom
> >Spare time Squid hacker
> >
> >> > I installed a new Linux server with kernel 2.0.36 and applied Oskars
> >> > filehandlepatch 8.04. After recompiling the kernel and a reboot,
> >> > ulimit -a looks good:
> >...
> >> > /* Default FD_SETSIZE value */
> >> > #define DEFAULT_FD_SETSIZE 1024
> >> >
> >> > /* Maximum number of open filedescriptors */
> >> > #define SQUID_MAXFD 1024
> >...
> >> > File descriptor usage for squid:
> >> > Maximum number of file descriptors: 256
> >
> >
Received on Mon Nov 30 1998 - 18:23:22 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:43:25 MST