Author |
|
maskego
Joined: 16 Apr 2010 Posts: 238
|
Posted: Tue 09 Oct '12 12:35 Post subject: mod_fcgid high performance settings ? |
|
|
Admin note: splitted from www.apachelounge.com/viewtopic.php?t=4981
James:
Can you provide your mod_fcgid high performance setting there for reference? 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: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 09 Oct '12 12:54 Post subject: |
|
|
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
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
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
|
Posted: Tue 09 Oct '12 14:26 Post subject: |
|
|
There are two directives to define the same item.
FcgidIOTimeout 40
FcgidIOTimeout 120
Which one is the right one?
And,how about your system resources?Two cores,8 GB RAM? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 09 Oct '12 14:41 Post subject: |
|
|
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
|
Posted: Thu 11 Oct '12 2:26 Post subject: |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 11 Oct '12 9:40 Post subject: |
|
|
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
|
Posted: Thu 11 Oct '12 11:41 Post subject: |
|
|
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?
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 11 Oct '12 20:17 Post subject: |
|
|
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
|
Posted: Tue 19 Mar '13 23:50 Post subject: |
|
|
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
|
Posted: Wed 20 Mar '13 7:26 Post subject: |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 20 Mar '13 12:54 Post subject: |
|
|
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 |
|
Back to top |
|