incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: DB ACLs (was Re: 0.11 Release / Feature Freeze for 1.0)
Date Wed, 03 Feb 2010 22:27:56 GMT

On 3 Feb 2010, at 13:24, Brian Candler wrote:

>> _readers / _admins / _security are stored as a raw object without
>> concurrency control, because keeping them as a document adds too much
>> performance overhead on each request. Concurrency control is a
>> tradeoff we make here.
> 
> Sorry to be blunt, but do you have numbers to back that up?  This smells
> very much of premature optimisation.

Reading a document costs: 

    1 disk seek to the end of the db file to grab the b-tree root
 + n disk seeks to the document (n < 5 to 10 in most cases)

In a well cached database, most of the seeks are free, but the last one
usually isn't (unless you can hold a full database in memory).

Doing a disk seek per request is going to kill any sort of performance
we have.

Reading from the process state is effectively free.

This is why stats don't go into a database or my log-to-db branch
is not in trunk.

Cheers
Jan
--


Mime
View raw message