PRE-RELEASE: lighttpd-1.4.12-20060724-0947.tar.gz 6

Posted by jan Mon, 24 Jul 2006 12:52:00 GMT

I just uploaded the 3rd pre-release of lighttpd 1.4.12:

http://www.lighttpd.net/download/lighttpd-1.4.12-20060724-0947.tar.gz

This pre-release should work on most platforms and it mainly got improvements for our mongrel users. A small test has shown that we can even improve the performance of mongrel by balancing over 2 local instances (on a single-cpu machine).

I’m using it here against 2 mongrels:

$SERVER["socket"] == ":1446" {
  proxy-core.balancer = "round-robin" 
  proxy-core.protocol = "http" 
  proxy-core.backends = ( "127.0.0.1:3000", "127.0.0.1:3001" )
}
My small rails app got started with mongrel:
$ RAILS_ENV="production" mongrel_rails start --port 3000
$ RAILS_ENV="production" mongrel_rails start --port 3001

The performance with of the RR-LB was tested with ab, run 3 times:

$ ab -c 20 -n 500 http://127.0.0.1:1446/expenses/
  Requests per second:    22.67 [#/sec] (mean)
  Requests per second:    22.68 [#/sec] (mean)
  Requests per second:    22.97 [#/sec] (mean)
In top the cpu-time was split nicely:
  PID  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
31104 26748  23m 2468 S 42.6  3.4   0:30.09 mongrel_rails
31168 27216  23m 2472 R 40.3  3.4   0:30.10 mongrel_rails
28509  9728 4900 2600 S  5.6  0.7   0:03.91 lighttpd
Against a single mongrel, without lighty, to measure the native performance:
$ ab -c 20 -n 500 http://127.0.0.1:3000/expenses/
  Requests per second:    20.51 [#/sec] (mean)
  Requests per second:    20.42 [#/sec] (mean)
  Requests per second:    20.65 [#/sec] (mean)

Conclusion: 2 mongrels are faster than one (even on a single CPU machine).

To get more background on mod_proxy_core check out:

Trackbacks

Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/1833

  1. Typo 4.0.0 is now out and features a very nice new looking admin. To add to the excitement a pre release of the new lighttpd with a working mod_proxy is out. I’m be looking forward to getting this going on our server this week.
Comments

Leave a response

  1. tobi Mon, 24 Jul 2006 20:41:53 GMT
    Would it be possible to change lighty so that if a server.document-root is specified for the block that it will try to satisfy requests itself from the file system before handing them out to the proxy? This would make this kind of setup enormously more useful.
  2. Ezra Zygmuntowicz Tue, 25 Jul 2006 23:43:11 GMT
    Hey Jan, great work on all of this. I was able to get a rails action with a simple database query and small view render to run at 113req/sec with 3 mongrels behind the latest pre-release on linux. THe proxy_core is shaping up to be pretty sweet. I cannot build the latest pre release on OSX however. I can build 1.4.11 fine but the pre release errors out of make with this:
    /usr/bin/ld: Undefined symbols:
    _proxy_fastcgi_get_request_chunk
    _proxy_fastcgi_parse_response_header
    _proxy_fastcgi_stream_decoder
    collect2: ld returned 1 exit status
    make[2]: *** [mod_proxy_core.la] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    
    Is there aything special I have to do to build on OSX?
  3. chernousov Fri, 28 Jul 2006 09:18:04 GMT
    http://trac.lighttpd.net/trac/ticket/771 check this out, I think this serious bug also exists in this prerelease.
  4. ray.slakinski@gmail.com Tue, 01 Aug 2006 15:53:15 GMT
    I'm getting the same thing as you Ezra on my OSX box. I'll wait to see if the final build is any better, or you can contact me to test.
  5. Paul Ingles Fri, 04 Aug 2006 10:39:04 GMT
    I tried the 1.4.12 pre-release on my VPS today, it seems that after servicing one set of requests through Mongrel, the second kills it. Inside the logs I see:
    log.c.139: (trace) server started
    mod_proxy_core.c.1354: (error) connection is in a unexpected state at close-time: 24
    fdevent_poll.c.26: (error) Ooh, Ooh, Ooh. Something is not good ... going down
    
    Not too sure what's causing it, if you want me to check anything out I'll happily take a peek.
  6. Claudio Perez Gamayo Tue, 08 Aug 2006 11:00:11 GMT
    same error in my VPS using ubuntu dapper, the second request kills lighty
Comments