www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Keller <kel...@bfg.com>
Subject Re: general/3301: Severe performance problems under heavy load - not noticed in apache-1.3.1
Date Wed, 11 Nov 1998 22:30:00 GMT
The following reply was made to PR general/3301; it has been noted by GNATS.

From: Ted Keller <keller@bfg.com>
To: apbugs@Apache.Org
Cc:  Subject: Re: general/3301: Severe performance problems under heavy load - not noticed
in apache-1.3.1
Date: Wed, 11 Nov 1998 17:22:08 -0500 (EST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
   Send mail to mime@docserver.cac.washington.edu for more info.
 
 ---1068940524-906137352-910657055=:1851
 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
 Content-ID: <Pine.SGI.3.96.981111172103.900C@ns1.bfg.com>
 
 
 
 Marc,
 
 I've determined the problem and have developed a fix for my environment.
 This fix will have to be generalized to be applicable to others - but the
 process of completing the fix should now be pretty straight forward.
 
 Here's the problem.....
 
 I run my apache proxy behind a socks4 firewall.  Specifically, it is a
 socks 4.2.2 firewall daemon.
 
 In general, the process of "socksifying" apache is not totally correct.
 In reality, we only want to socksify the the remote connection portion.
 All local connections do NOT want to be socksified.  
 
 The big problems occured in http_main.c.  In this routine, socks issues
 both bind and accept calls.  These were causing increased fork system
 calls (yes - socks will fork on a bind if the remote client is not ready
 to talk to it).  Forcing Apache NOT to use socks in http_main.c cleared up
 the problems.
 
 To fix it, attached are three patch files.  They modify the behavior of
 the Configure script (used to create the Makefiles), proxy_util.c (where
 most of the proxy connections are performed), proxy_ftp.c (where the
 special connections are preformed for non-pasv connections).
 
 These are SOCK4.2.2 fixes only.  Continued review should be performed for
 both SOCKS 4.3beta 2 users as well as the SOCKS5 users.  
 
 I left the connection processing if rfc1413 alone (forced to used
 non-socks connections) since I am assuming these are requesting data from
 the local client.
 
 Results of these fixes.....
 
 1. Fast performance - yet - it really outperforms the Cern proxy now -
 hands down.
 2. Significantly reduced CPU utilization - I gained back about 1/2 of my
 processor. 
 
 Please let me know if you have any questions or comments.
 
 ted keller - bfg.com
 
 
 ---1068940524-906137352-910657055=:1851
 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="proxy_util.c.patch"
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.SGI.3.96.981109191735.1851B@ns1.bfg.com>
 Content-Description: 
 
 KioqIHByb3h5X3V0aWwuYy5vcmlnCVNhdCBOb3YgIDcgMjE6MzM6MTAgMTk5
 OA0KLS0tIHByb3h5X3V0aWwuYwlTYXQgTm92ICA3IDIxOjU2OjA2IDE5OTgN
 CioqKioqKioqKioqKioqKg0KKioqIDEyMjksMTIzNSAqKioqDQotLS0gMTIy
 OSwxMjQxIC0tLS0NCiAgDQogICAgICBhcF9oYXJkX3RpbWVvdXQoInByb3h5
 IGNvbm5lY3QiLCByKTsNCiAgICAgIGRvIHsNCisgDQorICNpZmRlZiBTT0NL
 UzQNCisgCWkgPSBSY29ubmVjdChzb2NrLCAoc3RydWN0IHNvY2thZGRyICop
 IGFkZHIsIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHJfaW4pKTsNCisgI2Vsc2UN
 CiAgCWkgPSBjb25uZWN0KHNvY2ssIChzdHJ1Y3Qgc29ja2FkZHIgKikgYWRk
 ciwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcl9pbikpOw0KKyAjZW5kaWYgLyog
 U09DSzQgKi8NCisgDQogICNpZmRlZiBXSU4zMg0KICAJaWYgKGkgPT0gU09D
 S0VUX0VSUk9SKQ0KICAJICAgIGVycm5vID0gV1NBR2V0TGFzdEVycm9yKCk7
 DQo=
 ---1068940524-906137352-910657055=:1851
 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="proxy_ftp.c.patch"
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.SGI.3.96.981109191735.1851C@ns1.bfg.com>
 Content-Description: 
 
 KioqIHByb3h5X2Z0cC5jLm9yaWcJU2F0IE5vdiAg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AlpZiAoY3Nk
 ID09IC0xKSB7DQogIAkgICAgYXBfbG9nX3JlcnJvcihBUExPR19NQVJLLCBB
 UExPR19FUlIsIHIsDQo=
 ---1068940524-906137352-910657055=:1851
 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="Configure.patch"
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.SGI.3.96.981109191735.1851D@ns1.bfg.com>
 Content-Description: 
 
 KioqIENvbmZpZ3VyZS5vcmlnCVdlZCBPY3QgIDcgMDU6MTk6MzAgMTk5OA0K
 LS0tIENvbmZpZ3VyZQlTYXQgTm92ICA3IDIyOjE5OjU4IDE5OTgNCioqKioq
 KioqKioqKioqKg0KKioqIDEyNzUsMTI4NSAqKioqDQogICMgb3RoZXJ3aXNl
 IHdlIGFzc3VtZSAiLUwvdXNyL2xvY2FsL2xpYiAtbHNvY2tzIg0KICBpZiBb
 ICIkUlVMRV9TT0NLUzQiID0gInllcyIgXTsgdGhlbg0KICAgICAgZWNobyAi
 ICsgZW5hYmxpbmcgU09DS1M0IHN1cHBvcnQiDQohICAgICBDRkxBR1M9IiRD
 RkxBR1MgLURTT0NLUyAtRFNPQ0tTNCINCiEgICAgIENGTEFHUz0iJENGTEFH
 UyAtRGNvbm5lY3Q9UmNvbm5lY3QgLURzZWxlY3Q9UnNlbGVjdCINCiEgICAg
 IENGTEFHUz0iJENGTEFHUyAtRGdldGhvc3RieW5hbWU9UmdldGhvc3RieW5h
 bWUiDQogICAgICBpZiBbICIuYGdyZXAgRVhUUkFfIE1ha2VmaWxlIHwgZ3Jl
 cCBsc29ja3NgIiA9IC4gXTsgdGhlbg0KISAJTElCUz0iJExJQlMgLUwvdXNy
 L2xvY2FsL2xpYiAtbHNvY2tzIg0KICAgICAgZmkNCiAgICAgIGNhc2UgJFBM
 QVQgaW4NCiAgICAgICAgICAqLXNvbGFyaXMyKiApDQotLS0gMTI3NSwxMjg3
 IC0tLS0NCiAgIyBvdGhlcndpc2Ugd2UgYXNzdW1lIC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