Author |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Sat 18 May '19 10:33 Post subject: |
|
|
Hello,
How can I run php as module now?
Have i to delete fcgi settings from my vhost and to configure Apache to see only one php version with the path of it?
Can you please help me with Apache mom? What I have to look for?
Thank you one more time.
Regards,
George |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Sat 18 May '19 16:39 Post subject: |
|
|
Hello again,
i was trying to configure the server not to use fcgi.
With pgp 5.4 i had a problem to do that.
With php 5.6 i had problem to start the server, but i redownload a verison 5.6.30 for fot x64, and it worked.
Again the prerformance is at 50% slower than the old server x84 apache 2.2 php 5.4.11.
Is there a diference in performance between x86 and x64 versions?
Sorry for my instead on the thread, but i want to have a server in a sufficient good performance as was my old server.
Also i want to thank you all for your time and knowledge.
Regards,
George |
|
Back to top |
|
ndricim
Joined: 19 Mar 2018 Posts: 4 Location: Kosovo, Ferizaj
|
Posted: Sat 18 May '19 21:49 Post subject: |
|
|
geolits, do you use local DNS resolver? |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Sat 18 May '19 22:20 Post subject: |
|
|
Hello,
I'm using real dns server, with cnames. If are you talking abou that.
If you mean something else please explain me. Maybe I don't understand the question.
Regards,
George |
|
Back to top |
|
ndricim
Joined: 19 Mar 2018 Posts: 4 Location: Kosovo, Ferizaj
|
Posted: Sat 18 May '19 22:46 Post subject: |
|
|
geolits wrote: | Hello,
I'm using real dns server, with cnames. If are you talking abou that.
If you mean something else please explain me. Maybe I don't understand the question.
Regards,
George |
Sorry, I had same(low performance on web server) problem with my setup my old server(HDD) was working batter then the new one with SSD on it with the same apache setup and configs, and I was using my local DNS Server to resolve querys and the problem was on it(DNS Server), the Disable recursion option was checked.
That was my problem. |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Sat 18 May '19 22:57 Post subject: |
|
|
Don't be sorry ndricim.
I'm using the same dns server for both old and new Apache server.
So I think so this is not have to do with my problem.
But maybe your resolution will help someone else.
Thank you for your consideration.
Regards,
George |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
Posted: Mon 20 May '19 10:33 Post subject: |
|
|
Hi George,
for the module
Code: | LoadModule php7_module "c:/php7/php7apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/php7" |
And remove or comment out
Code: | AddHandler fcgid-script .php
FcgidWrapper "C:/php7/php-cgi.exe" .php
|
|
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Mon 20 May '19 13:26 Post subject: |
|
|
Hi James, i wrote before the answer:
Hello again,
i was trying to configure the server not to use fcgi.
With pgp 5.4 i had a problem to do that.
With php 5.6 i had problem to start the server, but i redownload a verison 5.6.30 for fot x64, and it worked.
Again the prerformance is at 50% slower than the old server x84 apache 2.2 php 5.4.11.
Is there a diference in performance between x86 and x64 versions?
Sorry for my instead on the thread, but i want to have a server in a sufficient good performance as was my old server.
Also i want to thank you all for your time and knowledge.
Regards,
George |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
Posted: Mon 20 May '19 16:36 Post subject: |
|
|
First the mpm question:
Code: | # WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxConnectionsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxConnectionsPerChild 0
</IfModule> |
ThreadsPerChild is the max number of questions you can have at the same time on your server.
MaxConnectionsPerChild is the number of requests until apache restarts the child. Note that apache on windows has only one child with the number of threads you have set with ThreadsPerChild.
Why only PHP 5.6? 7.3 is a lot faster. Also 5.6 and 7.0 are no longer supported.
Quote: |
Is there a difference in performance between x86 and x64 versions? |
I didn't see any. But You see that the NTS (non threads safe version is faster than the TS ( thread safe version). Note that the NTS version can only be used with f(ast)cgi(d).
From your screen shots I see that the transfer rate is a lot higher on the old server. 181 kb/s vs ~ 450kb/s. Are both server the same way connected? |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Wed 22 May '19 19:02 Post subject: |
|
|
Hi James,
1) About mpm. Do you mean to use it?
Is this available at all php versions? php 5.4, 5.6 & 7.3?
If yes, Do you suggest the values did you post in your previous answer?
2) Do you think, that with the two configurations:
i) More Ram
ii) Better CPU
iii) php 5.6 x64 instead php 5.4 x86
iv) Apache 2.4 instead apache 2.2
v) Without fcgi now.
I have to enable mpm, or to have a comparable configuration with the old server? So to get some comparable speed between old and new one server at first without to enable any extra boost at the new server?
3) I was trying to use php 5.4, so to can do a comparison with my old server. But i couldn't use php 5.4 with apache 2.4 x64.
So i used php5.6
With php 7.3 i have a significant speed in the website, but with the ab test i cant see this significant speed too.
4) The two servers are with the same way connected and under the same ipsec rules.
But i want to see tommorow, if there is a big difference in newtwork cards. I hope so, because the old one was a simple pc and the new one is a fujitsu siemens server, there will not be a significant differnece in the nic.
Thank you again!
Regards,
George |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
Posted: Thu 23 May '19 11:41 Post subject: |
|
|
geolits wrote: | Hi James,
1) About mpm. Do you mean to use it?
Is this available at all php versions? php 5.4, 5.6 & 7.3?
|
MPM is the motor / engine from apache. See https://httpd.apache.org/docs/2.4/en/mpm.html
geolits wrote: |
If yes, Do you suggest the values did you post in your previous answer?
|
150 is the not a default value, but maybe you need a higher number if you need more parallel requests.
Do some benchmarks and see what fits best for you. However the default value for winnt MPM is 25. So 150 might work for you.
geolits wrote: |
2) Do you think, that with the two configurations:
i) More Ram
ii) Better CPU
iii) php 5.6 x64 instead php 5.4 x86
iv) Apache 2.4 instead apache 2.2
v) Without fcgi now.
|
i) more in that case is better, since the OS will use the RAM instead of the hardrive.
ii) a faster CPU is often better for PHP rather than even more cores. But you need at least 2 cores
geolits wrote: |
I have to enable mpm, or to have a comparable configuration with the old server? So to get some comparable speed between old and new one server at first without to enable any extra boost at the new server?
|
on Windows you always use winnt MPM. No other chance.
geolits wrote: |
With php 7.3 i have a significant speed in the website, but with the ab test i cant see this significant speed too.
|
So you are going to use that version?
if you still have a question please ask again. |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Thu 23 May '19 15:03 Post subject: |
|
|
Hello James,
i just saw that my new server has the same network cards "1000Mbit", also both are connected to the network with a 100Mbit Switch.
I tested hard drives too, with the "CrystalDiskMark", which shows that the the new server has a slightly faster Hard Drive (even if the new server is on RAID 1, the old one has no RAID).
At the old server i use php 5.4 Thread Safe, and at the new now php 5.6 Non thread safe, without fcgi.
At 1)
I added the MPM configuration at httpd.conf
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxConnectionsPerChild 0
</IfModule>
Again i didn't took very good performance
https://ibb.co/xgrPQ20
At 3) Yes i'll go to use php 7.3. But first i want the server to have a better performance at previous php versions.
Thank you again.
Best Regards,
George |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Fri 24 May '19 9:36 Post subject: |
|
|
Hello,
sorry James, you have right.
I had php5.6 No Thread Safe, in use with fcgi.
I had downloaded php5.6. thread safe to use it as module.
The picture in my previous post is with php 5.6 Thread Safe.
With fcgi it is better to use NTS php?
Thank again.
Regards,
George |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
Posted: Mon 27 May '19 9:08 Post subject: |
|
|
Hi George,
with fcgid you can run NTS. NTS is (a little) faster, since it doesn't need to check for thread safety. It is fails and crashes, apache just starts a new process. |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Thu 30 May '19 15:11 Post subject: |
|
|
Hello,
i'm trying to setup the server from scratch.
i'm following the instructions here:
https://www.apachelounge.com/viewtopic.php?t=2394
This code:
Code: | <IfModule fcgid_module>
FcgidMaxProcesses 300
FcgidMaxProcessesPerClass 300
FcgidOutputBufferSize 65536
FcgidConnectTimeout 10
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidMinProcessesPerClass 0
FcgidFixPathinfo 0
FcgidProcessLifeTime 0
FcgidZombieScanInterval 20
FcgidMaxRequestLen 536870912
FcgidIOTimeout 120
FcgidTimeScore 3
FcgidPassHeader Authorization
FcgidInitialEnv PHPRC "C:\\php7"
FcgidInitialEnv PATH "C:\\php7;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"
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "C:/php7/php-cgi.exe" .php
</Files>
</IfModule> |
Is going in httpd.conf? Or at httpd-default.conf?
Thank you |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Mon 10 Jun '19 16:29 Post subject: |
|
|
Hello,
trying to set up again all from scratch, following the isntrucstions from here: https://www.apachelounge.com/viewtopic.php?t=2394
When i enable this line:
zend_extension=php_opcache.dll
when i'm trying to navigate to my website, a joomla website, i get my first page, but in any link i'm trying to open i get a 500 inetran error.
Also at the logs i take this:
Quote: | [Mon Jun 10 17:02:14.967256 2019] [fcgid:warn] [pid 1916:tid 1100] (OS 109)The pipe has been ended. : [client ] mod_fcgid: get overlap result error, referer: http://xxxx.xxx.xx/
[Mon Jun 10 17:02:14.967256 2019] [core:error] [pid 1916:tid 1100] [client ] End of script output before headers: index.php, referer: http://xxxx.xxx.xx// |
If i comment the line "zend_extension=php_opcache.dll" all are working perfectly.
Do you have any idea why i have this errors?
Best regards,
George |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Tue 11 Jun '19 10:13 Post subject: |
|
|
Hello again,
also i have observed that with the "zend_extension=php_opcache.dll" commented or not, the performance with the "apache benchmark", is identical.
Again with php7 and fcgi to be slower from the old server without fcgi and php 5.4
Apache 2.4, php 7.3.3, fcgi 2.3.9, zend_extension=php_opcache.dll commented:
https://ibb.co/zxxbcxP
Apache 2.4, php 7.3.3, fcgi 2.3.9, zend_extension=php_opcache.dll not commented:
https://ibb.co/y4KQmV4
Any suggestions?
Best Regards,
George |
|
Back to top |
|
geolits
Joined: 12 Apr 2019 Posts: 27 Location: Greece
|
Posted: Tue 11 Jun '19 10:37 Post subject: |
|
|
Trying the test at a phpMyAdmin login page, with the "zend_extension=php_opcache.dll" enabled, i get about 3 times better results.
I dont understand what is going wrong with the Joomla web site.
Any idea will be helpful.
Thank you. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7294 Location: Germany, Next to Hamburg
|
Posted: Tue 11 Jun '19 13:15 Post subject: |
|
|
The opcache must be loaded as the very last extension (except xdebug, which not recommended to use in production)
try on the comment line with php-cgi.exe -m if it loads at all.
---edit ---
Also turn on startup errors
display_startup_errors = On |
|
Back to top |
|