You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by kowsik <ko...@gmail.com> on 2011/01/21 21:34:18 UTC

Notes and tips on optimizing performance

Just a few notes, tips and tricks that I've picked up over time:
http://bit.ly/flpSre

K.
---
http://twitter.com/pcapr
http://labs.mudynamics.com

Re: Notes and tips on optimizing performance

Posted by Randall Leeds <ra...@gmail.com>.
On Fri, Jan 28, 2011 at 09:07, Dirkjan Ochtman <di...@ochtman.nl> wrote:
> On Fri, Jan 21, 2011 at 21:34, kowsik <ko...@gmail.com> wrote:
>> Just a few notes, tips and tricks that I've picked up over time:
>> http://bit.ly/flpSre

There's a wiki page on performance: http://wiki.apache.org/couchdb/Performance
If you have tips that you think aren't mentioned and deserve to be
please add them. I've put a bunch of stuff from my personal experience
there. Some of it probably needs revisiting and with more
contributions we can ensure it is an authoritative reference on
CouchDB performance tuning.

>
> Just to make sure I understand this correctly:
>
> include_docs is just another space/performance trade-off, right? I
> would assume that in most cases, where the doc is not very large,
> having the doc inline in the view index will result in faster queries
> than having to lookup the doc from the database btree. The doc lookup
> is relatively fast, but it would still be disk seeking etc.

What you describe may not be the case, despite being repeated (I'm
guilty) in a lot of places.

Consider that having more data in your view index may exert more
pressure on your filesystem cache, possibly pushing the docs out of
memory and negatively impacting the performance of document requests.
With the documents in the filesystem cache include_docs would not have
had to seek anyway.

Keeping the document data in the view index may still be very
_marginally_ faster since there is less computation to find the
document in the database, but this is negligible compared to disk
related latencies.

As always, if you're determined to squeeze every last drop of
performance run your own careful benchmarks that simulate _your_ real
world scenario.

-Randall

Re: Notes and tips on optimizing performance

Posted by Dirkjan Ochtman <di...@ochtman.nl>.
On Fri, Jan 21, 2011 at 21:34, kowsik <ko...@gmail.com> wrote:
> Just a few notes, tips and tricks that I've picked up over time:
> http://bit.ly/flpSre

Just to make sure I understand this correctly:

include_docs is just another space/performance trade-off, right? I
would assume that in most cases, where the doc is not very large,
having the doc inline in the view index will result in faster queries
than having to lookup the doc from the database btree. The doc lookup
is relatively fast, but it would still be disk seeking etc.

Cheers,

Dirkjan