Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: Squid out of filedescriptor


  • Subject: Re: lug-bg: Squid out of filedescriptor
  • From: danchev@xxxxxxxxx (George Danchev)
  • Date: Wed, 5 Dec 2001 16:50:14 +0200



On Wednesday 05 December 2001 15:18, you wrote:
> Ami ... tova koeto ostava, e da go testvash dali ne segfault-va pri nad
> 1024 open descriptora, shtoto i toq moment go ima - taka se slushvashe s
> ircd-ta , na koito samo FD_SETSIZE se smenqshe, a prekticheski libc-to si
> misleshe korenno razlichni neshta za fd_set -ovete ...

da de za promqna na FD_SETSIZE v types.h na glibc-to stava vypros ama i nseto 
drugo ima qvno ...
 
> On Wed, 5 Dec 2001, George Danchev wrote:
> > Na nqkoj mozhe da mu e interesno no kak elegantno se reshava problema s
> > FD_SETSIZE v debian source packeta na squid-2.4.3

Tuk trqbvashe da kazha 4e za glibc stava vypros, eto i komentara ot 
inux-increase-fds.patch

+ * Cannot increase FD_SETSIZE on Linux, but we can increase __FD_SETSIZE
+ * with glibc 2.2 (or later? remains to be seen). We do this by including
+ * bits/types.h which defines __FD_SETSIZE first, then we redefine
+ * FD_SETSIZE. Ofcourse a user program may NEVER include bits/whatever.h
+ * directly, so this is a dirty hack!

Sega tuk ima edna podrobnost (ne kazvam 4e ne q znaete, no da kazha;) 
Zna4i imame si glibc pristignalo s distroto, nogotovo library binary objects 
i headers (mezhhu tqh si ima napylno syotvetstvie, t.e. tova sa header-ite 
glibc was compiled against ) ...  buildvame nasam natam , si4ko e OK stoto 
ima syotvetstvie mezhdu tezi headers i bynary objects. No po4vame da byrkame 
iz header-ite na bibliotekata , dokato v sustiq moment binary library objects 
sa buildnati s starite (predi da gi promenime) headeri. Link-vame programite 
(ve4e polzvashti novite headeri) s binary library objects (koito sa bili 
compiled s starite headers).  => BIG BIG PAIN ON THE ASS ! => warningi, gurmi 
tova onova i se po4vat da se pishat patch-ove za tezi programi i neznam si 
kakvo :).
 
Oba4e v slu4aq s squid-a, neznam kak go pravqt toq nomer za da ne gurmi sled 
promqnata v .h na glibc. Ne se link-va kym binary objects za koito tazi 
promqna bi okazala vliqnie li .. neznam? Mozhe bi polzva tova dokato 
kompilira sobstvenoto si executable binary li , ideq nqmam. 

Tuka oste edno otklonenie za kernel headerite v glibc. Zadylzhitelno tova 
trqbva da sa headerite glibc was compiled against ! A ne symlink-ove (ako 
oste gi ima nqkude de) koito so4at kym kernel headerite v source na kernela 
koito imame v momenta (usr/src/linux/inclide/linux). Polu4ava se taka 4e kato 
si smenime source-a na kernela s po-nova versiq ve4e po4vat glavoboliqta 
stoto nqma syotvetstvie (upgradenali sme headerite na glibc-to stoto 
symlinkovete so4at kym source-to na kernela, za da sme safe togava trqbva da 
prekompilirame i glibc-to s novite kernel header-i). Za tova kazvah 4e user 
space apps ne trqbva da zavisqt (a i ne zavisqt ot ) source na kernela stoto 
posle pri linkage-a se polu4avat bolki v leviq dolen krajnik :) . Kogato se 
pishat/build-vat kernelski nesta te togava zadylzhitelno si polzvat kvoto im 
trebe ot tekustoto kernel source (usr/src/linux) , za tova e hubavo da imame 
MODVERSIONS v kernela i da si prekompilirame modulite vseki pyt sprqmo novoto 
kernel source stoto ne se znae kakvoto e promeneno. 

Mnogo molq da me izvinite ako sym bil neto4en ili ima greshki :)

> >
> > v directoriqta s source-to na squid-2.4.3/
> > debian/patches/linux-increase-fds.patch
> > (ot 00README- A hack to squid.h so that FD_SETSIZE can be redifined on
> > Linux for more open filedescriptors)
> > Stava vypros za
> > src/squid.h

Eto i 4ast ot debian/README.Debian:

A number of patches were applied. A lot of them are Debian specific,
you will not find them outside of Debian (yet).

cf.data.debian.patch	Debian specific squid.conf patches
dfl-error-dir.patch	Default error dir is under /usr/lib/squid for Debian
htcp-off.patch		Makes it possible to turn htcp off in squid.conf
icp_hit_stale.patch	Don't return 504 on cache-only requests for
                        stale objects if icp_hit_stale is on.
linux-increase-fds.patch
                        Squid can now use up to 4096 filedescriptors.
no_append_domain_localhost.patch
                        Don't apply "append_domain" setting to "localhost"
                        in unqualified URLs.
pipeline-shutup.patch	Don't print debugging info to logfile for
                        HTTP pipelined requests (apt uses this)
smb_auth.sh.patch	Read password with '-r' so backslashes work
syslog.patch		Log to daemon.log instead of local4.log
unlinkd.patch		Compile in unlinkd support even with async io

Squid was compiled with the following options:

config.status: 
        ./configure \
        --prefix=/usr \
        --exec_prefix=/usr \
        --bindir=/usr/sbin --sbindir=/usr/sbin \
        --libexecdir=/usr/lib/squid \
        --sysconfdir=/etc \
        --localstatedir=/var/spool/squid \
        --with-pthreads \
        --enable-storeio=ufs,aufs,diskd \		[1]
        --enable-removal-policies=lru,heap \
        --enable-snmp \
        --enable-delay-pools \
        --enable-htcp \
        --enable-poll \
        --enable-cache-digests \
        --enable-underscores \
        $(arch)-debian-$(system)

Where $(arch) is i386 or alpha or sparc etc and $(system) is linux or hurd.

[1] For the Hurd squid is compiled without aufs and pthread support

Mezhdu drugoto za poll() i select() si prav , poll() e za predpo4itane no 
nali squida e portable za mnogo Unices , oba4e pri nqkoj ot tqh (no ne i na 
Linux!)  poll()-a e broken , za tova po default se polzva select() , i samo s 
izri4na opciq --enable-poll() se zabranqva select()-a i ostava samo na 
poll(). Btm ima i drugi interesni opcii na configure-to kato auth_modules (za 
Proxy Auth) i --eneble-netfilter-linux ... 

--- 
Greets, 
fr11zb1
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.