![]() |
|
#1
|
|||
|
|||
|
PHP opcode Cache that work with suPHP?
Hi,
I have a question if there is any PHP opcode cache that really work with suPHP? I've used suPHP before and found that my server was always overloaded. (load average is more than 20 most of the time.) Then, I decided to try PHP CLI, it worked a bit better. (load is about 14 - 18) Then, right after I've installed xCache. My load went below 2 which is normal for a Quad CPU. I, then, switched back to PHP CGI but now with xCache installed. That didn't help at all. My load went back to more than 20 again. So, I had to switch back to PHP CLI again. Today, I found that xCache doesn't work with suPHP. I also saw an article somewhere said eAccelerator doesn't work with suPHP either. Another article about APC + suPHP said that it cache some of PHP code but very less. Any idea? Thanks, |
|
#2
|
|||
|
|||
|
Hi,
Did you ever find any alternatives?
__________________
DNSCluster.co.uk .:. your one stop, multiple node, geographically dispersed, failover DNS Cluster provider! |
|
#3
|
||||
|
||||
|
would like to know also .
__________________
Using CentOS 5 with DirectAdmin 1.35.1 Apache 2.2.15 - Php 5.2.12 - MySQL 5.0.90- Named 9.3.6 -ProFTPd 1.3.3 dovecot 1.2.10 phpMyAdmin-3.3.1-all Openssl 1.0.0-beta5 Openssh 5.4p1 Suhosin 0.9.29 |
|
#4
|
||||
|
||||
|
you must install fcgi which currently is not supported by directadmin.
|
|
#5
|
||||
|
||||
|
that mean directadmin will stop working?
__________________
Using CentOS 5 with DirectAdmin 1.35.1 Apache 2.2.15 - Php 5.2.12 - MySQL 5.0.90- Named 9.3.6 -ProFTPd 1.3.3 dovecot 1.2.10 phpMyAdmin-3.3.1-all Openssl 1.0.0-beta5 Openssh 5.4p1 Suhosin 0.9.29 |
|
#6
|
||||
|
||||
|
that means that you have to install it manual.
|
|
#7
|
|||
|
|||
|
Do you have a tutorial on how to install them manually?
|
|
#8
|
||||
|
||||
|
tillo made one before some time :
http://www.directadmin.com/forum/sho...&postcount=450 but read this first : http://directadmin.com/forum/showthr...ht=fcgi&page=1 |
|
#9
|
||||
|
||||
|
I would like to add that the reason any opcode cacher (APC, XCache, eAccelerator etc.) won't work with suPHP or direct CGI is because opcode caching works only on persistent PHP instances: the opcode (result of the interpretation of a PHP script) is cached in (shared, between threads and childs) memory and if PHP is killed and restarted for any page... well, there is no advantage at all, it is even worst.
The PHP module for Apache creates a persistent instance, as does FastCGI. Those are the only ways I known about, and since mod_php does not allow separated, setuid/setgid instances by user (unless using one of the many experimental modules for Apache that do that) I guess FastCGI is the only secured way to allow opcode caching on shared production systems.
__________________
Martino Dell'Ambrogio <tillo@tillo.ch> http://www.tillo.ch/ Security Auditor Willing to reward my help? Visit my Amazon.com Wish List. Thanks!
Last edited by tillo; 12-30-2009 at 01:57 AM. |
|
#10
|
|||
|
|||
|
Quote:
|
|
#11
|
||||
|
||||
|
I am not having 500 errors since I have been using APC instead of XCache, but this may not apply to everyone: I have uncommon PHP software running.
The improvement I experienced is outstanding (server was stalling for minutes, with up to 200 CPU+IO load, because of certain PHP compilations and now it's almost idle), but again this may not apply to everyone: if you have many low traffic websites opcode caching is not the solution, unless you have massive amount of memory (to store ALL of the opcode) or, instead, you select caching only for the most visited websites.
__________________
Martino Dell'Ambrogio <tillo@tillo.ch> http://www.tillo.ch/ Security Auditor Willing to reward my help? Visit my Amazon.com Wish List. Thanks!
|
|
#12
|
|||
|
|||
|
Thanks tillo Ill try to follow your tutorial and see what happends
|
|
#13
|
|||
|
|||
|
tillo, before all - thank yoou for your tutorial. Before I start make changes ona my vps i have a question: it is possible to switch fastcgi + apc mode for only one domain, and others work on standard mode cgi/suphp? Because i have about 30 webpages but only two of them needs speed-kick ;-).
On vps i have 384MB RAM / 768 swap and i worry about if all webpages uses fastcgi there will be not enough memory for all. Is it possible and - if yes - how to do this? Last edited by Magician; 01-31-2010 at 05:04 PM. |
|
#14
|
||||
|
||||
|
You can run two separate versions of PHP (for example, 4.x and 5.x) and run one as fastcgi, and one as httpd module. You can not run different or the same minor versions that way, though.
Hopefully someone else can tell you how; I don't remember the details and I don't have time to look it up. Jeff
__________________
Jeff Lasman <directadmin@nobaloney.net> +1 951 643-5345 Third-Party DirectAdmin administration and support Dedicated Servers, Dedicated Reseller Accounts NoBaloney Internet Services P.O. Box 52200 Riverside, Calif. 92517 |
![]() |
| Tags |
| apc, eaccelerator, php, suphp, xcache |
| Thread Tools | |
| Display Modes | |
|
|