Rendimiento y Alta Performance: Optimizando php
Si lo que necesitamos es “rendimiento y alta performance” tenemos que recurrir a complementos y diversas técnicas que nos permitan optimizar nuestro código php y su ejecución. En este sentido destaco el uso del modulo para apache fastCGI que tiene la finalidad de cachear en memoria la compilación de los scripts php, entre otras funciones
FastCGI is a fast, open, and secure Web server interface that solves the performance problems inherent in CGI, without introducing the overhead and complexity of proprietary APIs (Application Programming Interfaces).
Para instalarlo, disponemos en debian y derivados del paquete libapache2-mod-fastcgi .
También podemos hacer uso de Turck MMCache (aparentemente discontinuado pero ampliamente usado)
Turck MMCache is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations to speed up execution of PHP scripts. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times.
Turck MMCache stores compiled PHP scripts in shared memory and execute code directly from it. It creates locks only for short time while search compiled PHP script in the cache, so one script can be executed simultaneously by several engines.
Otras altermativas: XCache
XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest PHP cvs branches such as PHP_4_3 PHP_4_4
PHP_5_0PHP_5_1 PHP_5_2 HEAD(6.x).
Por último y no menos importante esta eAccelerator (fork del primero mencionado y activamente mantenido)
eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
eAccelerator was born in December 2004 as a fork of the Turck MMCache project. Turck MMCache was created by Dmitry Stogov and much of the eAccelerator code is still based on his work.
eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can’t fit in shared memory are cached on disk only.
..va mi granito de arena para eAccelerator, será el elegido a implementar
Además, en estos sitios [1] se encuentran referencias que podremos aplicar tanto para la codificación en php como para la puesta a punto de nuestro web server
Saludos y nos vemos despues de una puesta a punto!
[1] http://phplens.com/phpeverywhere/tuning-apache-php
http://phplens.com/lens/php-book/optimizing-debugging-php.php
Aun no hay comentarios.