Skip to content

Commit

Permalink
Added DbLedgerStorage configuration keys with default values in bookk…
Browse files Browse the repository at this point in the history
…eeper.conf (#123)
  • Loading branch information
merlimat authored Nov 28, 2016
1 parent 83ff857 commit 5af7d3f
Showing 1 changed file with 40 additions and 14 deletions.
54 changes: 40 additions & 14 deletions conf/bookkeeper.conf
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#
# Copyright 2016 Yahoo Inc.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

## Bookie settings

Expand Down Expand Up @@ -43,7 +43,7 @@ journalDirectory=data/bookkeeper/journal
# could define multi directories to store snapshots, separated by ','
# For example:
# ledgerDirectories=/tmp/bk1-data,/tmp/bk2-data
#
#
# Ideally ledger dirs and journal dir are each in a differet device,
# which reduce the contention between random i/o and sequential write.
# It is possible to run with a single disk, but performance will be significantly lower.
Expand Down Expand Up @@ -78,7 +78,7 @@ ledgerStorageClass=org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage
# minorCompactionThreshold=0.2

# Interval to run minor compaction, in seconds
# If it is set to less than zero, the minor compaction is disabled.
# If it is set to less than zero, the minor compaction is disabled.
# minorCompactionInterval=3600

# Threshold of major compaction
Expand All @@ -90,8 +90,8 @@ ledgerStorageClass=org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage
majorCompactionThreshold=0.5

# Interval to run major compaction, in seconds
# If it is set to less than zero, the major compaction is disabled.
# majorCompactionInterval=86400
# If it is set to less than zero, the major compaction is disabled.
# majorCompactionInterval=86400

# Set the maximum number of entries which can be compacted without flushing.
# When compacting, the entries are written to the entrylog and the new offsets
Expand All @@ -106,7 +106,7 @@ majorCompactionThreshold=0.5
# Set the rate at which compaction will readd entries. The unit is adds per second.
#compactionRate=1000

# Throttle compaction by bytes or by entries.
# Throttle compaction by bytes or by entries.
#isThrottleByBytes=false

# Set the rate at which compaction will readd entries. The unit is adds per second.
Expand Down Expand Up @@ -247,7 +247,7 @@ readOnlyModeEnabled=true
#be written to that partition. If all ledger dir partions are full, then bookie
#will turn to readonly mode if 'readOnlyModeEnabled=true' is set, else it will
#shutdown.
#Valid values should be in between 0 and 1 (exclusive).
#Valid values should be in between 0 and 1 (exclusive).
#diskUsageThreshold=0.95

#Disk check interval in milli seconds, interval to check the ledger dirs usage.
Expand Down Expand Up @@ -296,10 +296,36 @@ readBufferSizeBytes=4096

# Stats Provider Class
#statsProviderClass=org.apache.bookkeeper.stats.CodahaleMetricsProvider
#codahaleStatsJmxEndpoint=metrics

dbStorage_readAheadCacheBatchSize=1000
dbStorage_rocksDBEnabled=true
dbStorage_writeCacheMaxSizeMb=256

## DB Ledger storage configuration

# Size of Write Cache. Memory is allocated from JVM direct memory.
# Write cache is used to buffer entries before flushing into the entry log
# For good performance, it should be big enough to hold a sub
dbStorage_writeCacheMaxSizeMb=512

# Size of Read cache. Memory is allocated from JVM direct memory.
# This read cache is pre-filled doing read-ahead whenever a cache miss happens
dbStorage_readAheadCacheMaxSizeMb=256

codahaleStatsJmxEndpoint=metrics
# How many entries to pre-fill in cache after a read cache miss
dbStorage_readAheadCacheBatchSize=1000

## RocksDB specific configurations
## DbLedgerStorage uses RocksDB to store the indexes from
## (ledgerId, entryId) -> (entryLog, offset)

# Size of RocksDB block-cache. For best performance, this cache
# should be big enough to hold a significant portion of the index
# database which can reach ~2GB in some cases
# dbStorage_rocksDB_blockCacheSize=268435456 # 256 MBytes

# dbStorage_rocksDB_writeBufferSizeMB=64
# dbStorage_rocksDB_sstSizeInMB=64
# dbStorage_rocksDB_blockSize=65536
# dbStorage_rocksDB_bloomFilterBitsPerKey=10
# dbStorage_rocksDB_numLevels=-1
# dbStorage_rocksDB_numFilesInLevel0=4
# dbStorage_rocksDB_maxSizeInLevel1MB=256

0 comments on commit 5af7d3f

Please sign in to comment.