logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod_fcgid performance versus Server API
Author
sarniso



Joined: 10 Jun 2020
Posts: 3
Location: UK

PostPosted: Wed 10 Jun '20 10:02    Post subject: mod_fcgid performance versus Server API Reply with quote

Hi folks
Running Apache 2.4.41 on Win Server 2019 , i7 processor with 8Gb ram (3.8ghz)....
Installed mod_fcgid on server above with PHP 7.3.12. No errors that I see in Apache.log .. but Wow performance with mod_fcgid is AWFUL compared to native API in Apache . I ran a ab benchmark twice, first with mod_fcgid enabled , then off. Here are the results , can someone help me understand why it is SOO much slower with mod_fcgid installed ??? I thought mod_fcgid was supposed to make things 5-20 times faster !!
First test with 100k req, 500 concurrency took 64 secs, second same test on same box , 2 seconds.!!!!

Code:

ab -n 100000 -c 500 http://localhost/phpinfo.php
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests


Server Software:        Apache/2.4.41
Server Hostname:        localhost
Server Port:            80

Document Path:          /phpinfo.php
Document Length:        87336 bytes

Concurrency Level:      500
Time taken for tests:   197.838 seconds
Complete requests:      100000
Failed requests:        10359
   (Connect: 0, Receive: 0, Length: 10359, Exceptions: 0)
Non-2xx responses:      439
Total transferred:      8717340316 bytes
HTML transferred:       8695432853 bytes
Requests per second:    505.46 [#/sec] (mean)
Time per request:       989.192 [ms] (mean)
Time per request:       1.978 [ms] (mean, across all concurrent requests)
Transfer rate:          43030.23 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0      16
Processing:     0  975 6226.2      0   64564
Waiting:        0  971 6226.8      0   64564
Total:          0  975 6226.3      0   64564

Percentage of the requests served within a certain time (ms)
  50%      0
  66%     16
  75%     16
  80%     16
  90%     16
  95%   1018
  98%  16121
  99%  37213
 100%  64564 (longest request)






Code:


ab -n 100000 -c 500 http://localhost/phpinfo.php
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests


Server Software:        Apache/2.4.41
Server Hostname:        localhost
Server Port:            80

Document Path:          /phpinfo.php
Document Length:        107680 bytes

Concurrency Level:      500
Time taken for tests:   40.511 seconds
Complete requests:      100000
Failed requests:        99901
   (Connect: 0, Receive: 0, Length: 99901, Exceptions: 0)
Total transferred:      10788177369 bytes
HTML transferred:       10768377369 bytes
Requests per second:    2468.45 [#/sec] (mean)
Time per request:       202.556 [ms] (mean)
Time per request:       0.405 [ms] (mean, across all concurrent requests)
Transfer rate:          260059.13 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.8      0      16
Processing:     7  202  75.8    202    2108
Waiting:        0  177  75.7    180    2088
Total:          7  202  75.8    202    2108

Percentage of the requests served within a certain time (ms)
  50%    202
  66%    202
  75%    203
  80%    209
  90%    212
  95%    222
  98%    242
  99%    274
 100%   2108 (longest request)



Thanks
Back to top
sarniso



Joined: 10 Jun 2020
Posts: 3
Location: UK

PostPosted: Wed 10 Jun '20 11:08    Post subject: my configuration Reply with quote

I know you will ask for this too

Code:

FcgidMaxProcesses 150
FcgidMaxProcessesPerClass 15
 
FcgidOutputBufferSize 65536
FcgidConnectTimeout 500
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidMinProcessesPerClass 0
FcgidFixPathinfo 0
FcgidProcessLifeTime 0
FcgidZombieScanInterval 20
FcgidMaxRequestLen 536870912
FcgidIOTimeout 500
FcgidTimeScore 3


thanks
Back to top
sarniso



Joined: 10 Jun 2020
Posts: 3
Location: UK

PostPosted: Wed 10 Jun '20 11:35    Post subject: Local v remote Reply with quote

Tests I was running were on same server as apache was installed, however, running same tests from remote server with Apache 2.4.29 installed on it, and running ab on that server, FCGID is 30% faster accessing primary server via its internal IP address, than with it (FCGID) turned off ..... is this a network address resolution issue ? locally run ab with fast CGI off the test was unbelievably fast for the 90k page !
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 14 Jun '20 18:36    Post subject: Re: mod_fcgid performance versus Server API Reply with quote

sarniso wrote:
I thought mod_fcgid was supposed to make things 5-20 times faster !!


That is sort of correct. That number is f(ast)cgi(d) compared to plain cgi.
Back to top


Reply to topic   Topic: mod_fcgid performance versus Server API View previous topic :: View next topic
Post new topic   Forum Index -> Apache