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 -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_fcgid high performance settings ?
Author
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Tue 09 Oct '12 12:35    Post subject: mod_fcgid high performance settings ? Reply with quote

Admin note: splitted from www.apachelounge.com/viewtopic.php?t=4981


James:

Can you provide your mod_fcgid high performance setting there for reference? Smile Much thanks.

James Blond wrote:


To increase the performance I let never die a php-cgi process from apache. it might happen when something goes very wrong that I kill a single php-cgi process by hand.
Back to top
James Blond
Moderator


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

PostPosted: Tue 09 Oct '12 12:54    Post subject: Reply with quote

Sure, I can. I noticed that more than 300 php-cgi processes burned my CPU. So if there is still more power needed, I use an apache as loadbalancer and 2 to n machines as backend server where I run that setup. And than a second cluster with MySQL servers.

More power needed? More hardware Wink
Indeed upscaling would work, too but vertical scaling means with even more usag you can go some kinda day into the cloud if you software can Wink

Code:

<IfModule fcgid_module>
   FcgidInitialEnv PHPRC "C:\\php-5.4.7-Win32-VC9-x86"
   FcgidInitialEnv PATH "C:\php-5.4.7-Win32-VC9-x86;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
   FcgidInitialEnv SystemRoot "C:\\Windows"
   FcgidInitialEnv SystemDrive "C:"
   FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv windir "C:\\WINDOWS"
   FcgidIOTimeout 40
   FcgidConnectTimeout 10
   
   FcgidMaxProcesses 300
   FcgidMaxProcessesPerClass 300
   
   FcgidOutputBufferSize 64
   ProcessLifeTime 0
   FcgidMaxRequestsPerProcess 0
   FcgidMinProcessesPerClass 0
   FcgidFixPathinfo 1
   FcgidProcessLifeTime 0
   FcgidZombieScanInterval 20
   FcgidMaxRequestLen 536870912
   FcgidIOTimeout 120
   FcgidTimeScore 3

   <Files ~ "\.php$">
      Options Indexes FollowSymLinks ExecCGI
      AddHandler fcgid-script .php
      FcgidWrapper "C:/php-5.4.7-Win32-VC9-x86/php-cgi.exe" .php
   </Files>
</IfModule>
Back to top
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Tue 09 Oct '12 14:26    Post subject: Reply with quote

There are two directives to define the same item.
FcgidIOTimeout 40
FcgidIOTimeout 120
Which one is the right one? Smile

And,how about your system resources?Two cores,8 GB RAM? Smile
Back to top
James Blond
Moderator


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

PostPosted: Tue 09 Oct '12 14:41    Post subject: Reply with quote

The 40 seconds is the right one.

It is 4 cores, 8 GB Ram, 80 GB SATA 15k rpm
The performance depends on what software / PHP scripts are running.
Back to top
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Thu 11 Oct '12 2:26    Post subject: Reply with quote

By the way,if use php64bit fcgid,does the performance become more high than now 32bit fcgid?Or just a little bit of fast?
Back to top
James Blond
Moderator


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

PostPosted: Thu 11 Oct '12 9:40    Post subject: Reply with quote

You mean PHP in 32 bit / 64 bit or apache and the module? When it comes to PHP use the 32 bit variant. It is offical supported and runs a very litte faster than the 64 bit version.
Back to top
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Thu 11 Oct '12 11:41    Post subject: Reply with quote

I mean the officeal php in 32bit.I know there is no offical 64bit php version.

There is no meaning if php 32bit is a little faster than 64bit php.So,no waste time to search or compile offical php32bit to php64bit. Right? Smile

James Blond wrote:
You mean PHP in 32 bit / 64 bit or apache and the module? When it comes to PHP use the 32 bit variant. It is offical supported and runs a very litte faster than the 64 bit version.
Back to top
James Blond
Moderator


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

PostPosted: Thu 11 Oct '12 20:17    Post subject: Reply with quote

The php binaries from windows.php.net are compiled under the best condition unless you you need an exotic php extension. Yes why waste time with compiling it yourself or search for it.
Back to top
PanchoJ



Joined: 25 Oct 2012
Posts: 11
Location: Australia

PostPosted: Tue 19 Mar '13 23:50    Post subject: Reply with quote

In the above fcgid config you have the following line
FcgidInitialEnv PATH "C:\php-5.4.7-Win32-VC9-x86;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"

Can you please explain what the following path is C:\\WINDOWS\\System32\\Wbem
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Wed 20 Mar '13 7:26    Post subject: Reply with quote

What about PHP_FCGI_MAX_REQUESTS ?

Quote:
To increase the performance I let never die a php-cgi process from apache


But it defaults to 500, doesn't it?
In my environment, I had to set both PHP_FCGI_MAX_REQUESTS and FcgidMaxRequestsPerProcess to make it go beyond 500 requests.
Back to top
James Blond
Moderator


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

PostPosted: Wed 20 Mar '13 12:54    Post subject: Reply with quote

PanchoJ wrote:

Can you please explain what the following path is C:\\WINDOWS\\System32\\Wbem


the Wbem is related to WMI (Windows Management Instrumentation) and Web-Based Enterprise Management and some Windows servives. If you work with the com dot net extension it is recommend Wink
Back to top


Reply to topic   Topic: mod_fcgid high performance settings ? View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules