Paolo Gabrielli\’s Blog

Just another near empty WordPress.com’s weblog. But this is from Paolo ‘pkirk’ Gabrielli.

Archive for the ‘Lighttpd’ Category

Debian Lenny, Lighttpd, PHP5 (php5-apc) and MySQL spikes

Posted by paolo on 27 November, 2009

On a clean server I installed Lenny, I used aptitude to install Lighttpd (1.4.19 a bit old, I know), Mysql, php5-cgi (with php5-apc).

Nothing unusual, nothing strange, no handmade modifications. I think that was pretty standard, but I found (thanks Munin) that MySQL was having big utilization spikes (and so was the server’s load) while admins of a WordPress installation where POSTing things, doing Uploads, etc.

Then I found someone on the Lighttpd forum having a similar issue with FreeBSD. So I tried to change the “server.network-backend” conf from “linux-sendfile” to “writev” and the issue disappeared.

I hope this can help someone else.

Posted in Lighttpd, networking | 2 Comments »

Lighttpd css javascript js compress tip

Posted by paolo on 29 April, 2007

I don’t know why I haven’t thinked about it before, but with lighttpd it is possible in 30 seconds to manage sending the Java-Scripts and the CSSs compressed to the browsers, saving a lot of bandwidth against a little use of CPU.

I just added “mod_compress” to the list of modules in the array “server.modules” and
# {{{ mod_compress
compress.cache-dir = "/var/www/cache/"
compress.filetype = ("text/css", "text/javascript" )
#

in the /etc/lighttpd/lighttpd.conf file.  Obviously I created the directory /var/www/cache giving to it the permission needed by lighttpd to write there.

That’s it. And that’s only a little part of the unlimited powers of Lighttpd!

Posted in css, javascript, Lighttpd, Programming | 2 Comments »