Bug 172899 - Very poor CGI performance with hundreds of hosts on httpd
Very poor CGI performance with hundreds of hosts on httpd
Status: CLOSED DEFERRED
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: httpd (Show other bugs)
4.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Joe Orton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-10 17:29 EST by Renato
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-11 09:22:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Renato 2005-11-10 17:29:56 EST
Description of problem:

Very poor performance serving CGI scripts on a virtual hosting environment 
(hundreds of sites)

Version-Release number of selected component (if applicable):

httpd-2.0.52-19.ent

How reproducible:

1. Create a httpd.conf with 1500 websites. Every VirtualHost section should be 
like this:

<VirtualHost xxxx>
ServerName testXXX
ServerAlias testXXX.com
ServerAdmin webmaster@testXXX.com
DocumentRoot /home/testXXX/public_html
ScriptAlias /cgi-local/ /home/testXXX/public_html/cgi-local/
SetEnv LOG_SUBDIR testXXX
SuexecUserGroup testXXX testXXX
php_admin_value doc_root /home/testXXX
php_admin_value open_basedir /home/testXXX
php_admin_value upload_tmp_dir /home/testXXX/tmp
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>
<VirtualHost xxxx:443>
ServerName testXXX
ServerAlias testXXX.com
ServerAdmin webmaster@testXXX.com
DocumentRoot /home/testXXX/public_html
ScriptAlias /cgi-local/ /home/testXXX/public_html/cgi-local/
SetEnv LOG_SUBDIR testXXX
SuexecUserGroup testXXX testXXX
php_admin_value doc_root /home/testXXX
php_admin_value open_basedir /home/testXXX
php_admin_value upload_tmp_dir /home/testXXX/tmp
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

2. create a simple script:

#!/usr/bin/perl

print "Content-Type: text/html\n\n";
print "Test!!";

3. execute on the web
  
Actual results:

In a Dual Xeon, zero load, it takes 2 seconds to run.

Expected results:


Additional info:

I did some straces:

strace -T -f -p xxxxx

[pid 30864] read(4, "", 4096)           = 0 <0.000022>
[pid 30864] close(4)                    = 0 <0.000016>
[pid 30864] read(3, "", 4096)           = 0 <0.000014>
[pid 30864] close(3)                    = 0 <0.000012>
[pid 30864] write(1, "Content-Type: text/html\n\nTest"..., 72) = 72 <0.000020>
[pid 30785] <... poll resumed> [{fd=26, events=POLLIN, revents=POLLIN}, {fd=28, 
events=POLLIN}], 2, 30000) = 1 <1.720682>

It looks like returning to the main process is the bottle neck. poll() itself 
is taking too long to execute.

Let me know what other information you need.
Comment 1 Renato 2005-11-11 09:22:11 EST
I narrowed down the problem. If I take the the mod_jk directives, it works 
fine. So I assume it doesn´t scale up well. I´ll open a bug report on jakarta.

Thanks for your time.

Note You need to log in before you can comment on or make changes to this bug.