Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

After benchmarking: couchrest performance bottleneck?

#14

First of all thanks for having built and released couchrest. I've been playing around with it, and I like that it doesn't stray far from couchdb semantics. (Models are looking exciting as well.)

I built a small test app, and noticed that I was only getting 8-10 req/s using couchdb as a backend. I then took my setup apart, and saw that my web framework by itself was getting around 200 req/s (ab -c 1 | 10), and my couchdb server was getting around 1000 req/s (ab -c 1 | 10) by itself. Once I added in a call to DB.documents or DB.get("_all_docs") my setup slowed down to 10 req/s.

I haven't had time to look into it, but I guess profiling a request would be the right way to see where couchrest spends most of its time.

I'm on OS X 10.4.11, Ruby 1.8.6, jchris-couchrest (0.9.12)

What are other people's performance numbers?

Thanks again. Ben.

Reported by Ben · October 27th, 2008 @ 08:19 PM

State: new
Milestone: none
Assigned to: J. Chris A. J. Chris A.

Activity

  1. J. Chris A.
    J. Chris A.

    wow ben, thanks for the attention to detail.

    I've mostly been using CouchRest for shoveling data around, so I don't have req/response numbers like that, but that does seem slow.

    How many docs do you have? how does couchrest perform for a medium complexity document GET?

    October 27th, 2008 @ 08:39 PM

  2. Ben
    Ben

    Chris,

    here's my writeup of the situation. Long story short, Net::HTTP appears to be the root cause of the slow-downs. This affects all current couchdb ruby libraries. Here's my writeup: http://ducktyped.com/2008/10/28/couchdb-ruby-libraries-are-fundamentally-flawed.

    Ben

    October 28th, 2008 @ 11:54 AM

  3. sco
    sco

    Serendipitously, this ticket showed up in my news reader right next to an item about a faster Net::HTTP rewrite. Maybe it's a sign. FWIW:

    http://github.com/tarcieri/fasth...

    October 28th, 2008 @ 12:05 PM

  4. Vinícius Manhães Teles
    Vinícius Manhães Teles

    There's a useful analysis of the Net::HTTP problem at:

    http://apocryph.org/more_indepth...

    If CouchRest could rely on a different implementation like rfuzz or libcurl, I guess it's performance could be a lot better.

    November 11th, 2008 @ 12:15 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.