Created
January 15, 2019 02:33
-
-
Save rdhabalia/ee504b712c4f2ba570f49aa7f1240876 to your computer and use it in GitHub Desktop.
bookkeeper.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
#/** | |
# * Copyright 2007 The Apache Software Foundation | |
# * | |
# * Licensed to the Apache Software Foundation (ASF) under one | |
# * or more contributor license agreements. See the NOTICE file | |
# * distributed with this work for additional information | |
# * regarding copyright ownership. The ASF licenses this file | |
# * to you 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 | |
journalSyncData=false | |
# Port that bookie server listen on | |
bookiePort=3181 | |
# Set the network interface that the bookie should listen on. | |
# If not set, the bookie will listen on all interfaces. | |
#listeningInterface=eth0 | |
# Whether the bookie allowed to use a loopback interface as its primary | |
# interface(i.e. the interface it uses to establish its identity)? | |
# By default, loopback interfaces are not allowed as the primary | |
# interface. | |
allowLoopback=false | |
# Directory Bookkeeper outputs its write ahead log | |
#journalDirectory=/journal | |
journalDirectory=/mnt/ram_disk | |
# Directory Bookkeeper outputs ledger snapshots | |
# could define multi directories to store snapshots, separated by ',' | |
# For example: | |
#ledgerDirectories=/home/y/var/bookkeeper/ledgers | |
ledgerDirectories=/ledgers | |
# Implementation of ledger storage | |
ledgerStorageClass=org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage | |
sortedLedgerStorageEnabled=false | |
# Db ledger storage write cache max size in bytes | |
dbStorage_writeCacheMaxSizeMb=16384 | |
# Max number of sequential entries to prefetch after a read from disk | |
dbStorage_readAheadCacheBatchSize=1000 | |
# Max size of read-ahead cache | |
dbStorage_readAheadCacheMaxSizeMb=4096 | |
# Max size of entry locations in memory cache | |
dbStorage_entryLocationCacheMaxSizeMb=512 | |
dbStorage_rocksDB_writeBufferSizeMB=64 | |
dbStorage_rocksDB_sstSizeInMB=64 | |
dbStorage_rocksDB_blockSize=65536 | |
dbStorage_rocksDB_bloomFilterBitsPerKey=10 | |
dbStorage_rocksDB_blockCacheSize=2147483648 | |
dbStorage_rocksDB_numLevels=-1 | |
dbStorage_rocksDB_numFilesInLevel0=4 | |
dbStorage_rocksDB_maxSizeInLevel1MB=256 | |
# Ledger Manager Class | |
# What kind of ledger manager is used to manage how ledgers are stored, managed | |
# and garbage collected. Try to read 'BookKeeper Internals' for detail info. | |
ledgerManagerType=hierarchical | |
# Root zookeeper path to store ledger metadata | |
# This parameter is used by zookeeper-based ledger manager as a root znode to | |
# store all ledgers. | |
zkLedgersRootPath=/ledgers | |
# Enable/Disable entry logger preallocation | |
entryLogFilePreallocationEnabled=true | |
# Max file size of entry logger, in bytes | |
# A new entry log file will be created when the old one reaches the file size limitation | |
logSizeLimit=1073741824 | |
# Threshold of minor compaction | |
# For those entry log files whose remaining size percentage reaches below | |
# this threshold will be compacted in a minor compaction. | |
# If it is set to less than zero, the minor compaction is disabled. | |
minorCompactionThreshold=0.2 | |
# Interval to run minor compaction, in seconds | |
# If it is set to less than zero, the minor compaction is disabled. | |
minorCompactionInterval=3600 | |
# Threshold of major compaction | |
# For those entry log files whose remaining size percentage reaches below | |
# this threshold will be compacted in a major compaction. | |
# Those entry log files whose remaining size percentage is still | |
# higher than the threshold will never be compacted. | |
# If it is set to less than zero, the minor compaction is disabled. | |
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 | |
# Set the rate at which compaction will readd entries. The unit is adds per second. | |
compactionRate=10000 | |
# Max file size of journal file, in mega bytes | |
# A new journal file will be created when the old one reaches the file size limitation | |
journalMaxSizeMB=2048 | |
# Max number of old journal file to kept | |
# Keep a number of old journal files would help data recovery in specia case | |
journalMaxBackups=1 | |
# How much space should we pre-allocate at a time in the journal | |
journalPreAllocSizeMB=16 | |
# Size of the write buffers used for the journal | |
journalWriteBufferSizeKB=16 | |
# Should we remove pages from page cache after force write | |
journalRemoveFromPageCache=true | |
# Should we group journal force writes, which optimize group commit | |
# for higher throughput | |
journalAdaptiveGroupWrites=true | |
# Maximum latency to impose on a journal write to achieve grouping | |
journalMaxGroupWaitMSec=0 | |
# Maximum writes to buffer to achieve grouping | |
journalBufferedWritesThreshold=524288 | |
# If we should flush the journal when journal queue is empty | |
journalFlushWhenQueueEmpty=false | |
journalAlignmentSize=4096 | |
# The number of threads that should handle journal callbacks | |
numJournalCallbackThreads=8 | |
# How long the interval to trigger next garbage collection, in milliseconds | |
# Since garbage collection is running in background, too frequent gc | |
# will heart performance. It is better to give a higher number of gc | |
# interval if there is enough disk capacity. | |
gcWaitTime=900000 | |
# How long the interval to trigger next garbage collection of over-replicated ledgers, in milliseconds | |
# Since garbage collection of over-replicated ledgers is an expensive operation, | |
# we should give a high number for the wait time | |
gcOverreplicatedLedgerWaitTime=86400000 | |
# How long the interval to flush ledger index pages to disk, in milliseconds | |
# Flushing index files will introduce much random disk I/O. | |
# If separating journal dir and ledger dirs each on different devices, | |
# flushing would not affect performance. But if putting journal dir | |
# and ledger dirs on same device, performance degrade significantly | |
# on too frequent flushing. You can consider increment flush interval | |
# to get better performance, but you need to pay more time on bookie | |
# server restart after failure. | |
flushInterval=60000 | |
# Interval to watch whether bookie is dead or not, in milliseconds | |
# | |
bookieDeathWatchInterval=1000 | |
## zookeeper client settings | |
# A list of one of more servers on which zookeeper is running. | |
# The server list can be comma separated values, for example: | |
# zkServers=zk1:2181,zk2:2181,zk3:2181 | |
zkServers=perf1-zk1.messaging.bf2.yahoo.com | |
# ZooKeeper client session timeout in milliseconds | |
# Bookie server will exit if it received SESSION_EXPIRED because it | |
# was partitioned off from ZooKeeper for more than the session timeout | |
# JVM garbage collection, disk I/O will cause SESSION_EXPIRED. | |
# Increment this value could help avoiding this issue | |
zkTimeout=30000 | |
## NIO Server settings | |
# This settings is used to enabled/disabled Nagle's algorithm, which is a means of | |
# improving the efficiency of TCP/IP networks by reducing the number of packets | |
# that need to be sent over the network. | |
# If you are sending many small messages, such that more than one can fit in | |
# a single IP packet, setting server.tcpnodelay to false to enable Nagle algorithm | |
# can provide better performance. | |
# Default value is true. | |
serverTcpNoDelay=true | |
## ledger cache settings | |
# Max number of ledger index files could be opened in bookie server | |
# If number of ledger index files reaches this limitation, bookie | |
# server started to swap some ledgers from memory to disk. | |
# Too frequent swap will affect performance. You can tune this number | |
# to gain performance according your requirements. | |
openFileLimit=0 | |
# Size of a index page in ledger cache, in bytes | |
# A larger index page can improve performance writing page to disk, | |
# which is efficent when you have small number of ledgers and these | |
# ledgers have similar number of entries. | |
# If you have large number of ledgers and each ledger has fewer entries, | |
# smaller index page would improve memory usage. | |
pageSize=8192 | |
# How many index pages provided in ledger cache | |
# If number of index pages reaches this limitation, bookie server | |
# starts to swap some ledgers from memory to disk. You can increment | |
# this value when you found swap became more frequent. But make sure | |
# pageLimit*pageSize should not more than JVM max memory limitation, | |
# otherwise you would got OutOfMemoryException. | |
# In general, incrementing pageLimit, using smaller index page would | |
# gain bettern performance in lager number of ledgers with fewer entries case | |
# If pageLimit is -1, bookie server will use 1/3 of JVM memory to compute | |
# the limitation of number of index pages. | |
pageLimit=0 | |
#If all ledger directories configured are full, then support only read requests for clients. | |
#If "readOnlyModeEnabled=true" then on all ledger disks full, bookie will be converted | |
#to read-only mode and serve only read requests. Otherwise the bookie will be shutdown. | |
#By default this will be disabled. | |
readOnlyModeEnabled=true | |
#Whether the bookie is force started in ReadOnly mode | |
forceReadOnlyBookie=false | |
#For each ledger dir, maximum disk space which can be used. | |
#Default is 0.95f. i.e. 95% of disk can be used at most after which nothing will | |
#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). | |
diskUsageThreshold=0.95 | |
#Disk check interval in milli seconds, interval to check the ledger dirs usage. | |
#Default is 10000 | |
diskCheckInterval=10000 | |
#### Auto-replication configuration #### | |
# Interval at which the auditor will do a check of all ledgers in the cluster. | |
# By default this runs once a week. The interval is set in seconds. | |
# To disable the periodic check completely, set this to 0. | |
# Note that periodic checking will put extra load on the cluster, so it should | |
# not be run more frequently than once a day. | |
auditorPeriodicCheckInterval=604800 | |
# The interval between auditor bookie checks. | |
# The auditor bookie check, checks ledger metadata to see which bookies should | |
# contain entries for each ledger. If a bookie which should contain entries is | |
# unavailable, then the ledger containing that entry is marked for recovery. | |
# Setting this to 0 disabled the periodic check. Bookie checks will still | |
# run when a bookie fails. | |
# The interval is specified in seconds. | |
auditorPeriodicBookieCheckInterval=86400 | |
autoRecoveryDaemonEnabled=false | |
# Specifies the number of entries which a replication will rereplicate | |
# in parallel. The default value is 10. A larger value for this parameter | |
# will increase the speed at which autorecovery occurs but will increase | |
# the memory requirement of the autorecovery process, and create more load | |
# on the cluster. | |
rereplicationEntryBatchSize=5000 | |
# Amount of time, in milliseconds, which a recovery worker will wait before | |
# recovering a ledger segment which has no defined ended, i.e. the client is | |
# still writing to that segment. The default value is 30000ms. | |
openLedgerRereplicationGracePeriod=30000 | |
# number of threads that should handle write requests. if zero, the writes would | |
# be handled by netty threads directly. | |
numAddWorkerThreads=0 | |
# number of threads that should handle read requests. if zero, the reads would | |
# be handled by netty threads directly. | |
numReadWorkerThreads=8 | |
# If read workers threads are enabled, limit the number of pending requests, to | |
# avoid the executor queue to grow indefinitely | |
maxPendingReadRequestsPerThread=2500 | |
# If add workers threads are enabled, limit the number of pending requests, to | |
# avoid the executor queue to grow indefinitely | |
maxPendingAddRequestsPerThread=10000 | |
# The number of bytes we should use as capacity for BufferedReadChannel. Default is 512 bytes. | |
readBufferSizeBytes=4096 | |
# The number of bytes used as capacity for the write buffer. Default is 64KB. | |
writeBufferSizeBytes=65536 | |
# Whether the bookie should use its hostname to register with the | |
# co-ordination service(eg: zookeeper service). | |
# When false, bookie will use its ipaddress for the registration. | |
# Defaults to false. | |
useHostNameAsBookieID=false | |
# Name of the class that implements the authentication plugin | |
#bookieAuthProviderFactoryClass=com.yahoo.cloud.messaging.bookkeeper.yca.YCABookieAuthProviderFactory | |
# Comma separated list of YCA appIds that are permitted to connect | |
# to the bookie | |
ycaAppIds=yahoo.cloud_messaging.hosts.broker.env-perf.loc-bf2,yahoo.cloud_messaging.hosts.testclient.env-perf.loc-bf2,yahoo.cloud_messaging.yca.bookie-client.env-perf | |
# During entry re-replication the bookie needs to act as a client to other | |
# bookies and need to authenticate to them too. | |
#clientAuthProviderFactoryClass=com.yahoo.cloud.messaging.bookkeeper.yca.YCAClientAuthProviderFactory | |
ycaAppId=yahoo.cloud_messaging.yca.bookie-client.env-perf | |
# Metrics provider class to use | |
# By default Bookie server is initiated with NullStatsLogger | |
# Current supported options: org.apache.bookkeeper.stats.codahale.CmsCodahaleMetricsProvider | |
statsProviderClass=org.apache.bookkeeper.stats.codahale.CmsCodahaleMetricsProvider | |
# JMX endpoint name for codahale metrics | |
# NOTE: this name is not set configurable since the jmx config relies on this name | |
codahaleStatsJmxEndpoint=metrics | |
# The ensemble placement policy will be used by the auto replication, to honor the policy when | |
# replacing the failed bookie by a new bookie. For example, if a rackaware ensemble placement | |
# policy is set, the new bookie will be chosen from a different rack than the bookies in the | |
# ensemble | |
ensemblePlacementPolicy=org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy | |
# The dns to switch mapping class name used by RackawareEnsemblePlacementPolicy | |
reppDnsResolverClass=org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping | |
# List of isolation groups the bookie belongs to. It will be used by the auto replication to | |
# sure the ledgers are replicated to bookies within the same isolation group. | |
isolationBookieGroups= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment