[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815463#comment-16815463
 ] 

David Mollitor commented on ZOOKEEPER-3352:
-------------------------------------------

I am a bit confused on the requirement for ACID compliance?  My understanding 
is that the consistency was a result of the quorum agreement protocol.  Is 
there some sort of ACID mechanism currently in 3.x?

bq. If you require a high random write throughput (>10,000 w/sec) _or you need 
to use spinning disks then_ LevelDB could be a good choice. If your application 
is read-heavy or does a lot of range scans then Bolt could be a good choice.

I would go a step further and say that LSM has a *much faster* write than 
B+tree.  LSM performs a simple append on a write-ahead log file when a record 
is inserted, for a B+tree, it has to seek around the single file for each 
insert to ensure that related data is co-located.

Theoretically, the B+tree has a faster read speed and faster scan speed than 
LSM.  However, this only when comparing disk reads.  When data is co-located in 
a single file, scans are faster.  When data is read with LSM, related records 
may be sprayed across multiple files, requiring many seeks around the disk to 
load all the records.

However, ZK has a tradition of storing its entire data set in-memory for fast 
look ups.  If this continues (which I recommend) then data is never being read 
from disk and the B+tree loses its advantage.

> Use LevelDB For Backend
> -----------------------
>
>                 Key: ZOOKEEPER-3352
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3352
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Critical
>             Fix For: 4.0.0
>
>
> Use LevelDB for managing data stored in ZK (transaction logs and snapshots).
> https://stackoverflow.com/questions/6779669/does-leveldb-support-java



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to