You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/23 22:28:17 UTC

[GitHub] merlimat opened a new pull request #1289: Allow multiple directories in DbLedgerStorage

merlimat opened a new pull request #1289: Allow multiple directories in DbLedgerStorage
URL: https://github.com/apache/bookkeeper/pull/1289
 
 
   In normal conditions, the max throughput that a bookie can sustain is mostly determined by how fast we can write entries on the journal. 
   
   If we assume a *very* fast journal, for example using multiple journal threads and setting `journalSyncData=false` or with the journal on a RAM disk (there are some cases in which it might make sense), then the LedgerStorage becomes the "bottleneck". We need to be able to flush data on disk faster than the incoming rate, otherwise the write cache will get full and then we have to apply backpressure. 
   
   In different testing scenario, the bottleneck has become the LedgerStoarge flush/checkpoint because it's done by a single thread. 
   
   For smaller entries (1KB) the limit is ~250 K write/s and the limitation is due to preparing a batch with the offsets to write into rocksdb. Each insertion in the batch needs to cross JNI boundaries and that is expensive. 
   
   For bigger entries (10KB), the limit is ~50K write/s (or 500MB /s). This mostly because the single flush thread cannot drive 100% IO utilization on the disks (since it's doing the rest of work). Raw disk writes in that test environment (12 HDDs) could reach 1.4GB/s.
   
   This change is only relative to DbLedgerStorage and it's a simple refactoring that, when configured with multiple directories, it will hash a ledger into a certain directory. Each directory is flushed independently on its own thread.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services