[Mongrel] speed curiosity

James Tucker jftucker at gmail.com
Mon Sep 1 07:30:27 EDT 2008


On 30 Aug 2008, at 21:57, Roger Pack wrote:

> As a note--using the mongrel example from
>
> http://mongrel.rubyforge.org/web/mongrel/files/README.html and Mongrel
> 1.1.5
>
> It yielded (for me) ~800 req/s [running ab -n 1000 -c 1
> http://localhost:3000/test]
>
> and if I changed
>        out.write("hello!\n")
>
> to
>        out.write("hello!\n"*10_000)

AFAIK that's not the fastest of operations.

>
>
> it yielded ~300 req/s.
>
> I was unable to get evented mongrel to run so wasn't able to compare  
> the
> two.
>
>
> Doing a little bit of investigating, kcachegrind+ruby-prof points the
> latency to http_response.rb line 137
>
>    @socket.write(data)
>
> Experimenting by changing this line haphazardly to
>
>      while data and data.length > 0
>        wrote = @socket.write_nonblock(data)
>        data = data[wrote..-1]
>      end
>
> yielded ~938 req/s [AFAICT]

Thin and ebb both write more like this.

>
>
>
> Thoughts?
>
> -=R
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users



More information about the Mongrel-users mailing list