couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: Notes and tips on optimizing performance
Date Sat, 29 Jan 2011 01:32:59 GMT
On Fri, Jan 28, 2011 at 09:07, Dirkjan Ochtman <dirkjan@ochtman.nl> wrote:
> On Fri, Jan 21, 2011 at 21:34, kowsik <kowsik@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

Mime
View raw message