eAccelerator, php-apc, memcached or other..

  • Hey Community,


    what PHP accelerator is recommended ?


    I don´t want to change too much on my iMSCP Server now. So that i can use the default update way in future. On ispCP i used eAccelerator. But needed to recompile it on every new Apache Version :-/


    Thanks & Greez
    BeNe

  • Moin BeNe,



    Hey Community,


    what PHP accelerator is recommended ?


    I don´t want to change too much on my iMSCP Server now. So that i can use the default update way in future. On ispCP i used eAccelerator. But needed to recompile it on every new Apache Version :-/


    I really like APC in this case, but it makes some trouble with fcgid.
    So Bad.


    No other tips here.
    On our systems PHP only is used with TYPO3 and that has it own
    caching-system and if you want more you could use varnish etc.



    tom

  • Quote

    I really like APC in this case, but it makes some trouble with fcgid.


    What kind of trouble? I've been using mod_fcgid + apc like... forever. The only problem is that the cache is *not* shared between php-cgi process instances (even when the instances are for the same user). Aside from that, everything should work correctly...

  • What kind of trouble? I've been using mod_fcgid + apc like... forever. The only problem is that the cache is *not* shared between php-cgi process instances (even when the instances are for the same user). Aside from that, everything should work correctly...


    Isnt it trouble enogh?
    BeNE wrote, that he dont want to change too much on his imscp,
    so I understand this not write an own php-wrapper and/or play with PHP_FCGI_CHILDREN etc. There are enough docs around.



    tom

  • Quote


    Isnt it trouble enogh?
    BeNE wrote, that he dont want to change too much on his imscp,
    so I understand this not write an own php-wrapper and/or play with PHP_FCGI_CHILDREN etc. There are enough docs around.


    There is no trouble at all. Simply put, you will have one (separate) cache for each process. It's not a big deal, just (a little) more work to populate those. Further, there is no point in fiddling with PHP_FCGI_CHILDREN stuff when using mod_fcgid, for the simple reason that mod_fcgid can not communicate with php's spawned children. If you set your PHP_FCGI_CHILDREN higher than imscp's default of 0, and you are using mod_fcgid, you simply tried to be too smart and got bitten by it. Any php spawned children are just sitting there without doing anything, besides wasting memory of course.


    Therefore, the best possible route here is to simply install apc...

    Code
    1. apt-get install php-apc


    ... and forget about it, which is hassle-free enough for me and does not require any panel modification.


    If you want to go fancy, you can install the panel with mod_fastcgi instead (which *does* use multiple children as per the latest master version of i-mscp). However, mod_fastcgi is known to cause issues when it is in charge of spawning master php processes (as is the case without php5-fpm). Integration of php5-fpm is a task on our wishlist, but we are not rushing for it because it is only supported on debian wheezy or higher.


    PS: I have spent a lot of time looking into these issues. And yes, I am the guy who chose the imscp's different defaults for the different apache modules.

    Edited once, last by kilburn ().