NuSphere Forums Forum Index
NuSphere Forums
Reply to topic


Joined: 23 Mar 2009
Posts: 8
Reply with quote
Well It will be my pleasure to give the results I will get on the server I "sacrificed" for testing.
It's a server where I gathered a lot of the clients that caused high load. They have been notified about this and since they had 2 choices, to move there or to buy something expensive they agreed to let me "study" on them.
Anyway right now I have a strange problem regarding phpexpress. If I call the fast-cgi php directly the extension is loaded fine but if I call for example a php script with phpinfo() through Apache the extension will not load, without any errors. Probably I missed something as always Smile

Yes, mod_php so far seems to process php code faster. Fastcgi eats a lot of memory since I have at least 1 process per site (suexec/security a.s.o) but I can use KeepAlive with worker and even load php extensions only for the websites that really need them.

By the way, cPanel will compile php as threadsafe if you select worker (since they offer you the posibility to switch to dso and fcgi) so anyone that would like to use a non threadsafe ext with fastcgi and worker will need to compile php manually.

small update:
never mind the loading of phpexpress that did not work through apache, It was my fault.
View user's profileFind all posts by TomoiagaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
yep, php running as FastCGI requires more memory than mod_php, but each next process will require much less because code segments will be shared across all running FastCGI processes. Increments will be about the same as in case of mod_php.
If you test single-connection, you'll get mod_php much faster. But in case of server loaded with lot of plain file (non-script) requests, it's not that predictable which one configuration will be faster.

Regarding PhpExpress, it works under FastCGI only as a loader for scripts encoded with nu-coder. Cache functionality is not compatible with FastCGI and is turned off. If you don't see PhpExpress in phpinfo at all, check error_log. Btw don't forget to turn it on first, create the file and adjust its permissions to allow the account under which you're running FastCGI to write to the file. Check that you can write to the file from php script.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Mar 2009
Posts: 8
Reply with quote
well, PhpExpress works ok now, with FastCGI I can load it only for the sites that need it.
Anyway my problem now is the memory usage, not related to phpexpress. Seems php with FastCGI (and suexec) will eat up all the memory on the server (around 5 GB for 130-160 php-fastcgi processes) depending on the number of requests and the number of site accessed. I guess I will have to see if there is anything I can improve here.
View user's profileFind all posts by TomoiagaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Thanks. Please keep us posted with your findings.

Regarding php footprint, please try to trun Zend memory manger off. See the environement variables I mentioned before, it's what you'd set for the process running FastCGI handlers (check phpinfo output to see if the variable is actually set)

And please note thant you need 160 FsatCGI processes only if you need to handle 160 requests with php simultaneously (the requests are overlapped in time). For sequentially running requests, you'd need only one process Smile (but it scales very poor:)). You may want to check the master process settings to see if you can limit number of FastCGI handlers it runs simultaneously. Try to set 100 or 80 and check overal performance.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Apache Worker, PHP, and PhpExpress
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 2  

  
  
 Reply to topic