Velocizzando dragas

[italian]

Tempo fa ho annunciato la migrazione di dragas (.org, .net e di tutti i domini in che ospito) verso una piattaforma OpenVZ e un'architettura Via EPIA. Il principale problema e' stato sempre quello di una scarsa potenza di CPU per l'esecuzione di alcune operazioni intensive, come il controllo antivirus e l'esecuzione di pagine PHP. Il primo l'ho risolto installando Clamav come demone (clamd), a scapito di qualche decina di megabyte di RAM, per il secondo mi limitai ad installare il plugin WP-Cache di Wordpress. Il problema era alleviato ma restava abbastanza marcato nei confronti delle altre pagine PHP.

Ieri mi sono imbattuto nel progetto xcache, nato in seno a lighttpd ma funzionante anche con Apache e IIS. Avevo gia' valutato di passare tutta l'architettura a lighttpd ma ho qualche piccolo problema di importazione della configurazione e ho quindi deciso di rimandare di un po'.

Ho trovato il pacchetto Debian nel repository ufficiale e l'ho installato. Dopo qualche piccola sistemazione di configurazione ho notato che faceva davvero bene il suo mestiere: una volta compilate le pagine PHP, infatti, ne tiene il risultato in memoria in attesa di riutilizzarlo. Non memorizza quindi le pagine html generate ma direttamente il codice oggetto usato per generarle, accelerando moltissimo l'elaborazione (che, comunque, resta dinamica). Il risultato? Ottimo: il piccolo Via EPIA ha di nuovo respiro e le pagine arrivano in maniera rapidissima al browser.

Prossimi item:

  • qualche altra sistemazione e ottimizzazione

  • passaggio a lighttpd

Intanto, comunque, mi ritengo soddisfatto

[/italian]

[english]

Some time ago I announced dragas' s (.org, .net and all hosted domanins') migration to an OpenVZ platform and to a Via EPIA architecture. The main problem has always been a weak CPU that slowed down all the strong operations like anti-virus check of the e-mails and PHP generation. I could solve the first one installing Clamav as daemon, using clamd (wasting some RAM), for the second one I just installed the WP-Cache Wordpress plugin. It helped, but I had still big performance issues with the general PHP pages and the MediaWiki ones.

Yesterday I discovered the xcache project, part of lighttpd but also working perfectly with Apache and IIS. I had already planned to migrate my Apache installation into lighttpd but I had some problems importing the configurations and decided to delay a little bit.

I've found the Debian package on the official repository and I've installed it. After some tweakings I noticed it was really doing a good job: after compiling the PHP pages, it keeps the object files in memory and re-use them as soon as possible. It doesn't just cache the resulting html file but allows system to compile new PHP code in a very fast way. The result is a dynamic elaboration of the PHP files, but much faster than before. The performance is excellent: the little Via EPIA is quite fast in providing pages and the system load is low.

Next targets:

  • some other tweakings

  • migration to lighttpd

Anyway, I'm quite satisfied with my results.

[/english]

Commenti