Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

As you know, even if it is possible to start httpd in worker mode under CentOS/RedHat, php in default rpm repo is not thread-safe. And the default configuration for stability is mpm_prefork. So, two questions:

  • Is there PHP accelerator capable of working in mpm_prefork mode (using shm or whatever)?

  • If there is none, what can be done to improve PHP speed on CentOS/RedHat systems (I want to use rpms, preferably from default CentOS repo; building custom PHP from source code is not a good option for me)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

As long as you are using php <5.3, apc, xcache, eacellerator will all work with prefork. Some require the php5-dev libraries to be installed which should be packaged already, and the opcode caches may already be prepackaged for you.

If you wanted to use worker, you can use fcgid or fastcgi to handle php which would allow you to use worker, and would spawn php-cgi processes to handle your php files.

share|improve this answer
    
Is, for example, APC effective in prefork? It seems, that it will store php cache per process, right? And each time php-cgi is called, the cache is rebuild, effectively removing all speed-up. –  Vladislav Rastrusny Apr 18 '10 at 20:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.