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)

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]


Thoughts?

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

Reply via email to