Archive for February 2011

Improving the performance of WordPress with Apache MPM Worker

1 commento » Apache , web log , Open Source , Tips & Tricks , Wordpress 1 Comment »

From a couple of weeks for one of my test server I upgraded Apache2 MPM bringing it from version "Prefork" to "Worker". I decided to do this test after reading some interesting posts that described a significant improvement in performance of WordPress after performing this update. The trial confirmed everything on the server in question - which no longer turns a flaming "Lenny" - I could record a net reduction in the load average during the enforcement of a large number of PHP5 FastCGI processes generated by concurrent calls WordPress, a sort of home banchwork obtained with simple PHP scripts produced themselves.

I explain quickly what constitutes the difference between the two versions of Apache, at least on issues that affect the performance of WordPress then: while the version is usually considered standard - called "Prefork" - uses a Multi-Processing Module based on the processes, the version of "workers" instead of using threads. The model "Prefork" manages a process for each connection, while the "Worker" runs a process for each group of threads and a thread for each connection. In this way, the version of "Worker" Apache2 tend to use less memory and to better distribute the calls to the processor directing them to the greatest number of cores - for this reason we tend to consider "Worker" more suitable for multicore servers, meaning that is on those who can measure the most significant performance improvements.

Beware though, the price payable may be considerably daunting for many of you can run PHP5 and mod_fcgid only way you will be forced to give up mod_php5 Apache! Think twice before so this type of operation.

The way I usually configure my server, the transition from "Prefork" to "Worker" in my case was a single command:

aptitude install apache2-mpm-worker

Aptitude immediately warned me that installing this package would lead to the removal of libapache2-mod-php5:

# aptitude install apache2-mpm-worker
Lettura della lista dei pacchetti in corso... Fatto
Generazione dell'albero delle dipendenze in corso
Lettura informazioni sullo stato... Fatto
Lettura delle informazioni sullo stato esteso
Inizializzazione dello stato dei pacchetti... Fatto
Lettura delle descrizioni dei task... Fatto
I seguenti pacchetti sono DIFETTOSI:
libapache2-mod-php5
I seguenti pacchetti NUOVI (NEW) saranno installati:
apache2-mpm-worker
I seguenti pacchetti saranno RIMOSSI:
apache2-mpm-prefork{a}
0 pacchetti aggiornati, 1 installati, 1 da rimuovere e 0 non aggiornati.
È necessario prelevare 0B/242kB di archivi. Dopo l'estrazione, verranno occupati 8192B.
I seguenti pacchetti hanno dipendenze non soddisfatte:
libapache2-mod-php5: Dipende: apache2-mpm-prefork (> 2.0.52) ma non è installabile o
apache2-mpm-itk ma non è installabile
Le seguenti azioni permetteranno di soddisfare queste dipendenze:
Rimuovere i seguenti pacchetti:
libapache2-mod-php5
Il punteggio è 119

If you decide to proceed - I repeat: to permanently renouncing mod_php5! - The installation will happen in a few seconds, usually with the final restart apache using:

/etc/init.d/apache2 restart

From this point on, you just have to enjoy the superb performance of Apache2 MPM "Worker".

In Padua, Florence and Finale Ligure official Debian Squeeze Release Party!

Nessun commento » Ads , web log , News , Open Source No Comments »

Missing just one day to the official release of the new Debian GNU / Linux 6.0 - codenamed Squeeze . The world prepares to celebrate the birth of this new version of Debian doverosissima planning a celebration that involves everyone, absolutely everyone who wants to participate: students, enthusiasts, newbie, supporters, professionals and users of all types and levels.

At the moment in Italy only three are Debian Squeeze Release Party officially registered on the site of the Linux distro: Finale Ligure , Florence and Padua .

Who is out there, do not miss to participate! Those who are somewhere else in the world - and these days you feel like if I envy them! - Can always consult the official list of parties that are held in each nation to this address: http://wiki.debian.org/ReleasePartySqueeze

GIMP: multi-resolution favicon with transparency

Nessun commento » Open Source , Tips & Tricks No Comments »

Stumble this very well done tutorial on how you can easily create favicons with GIMP . The explanation is very detailed, so I report here a brief summary.

Given that the favicons are increasingly important to quickly locate a resource within a Web browser, a bookmark manager, or even an application for mobile devices, it must be said that making a favicon differentissimi suitable for all these tools work requires some care. First of all the multiresolution: the favicon to be displayed correctly in all popular formats - 16x16px, 32x32px, 64x64px and 128x128px.

Limited to the minimum size to keep everyone happy is not an appropriate choice: we will have many applications that show the favicon Box consisting of an incomprehensible pixeloni fetched. Take only the larger sizes instead produce a complete lack of favicon support in older or who are simply not able to play the favorite icon of those dimensions.

With GIMP - the famous free software and open source image editor - you can create pre-formatted favicon from an image to various sizes, obtaining not only effective but also multiresolution transparency effects characteristic of the format. png, here are the simple steps to follow:

  1. create the image format. png to a size of 128x128px and save
  2. create a copy of the first image, reduce it and save it separately to 64x64px
  3. create a copy of the first image, reduce it and save it separately to 32x32px
  4. create a copy of the first image, reduce it and save it separately to 16x16px
  5. re-open the first image to 128x128px
  6. import level as the image 64x64px
  7. import level as the image 32x32px
  8. import level as the image 16x16px
  9. save the resulting image as a Windows Icon (. ico) properly assigning the different levels in the corresponding formats

Done! Now you just need to include in your pages, the favicon multiresolution and call with the appropriate HTML tags:

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />