blob: 3287b70fe0f19b1e99920ae593808da529312380 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Apache BookKeeper&trade; - BookKeeper configuration</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/tippy.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="shortcut icon" href="/img/favicon.ico">
<script src="/js/tippy.min.js"></script>
<script type="text/javascript">
var shiftWindow = function() { scrollBy(0, -25); };
window.addEventListener("hashchange", shiftWindow);
window.addEventListener("pageshow", shiftWindow);
function load() { if (window.location.hash) shiftWindow(); }
</script>
</head>
<body class="body">
<main class="main">
<nav class="navbar bk-topnav">
<div class="navbar-brand">
<a class="navbar-item bk-brand" href="/">
Apache BookKeeper&trade;
</a>
<div class="navbar-burger burger" data-target="bkNav">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div id="bkNav" class="navbar-menu">
<div class="navbar-start">
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Documentation</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/docs/latest/overview/overview">
Version 4.15.0-SNAPSHOT
<span class="tag is-warning">Development</span>
</a>
<a class="navbar-item" href="/docs/latest/api/javadoc">
<span class="icon bk-javadoc-icon">
<img src="/img/java-icon.svg">
</span>
Javadoc
</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/docs/4.14.0/overview/overview">
Release 4.14.0
</a>
<a class="navbar-item" href="/docs/4.13.0/overview/overview">
Release 4.13.0
</a>
<a class="navbar-item" href="/docs/4.12.1/overview/overview">
Release 4.12.1
</a>
<a class="navbar-item" href="/docs/4.12.0/overview/overview">
Release 4.12.0
</a>
<a class="navbar-item" href="/docs/4.11.1/overview/overview">
Release 4.11.1
<span class="tag is-success">Stable</span>
</a>
<a class="navbar-item" href="/docs/4.11.0/overview/overview">
Release 4.11.0
</a>
<a class="navbar-item" href="/docs/4.10.0/overview/overview">
Release 4.10.0
</a>
<a class="navbar-item" href="/archives/docs/r4.9.2">
Release 4.9.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.9.1">
Release 4.9.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.9.0">
Release 4.9.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.2">
Release 4.8.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.1">
Release 4.8.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.0">
Release 4.8.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.3">
Release 4.7.3
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.2">
Release 4.7.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.1">
Release 4.7.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.0">
Release 4.7.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.2">
Release 4.6.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.1">
Release 4.6.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.0">
Release 4.6.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.5.1">
Release 4.5.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.5.0">
Release 4.5.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.4.0">
Release 4.4.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.2">
Release 4.3.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.1">
Release 4.3.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.0">
Release 4.3.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.4">
Release 4.2.4
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.3">
Release 4.2.3
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.2">
Release 4.2.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.1">
Release 4.2.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.0">
Release 4.2.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.1.0">
Release 4.1.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.0.0">
Release 4.0.0
<span class="tag is-warning">EOL</span>
</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Community</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/community/mailing-lists">Mailing lists</a>
<a class="navbar-item" href="/community/slack">Slack</a>
<a class="navbar-item" href="https://github.com/apache/bookkeeper/issues">Github Issues</a>
<a class="navbar-item" href="/community/releases">Release Management</a>
<a class="navbar-item" href="/community/meeting">Community Meetings</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/community/contributing">Contribution Guide</a>
<a class="navbar-item" href="/community/coding_guide">Coding Guide</a>
<a class="navbar-item" href="/community/testing">Testing Guide</a>
<a class="navbar-item" href="/community/issue-report">Issue Report Guide</a>
<a class="navbar-item" href="/community/release_guide">Release Guide</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/community/presentations">Presentations</a>
<a class="navbar-item" href="/community/bookkeeper_proposals">BookKeeper Proposals</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Project</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/project/who">Who are we?</a>
<a class="navbar-item" href="/project/bylaws">Bylaws</a>
<a class="navbar-item" href="http://www.apache.org/licenses/">License</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/project/privacy">Privacy policy</a>
<a class="navbar-item" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="navbar-item" href="http://www.apache.org/foundation/thanks.html">Thanks</a>
</div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="field is-grouped">
<p class="control">
<a class="button bk-twitter" href="https://twitter.com/asfbookkeeper">
<span class="icon">
<i class="fa fa-twitter"></i>
</span>
<span>Twitter</span>
</a>
</p>
<p class="control">
<a class="button" href="https://github.com/apache/bookkeeper">
<span class="icon">
<i class="fa fa-github"></i>
</span>
<span>GitHub</span>
</a>
</p>
<p class="control">
<a class="button is-primary" href="/releases">
<span class="icon">
<i class="fa fa-download"></i>
</span>
<span>Download</span>
</a>
</p>
</div>
</div>
</div>
</div>
</nav>
<div class="bk-docs-container">
<div class="columns is-gapless">
<div class="column is-2 is-hidden-mobile">
<div class="container">
<aside class="sidebar">
<a class="button is-info">
Version: 4.11.0
</a>
<hr />
<p>
Getting started
</p>
<ul class="sidebar-items">
<li>
<a href="../../getting-started/installation">
Installation
</a>
</li>
<li>
<a href="../../getting-started/run-locally">
Run bookies locally
</a>
</li>
<li>
<a href="../../getting-started/concepts">
Concepts and architecture
</a>
</li>
</ul>
<p>
Deployment
</p>
<ul class="sidebar-items">
<li>
<a href="../../deployment/manual">
Manual deployment
</a>
</li>
<li>
<a href="../../deployment/dcos">
BookKeeper on DC/OS
</a>
</li>
<li>
<a href="../../deployment/kubernetes">
BookKeeper on Kubernetes
</a>
</li>
</ul>
<p>
Administration
</p>
<ul class="sidebar-items">
<li>
<a href="../../admin/bookies">
BookKeeper administration
</a>
</li>
<li>
<a href="../../admin/autorecovery">
AutoRecovery
</a>
</li>
<li>
<a href="../../admin/metrics">
Metric collection
</a>
</li>
<li>
<a href="../../admin/upgrade">
Upgrade
</a>
</li>
<li>
<a href="../../admin/http">
BookKeeper Admin REST API
</a>
</li>
<li>
<a href="../../admin/decomission">
Decommissioning Bookies
</a>
</li>
</ul>
<p>
API
</p>
<ul class="sidebar-items">
<li>
<a href="../../api/overview">
Overview
</a>
</li>
<li>
<a href="../../api/ledger-api">
Ledger API
</a>
</li>
<li>
<a href="../../api/ledger-adv-api">
Advanced Ledger API
</a>
</li>
<li>
<a href="../../api/distributedlog-api">
DistributedLog
</a>
</li>
<li>
<a href="../../api/javadoc">
Java API Docs
</a>
</li>
</ul>
<p>
Security
</p>
<ul class="sidebar-items">
<li>
<a href="../../security/overview">
Overview
</a>
</li>
<li>
<a href="../../security/tls">
TLS Authentication
</a>
</li>
<li>
<a href="../../security/sasl">
SASL Authentication
</a>
</li>
<li>
<a href="../../security/zookeeper">
ZooKeeper Authentication
</a>
</li>
</ul>
<p>
Development
</p>
<ul class="sidebar-items">
<li>
<a href="../../development/protocol">
BookKeeper protocol
</a>
</li>
</ul>
<p>
Reference
</p>
<ul class="sidebar-items">
<li>
<a href="../../reference/config">
Configuration
</a>
</li>
<li>
<a href="../../reference/cli">
Command-line tools
</a>
</li>
<li>
<a href="../../reference/metrics">
Metrics
</a>
</li>
</ul>
</aside>
</div>
</div>
<div class="column is-8 bk-docs-block">
<header class="docs-title">
<nav class="level bk-level">
<div class="level-left">
<div class="level-item">
<h1 class="title">BookKeeper configuration</h1>
</div>
</div>
</nav>
<h2 class="subtitle">A reference guide to all of BookKeeper's configurable parameters</h2>
</header>
<hr />
<div class="content">
<section class="bk-main-content">
<p>The table below lists parameters that you can set to configure <span class="pop" id="bookie-popover">bookies</span>. All configuration takes place in the <code class="highlighter-rouge">bk_server.conf</code> file in the <code class="highlighter-rouge">bookkeeper-server/conf</code> directory of your <a href="../../getting-started/installing">BookKeeper installation</a>.</p>
<h2 id="server-parameters">Server parameters</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="bookiePort">
<td><code>bookiePort</code></td>
<td><p>The port that the bookie server listens on.</p>
</td>
<td><code>3181</code></td>
</tr>
<tr id="allowMultipleDirsUnderSameDiskPartition">
<td><code>allowMultipleDirsUnderSameDiskPartition</code></td>
<td><p>Configure the bookie to allow/disallow multiple ledger/index/journal directories in the same filesystem disk partition</p>
</td>
<td></td>
</tr>
<tr id="listeningInterface">
<td><code>listeningInterface</code></td>
<td><p>The network interface that the bookie should listen on. If not set, the bookie will listen on all interfaces.</p>
</td>
<td><code>eth0</code></td>
</tr>
<tr id="advertisedAddress">
<td><code>advertisedAddress</code></td>
<td><p>Configure a specific hostname or IP address that the bookie should use to advertise itself to
clients. If not set, bookie will advertised its own IP address or hostname, depending on the
<code class="highlighter-rouge">listeningInterface</code> and <code class="highlighter-rouge">useHostNameAsBookieID</code> settings.</p>
</td>
<td><code>eth0</code></td>
</tr>
<tr id="allowLoopback">
<td><code>allowLoopback</code></td>
<td><p>Whether the bookie is allowed to use a loopback interface as its primary
interface (the interface it uses to establish its identity). By default, loopback interfaces are <em>not</em> allowed as the primary interface.</p>
<p>Using a loopback interface as the primary interface usually indicates a configuration error. It’s fairly common in some VPS setups, for example, to not configure a hostname or to have the hostname resolve to 127.0.0.1. If this is the case, then all bookies in the cluster will establish their identities as 127.0.0.1:3181, and only one will be able to join the cluster. For VPSs configured like this, you should explicitly set the listening interface.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="useHostNameAsBookieID">
<td><code>useHostNameAsBookieID</code></td>
<td><p>Whether the bookie should use its hostname to register with the ZooKeeper coordination service. When <code class="highlighter-rouge">false</code>, the bookie will use its IP address for the registration.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="useShortHostName">
<td><code>useShortHostName</code></td>
<td><p>Whether the bookie should use short hostname or <a href="https://en.wikipedia.org/wiki/Fully_qualified_domain_name">FQDN</a> hostname for registration and ledger metadata when <code class="highlighter-rouge">useHostNameAsBookieID</code> is enabled.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="allowEphemeralPorts">
<td><code>allowEphemeralPorts</code></td>
<td><p>Whether the bookie is allowed to use an ephemeral port (port 0) as its server port. By default, an ephemeral port is not allowed. Using an ephemeral port as the service port usually indicates a configuration error. However, in unit tests, using an ephemeral port will address port conflict problems and allow running tests in parallel.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="enableLocalTransport">
<td><code>enableLocalTransport</code></td>
<td><p>Whether allow the bookie to listen for BookKeeper clients executed on the local JVM.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="disableServerSocketBind">
<td><code>disableServerSocketBind</code></td>
<td><p>Whether allow the bookie to disable bind on network interfaces, this bookie will be available only to BookKeeper clients executed on the local JVM.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="bookieDeathWatchInterval">
<td><code>bookieDeathWatchInterval</code></td>
<td><p>Interval to watch whether bookie is dead or not, in milliseconds.</p>
</td>
<td><code>1000</code></td>
</tr>
<tr id="extraServerComponents">
<td><code>extraServerComponents</code></td>
<td><p>Configure a list of extra server components to enable and load on a bookie server. This provides a plugin mechanism to run extra server components along with a bookie server.</p>
</td>
<td><code></code></td>
</tr>
<tr id="ignoreExtraServerComponentsStartupFailures">
<td><code>ignoreExtraServerComponentsStartupFailures</code></td>
<td><p>Whether the bookie should ignore startup failures on loading server components specified by <code class="highlighter-rouge">extraServerComponents</code>.</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="worker-thread-settings">Worker thread settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="numAddWorkerThreads">
<td><code>numAddWorkerThreads</code></td>
<td><p>The number of threads that handle write requests. if zero, writes are handled by <a href="//netty.io/wiki/thread-model.html">Netty threads</a> directly.</p>
</td>
<td><code>1</code></td>
</tr>
<tr id="numReadWorkerThreads">
<td><code>numReadWorkerThreads</code></td>
<td><p>The number of threads that handle read requests. If zero, reads are handled by <a href="//netty.io/wiki/thread-model.html">Netty threads</a> directly.</p>
</td>
<td><code>8</code></td>
</tr>
<tr id="numLongPollWorkerThreads">
<td><code>numLongPollWorkerThreads</code></td>
<td><p>The number of threads that handle long poll requests. If zero, long poll requests are handled by <a href="//netty.io/wiki/thread-model.html">Netty threads</a> directly.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="numJournalCallbackThreads">
<td><code>numJournalCallbackThreads</code></td>
<td><p>The number of threads that handle journal callbacks. If zero, journal callbacks are executed directly on force write threads.</p>
</td>
<td><code>1</code></td>
</tr>
<tr id="numHighPriorityWorkerThreads">
<td><code>numHighPriorityWorkerThreads</code></td>
<td><p>The number of threads that should be used for high priority requests (i.e. recovery reads and adds, and fencing). If zero, reads are handled by <a href="//netty.io/wiki/thread-model.html">Netty threads</a> directly.</p>
</td>
<td><code>8</code></td>
</tr>
<tr id="maxPendingAddRequestsPerThread">
<td><code>maxPendingAddRequestsPerThread</code></td>
<td><p>If read worker threads are enabled, limit the number of pending requests, to avoid the executor queue to grow indefinitely. If zero or negative, the number of pending requests is unlimited.</p>
</td>
<td><code>10000</code></td>
</tr>
<tr id="maxPendingReadRequestsPerThread">
<td><code>maxPendingReadRequestsPerThread</code></td>
<td><p>If add worker threads are enabled, limit the number of pending requests, to avoid the executor queue to grow indefinitely. If zero or negative, the number of pending requests is unlimited.</p>
</td>
<td><code>10000</code></td>
</tr>
<tr id="enableBusyWait">
<td><code>enableBusyWait</code></td>
<td><p>Option to enable busy-wait settings. Default is false.
WARNING: This option will enable spin-waiting on executors and IO threads in order to reduce latency during
context switches. The spinning will consume 100% CPU even when bookie is not doing any work. It is recommended to
reduce the number of threads in the main workers pool and Netty event loop to only have few CPU cores busy.</p>
</td>
<td></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="long-poll-settings">Long poll settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="requestTimerTickDurationMs">
<td><code>requestTimerTickDurationMs</code></td>
<td><p>The tick duration for long poll request timer, in milliseconds. See <a href="//netty.io/4.1/api/io/netty/util/HashedWheelTimer.html">HashedWheelTimer</a> for more details.</p>
</td>
<td><code>10</code></td>
</tr>
<tr id="requestTimerNumTicks">
<td><code>requestTimerNumTicks</code></td>
<td><p>The number of ticks per wheel for long poll request timer. See <a href="//netty.io/4.1/api/io/netty/util/HashedWheelTimer.html">HashedWheelTimer</a> for more details.</p>
</td>
<td><code>1024</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="read-only-mode-support">Read-only mode support</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="readOnlyModeEnabled">
<td><code>readOnlyModeEnabled</code></td>
<td><p>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.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="forceReadOnlyBookie">
<td><code>forceReadOnlyBookie</code></td>
<td><p>Whether the bookie is force started in read only mode or not.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="persistBookieStatusEnabled">
<td><code>persistBookieStatusEnabled</code></td>
<td><p>Persist the bookie status locally on the disks. So the bookies can keep their status upon restarts.</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="netty-server-settings">Netty server settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="serverTcpNoDelay">
<td><code>serverTcpNoDelay</code></td>
<td><p>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.</p>
<p>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.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="serverSockKeepalive">
<td><code>serverSockKeepalive</code></td>
<td><p>This setting is used to send keep-alive messages on connection-oriented sockets.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="serverTcpLinger">
<td><code>serverTcpLinger</code></td>
<td><p>The socket linger timeout on close. When enabled, a close or shutdown will not return until all queued messages for the socket have been successfully sent or the linger timeout has been reached. Otherwise, the call returns immediately and the closing is done in the background.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="byteBufAllocatorSizeInitial">
<td><code>byteBufAllocatorSizeInitial</code></td>
<td><p>The Recv ByteBuf allocator initial buf size.</p>
</td>
<td><code>65536</code></td>
</tr>
<tr id="byteBufAllocatorSizeMin">
<td><code>byteBufAllocatorSizeMin</code></td>
<td><p>The Recv ByteBuf allocator min buf size.</p>
</td>
<td><code>65536</code></td>
</tr>
<tr id="byteBufAllocatorSizeMax">
<td><code>byteBufAllocatorSizeMax</code></td>
<td><p>The Recv ByteBuf allocator max buf size.</p>
</td>
<td><code>1048576</code></td>
</tr>
<tr id="nettyMaxFrameSizeBytes">
<td><code>nettyMaxFrameSizeBytes</code></td>
<td><p>The maximum netty frame size in bytes. Any message received larger than this will be rejected, so when the client-side attempt to send more than the default size bytes, it should set up the corresponding parameter <code class="highlighter-rouge">setNettyMaxFrameSizeBytes(int maxSize)</code>, pay attention to the parameter should be less than the value of server-side.</p>
</td>
<td><code>5242880</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="http-server-settings">Http server settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="httpServerEnabled">
<td><code>httpServerEnabled</code></td>
<td><p>The flag enables/disables starting the admin http server.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="httpServerPort">
<td><code>httpServerPort</code></td>
<td><p>The http server port to listen on if <code class="highlighter-rouge">httpServerEnabled</code> is set to true.</p>
</td>
<td><code>8080</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="security-settings">Security settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="bookieAuthProviderFactoryClass">
<td><code>bookieAuthProviderFactoryClass</code></td>
<td><p>The bookie authentication provider factory class name. If this is null, no authentication will take place.</p>
</td>
<td></td>
</tr>
<tr id="permittedStartupUsers">
<td><code>permittedStartupUsers</code></td>
<td><p>The list of users are permitted to run the bookie process. Any users can run the bookie process if it is not set.</p>
<p>Example settings - “permittedStartupUsers=user1,user2,user3”</p>
</td>
<td></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="tls-settings">TLS settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="tslProvider">
<td><code>tslProvider</code></td>
<td><p>TLS Provider (JDK or OpenSSL)</p>
</td>
<td><code>OpenSSL</code></td>
</tr>
<tr id="tlsProviderFactoryClass">
<td><code>tlsProviderFactoryClass</code></td>
<td><p>The path to the class that provides security.</p>
</td>
<td><code>org.apache.bookkeeper.tls.TLSContextFactory</code></td>
</tr>
<tr id="tlsClientAuthentication">
<td><code>tlsClientAuthentication</code></td>
<td><p>Type of security used by server.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="tlsKeyStoreType">
<td><code>tlsKeyStoreType</code></td>
<td><p>Bookie Keystore type.</p>
</td>
<td><code>JKS</code></td>
</tr>
<tr id="tlsKeyStore">
<td><code>tlsKeyStore</code></td>
<td><p>Bookie Keystore location (path).</p>
</td>
<td></td>
</tr>
<tr id="tlsKeyStore">
<td><code>tlsKeyStore</code></td>
<td><p>Bookie Keystore location (path).</p>
</td>
<td></td>
</tr>
<tr id="tlsKeyStorePasswordPath">
<td><code>tlsKeyStorePasswordPath</code></td>
<td><p>Bookie Keystore password path, if the keystore is protected by a password.</p>
</td>
<td></td>
</tr>
<tr id="tlsTrustStoreType">
<td><code>tlsTrustStoreType</code></td>
<td><p>Bookie Truststore type.</p>
</td>
<td></td>
</tr>
<tr id="tlsTrustStore">
<td><code>tlsTrustStore</code></td>
<td><p>Bookie Truststore location (path).</p>
</td>
<td></td>
</tr>
<tr id="tlsTrustStorePasswordPath">
<td><code>tlsTrustStorePasswordPath</code></td>
<td><p>Bookie Truststore password path, if the truststore is protected by a password.</p>
</td>
<td></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="journal-settings">Journal settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="journalDirectories">
<td><code>journalDirectories</code></td>
<td><p>The directories to which Bookkeeper outputs its write-ahead log (WAL). Could define multi directories to store write head logs, separated by ‘,’.
For example:
journalDirectories=/tmp/bk-journal1,/tmp/bk-journal2
If journalDirectories is set, bookies will skip journalDirectory and use this setting directory.</p>
</td>
<td><code>/tmp/bk-journal</code></td>
</tr>
<tr id="journalDirectory">
<td><code>journalDirectory</code></td>
<td><p>@Deprecated since 4.5.0, in favor of using <code class="highlighter-rouge">journalDirectories</code>.</p>
<p>The directory to which Bookkeeper outputs its write-ahead log (WAL).</p>
</td>
<td><code>/tmp/bk-txn</code></td>
</tr>
<tr id="journalFormatVersionToWrite">
<td><code>journalFormatVersionToWrite</code></td>
<td><p>The journal format version to write.
Available formats are 1-5:
1: no header
2: a header section was added
3: ledger key was introduced
4: fencing key was introduced
5: expanding header to 512 and padding writes to align sector size configured by <code class="highlighter-rouge">journalAlignmentSize</code>
6: persisting explicitLac is introduced</p>
<p>By default, it is <code class="highlighter-rouge">6</code>.
If you’d like to disable persisting ExplicitLac, you can set this config to &lt; <code class="highlighter-rouge">6</code> and also fileInfoFormatVersionToWrite should be set to 0. If there is mismatch then the serverconfig is considered invalid.
You can disable <code class="highlighter-rouge">padding-writes</code> by setting journal version back to <code class="highlighter-rouge">4</code>. This feature is available in 4.5.0 and onward versions.</p>
</td>
<td><code>6</code></td>
</tr>
<tr id="journalMaxSizeMB">
<td><code>journalMaxSizeMB</code></td>
<td><p>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.</p>
</td>
<td><code>2048</code></td>
</tr>
<tr id="journalMaxBackups">
<td><code>journalMaxBackups</code></td>
<td><p>Max number of old journal file to kept. Keep a number of old journal files would help data recovery in specia case.</p>
</td>
<td><code>5</code></td>
</tr>
<tr id="journalPreAllocSizeMB">
<td><code>journalPreAllocSizeMB</code></td>
<td><p>How much space should we pre-allocate at a time in the journal.</p>
</td>
<td><code>16</code></td>
</tr>
<tr id="journalWriteBufferSizeKB">
<td><code>journalWriteBufferSizeKB</code></td>
<td><p>Size of the write buffers used for the journal.</p>
</td>
<td><code>64</code></td>
</tr>
<tr id="journalRemoveFromPageCache">
<td><code>journalRemoveFromPageCache</code></td>
<td><p>Should we remove pages from page cache after force write</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="journalSyncData">
<td><code>journalSyncData</code></td>
<td><p>Should the data be fsynced on journal before acknowledgment.
By default, data sync is enabled to guarantee durability of writes. Beware - when disabling data sync in the bookie journal
might improve the bookie write performance, it will also introduce the possibility of data loss. With no fsync, the journal
entries are written in the OS page cache but not flushed to disk. In case of power failure, the affected bookie might lose
the unflushed data. If the ledger is replicated to multiple bookies, the chances of data loss are reduced though still present.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="journalAdaptiveGroupWrites">
<td><code>journalAdaptiveGroupWrites</code></td>
<td><p>Should we group journal force writes, which optimize group commit for higher throughput.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="journalMaxGroupWaitMSec">
<td><code>journalMaxGroupWaitMSec</code></td>
<td><p>Maximum latency to impose on a journal write to achieve grouping.</p>
</td>
<td><code>2</code></td>
</tr>
<tr id="journalBufferedWritesThreshold">
<td><code>journalBufferedWritesThreshold</code></td>
<td><p>Maximum writes to buffer to achieve grouping.</p>
</td>
<td><code>524288</code></td>
</tr>
<tr id="journalFlushWhenQueueEmpty">
<td><code>journalFlushWhenQueueEmpty</code></td>
<td><p>If we should flush the journal when journal queue is empty.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="journalAlignmentSize">
<td><code>journalAlignmentSize</code></td>
<td><p>All the journal writes and commits should be aligned to given size. If not, zeros will be padded to align to given size.</p>
</td>
<td><code>512</code></td>
</tr>
<tr id="journalBufferedEntriesThreshold">
<td><code>journalBufferedEntriesThreshold</code></td>
<td><p>Maximum entries to buffer to impose on a journal write to achieve grouping.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="journalFlushWhenQueueEmpty">
<td><code>journalFlushWhenQueueEmpty</code></td>
<td><p>If we should flush the journal when journal queue is empty.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="journalQueueSize">
<td><code>journalQueueSize</code></td>
<td><p>Set the size of the journal queue.</p>
</td>
<td><code>10000</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="ledger-storage-settings">Ledger storage settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="ledgerStorageClass">
<td><code>ledgerStorageClass</code></td>
<td><p>Ledger storage implementation class</p>
<p>Options:</p>
<ul>
<li>org.apache.bookkeeper.bookie.InterleavedLedgerStorage</li>
<li>org.apache.bookkeeper.bookie.SortedLedgerStorage</li>
<li>org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage</li>
</ul>
</td>
<td><code>org.apache.bookkeeper.bookie.SortedLedgerStorage</code></td>
</tr>
<tr id="sortedLedgerStorageEnabled">
<td><code>sortedLedgerStorageEnabled</code></td>
<td><p>@Deprecated in favor of using <code class="highlighter-rouge">ledgerStorageClass</code></p>
<p>Whether sorted-ledger storage enabled (default true)</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="ledgerDirectories">
<td><code>ledgerDirectories</code></td>
<td><p>The directory to which Bookkeeper outputs ledger snapshots. You can define multiple directories to store snapshots separated by a comma, for example <code class="highlighter-rouge">/tmp/data-dir1,/tmp/data-dir2</code>.</p>
</td>
<td><code>/tmp/bk-data</code></td>
</tr>
<tr id="indexDirectories">
<td><code>indexDirectories</code></td>
<td><p>The directories in which index files are stored. If not specified, the value of <a href="#ledgerDirectories"><code class="highlighter-rouge">ledgerDirectories</code></a> will be used.</p>
</td>
<td><code>/tmp/bk-data</code></td>
</tr>
<tr id="minUsableSizeForIndexFileCreation">
<td><code>minUsableSizeForIndexFileCreation</code></td>
<td><p>Minimum safe usable size to be available in index directory for bookie to create index file while replaying journal at the time of bookie start in readonly mode (in bytes)</p>
</td>
<td><code>1073741824</code></td>
</tr>
<tr id="minUsableSizeForEntryLogCreation">
<td><code>minUsableSizeForEntryLogCreation</code></td>
<td><p>Minimum safe usable size to be available in ledger directory for bookie to create entry log files (in bytes).
This parameter allows creating entry log files when there are enough disk spaces, even when
the bookie is running at readonly mode because of the disk usage is exceeding <code class="highlighter-rouge">diskUsageThreshold</code>.
Because compaction, journal replays can still write data to disks when a bookie is readonly.</p>
</td>
<td><code>1.2 * `logSizeLimit`</code></td>
</tr>
<tr id="minUsableSizeForHighPriorityWrites">
<td><code>minUsableSizeForHighPriorityWrites</code></td>
<td><p>Minimum safe usable size to be available in ledger directory for bookie to accept high priority writes even it is in readonly mode.</p>
</td>
<td><code>1.2 * `logSizeLimit`</code></td>
</tr>
<tr id="flushInterval">
<td><code>flushInterval</code></td>
<td><p>When entryLogPerLedgerEnabled is enabled, checkpoint doesn’t happens when a new active entrylog is created / previous one is rolled over. Instead SyncThread checkpoints periodically with ‘flushInterval’ delay (in milliseconds) in between executions. Checkpoint flushes both ledger entryLogs and ledger index pages to disk. Flushing entrylog and 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. This config is used only when entryLogPerLedgerEnabled is enabled.</p>
</td>
<td><code>10000</code></td>
</tr>
<tr id="allowStorageExpansion">
<td><code>allowStorageExpansion</code></td>
<td><p>Allow the expansion of bookie storage capacity. Newly added ledger and index directories must be empty.</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="entry-log-settings">Entry log settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="logSizeLimit">
<td><code>logSizeLimit</code></td>
<td><p>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.</p>
</td>
<td><code>2147483648</code></td>
</tr>
<tr id="entryLogFilePreallocationEnabled">
<td><code>entryLogFilePreallocationEnabled</code></td>
<td><p>Enable/Disable entry logger preallocation</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="flushEntrylogBytes">
<td><code>flushEntrylogBytes</code></td>
<td><p>Entry log flush interval, in bytes. Setting this to 0 or less disables this feature and makes flush happen on log rotation. Flushing in smaller chunks but more frequently reduces spikes in disk I/O. Flushing too frequently may negatively affect performance.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="readBufferSizeBytes">
<td><code>readBufferSizeBytes</code></td>
<td><p>The capacity allocated for <a href="/api/org/apache/bookkeeper/bookie/BufferedReadChannel"><code class="highlighter-rouge">BufferedReadChannel</code></a>s, in bytes.</p>
</td>
<td><code>512</code></td>
</tr>
<tr id="writeBufferSizeBytes">
<td><code>writeBufferSizeBytes</code></td>
<td><p>The number of bytes used as capacity for the write buffer.</p>
</td>
<td><code>65536</code></td>
</tr>
<tr id="entryLogPerLedgerEnabled">
<td><code>entryLogPerLedgerEnabled</code></td>
<td><p>Specifies if entryLog per ledger is enabled/disabled. If it is enabled, then there would be a active entrylog for each ledger. It would be ideal to enable this feature if the underlying storage device has multiple DiskPartitions or SSD and if in a given moment, entries of fewer number of active ledgers are written to the bookie.</p>
</td>
<td></td>
</tr>
<tr id="entrylogMapAccessExpiryTimeInSeconds">
<td><code>entrylogMapAccessExpiryTimeInSeconds</code></td>
<td><p>config specifying if the entrylog per ledger is enabled, then the amount of time EntryLogManagerForEntryLogPerLedger should wait for closing the entrylog file after the last addEntry call for that ledger, if explicit writeclose for that ledger is not received.</p>
</td>
<td><code>300</code></td>
</tr>
<tr id="maximumNumberOfActiveEntryLogs">
<td><code>maximumNumberOfActiveEntryLogs</code></td>
<td><p>in entryLogPerLedger feature, this specifies the maximum number of entrylogs that can be active at a given point in time. If there are more number of active entryLogs then the maximumNumberOfActiveEntryLogs then the entrylog will be evicted from the cache.</p>
</td>
<td><code>500</code></td>
</tr>
<tr id="entryLogPerLedgerCounterLimitsMultFactor">
<td><code>entryLogPerLedgerCounterLimitsMultFactor</code></td>
<td><p>in EntryLogManagerForEntryLogPerLedger, this config value specifies the metrics cache size limits in multiples of entrylogMap cache size limits.</p>
</td>
<td><code>10</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="entry-log-compaction-settings">Entry log compaction settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="compactionRate">
<td><code>compactionRate</code></td>
<td><p>The rate at which compaction will read entries. The unit is adds per second.</p>
</td>
<td><code>1000</code></td>
</tr>
<tr id="minorCompactionThreshold">
<td><code>minorCompactionThreshold</code></td>
<td><p>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.</p>
</td>
<td><code>0.2</code></td>
</tr>
<tr id="minorCompactionInterval">
<td><code>minorCompactionInterval</code></td>
<td><p>Interval to run minor compaction, in seconds. If it is set to less than zero, the minor compaction is disabled.</p>
</td>
<td><code>3600</code></td>
</tr>
<tr id="compactionMaxOutstandingRequests">
<td><code>compactionMaxOutstandingRequests</code></td>
<td><p>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 are cached in memory. Once the entrylog is flushed the index is updated with the new offsets. This parameter controls the number of entries added to the entrylog before a flush is forced. A higher value for this parameter means more memory will be used for offsets. Each offset consists of 3 longs. This parameter should <em>not</em> be modified unless you know what you’re doing.</p>
</td>
<td><code>100000</code></td>
</tr>
<tr id="majorCompactionThreshold">
<td><code>majorCompactionThreshold</code></td>
<td><p>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.</p>
</td>
<td><code>0.8</code></td>
</tr>
<tr id="majorCompactionInterval">
<td><code>majorCompactionInterval</code></td>
<td><p>Interval to run major compaction, in seconds. If it is set to less than zero, the major compaction is disabled.</p>
</td>
<td><code>86400</code></td>
</tr>
<tr id="isThrottleByBytes">
<td><code>isThrottleByBytes</code></td>
<td><p>Throttle compaction by bytes or by entries.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="compactionRateByEntries">
<td><code>compactionRateByEntries</code></td>
<td><p>Set the rate at which compaction will read entries. The unit is adds per second.</p>
</td>
<td><code>1000</code></td>
</tr>
<tr id="compactionRateByBytes">
<td><code>compactionRateByBytes</code></td>
<td><p>Set the rate at which compaction will read entries. The unit is bytes added per second.</p>
</td>
<td><code>1000000</code></td>
</tr>
<tr id="useTransactionalCompaction">
<td><code>useTransactionalCompaction</code></td>
<td><p>Flag to enable/disable transactional compaction. If it is set to true, it will use transactional compaction, which uses
new entry log files to store entries after compaction; otherwise, it will use normal compaction, which shares same entry
log file with normal add operations.</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="garbage-collection-settings">Garbage collection settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="gcWaitTime">
<td><code>gcWaitTime</code></td>
<td><p>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.</p>
</td>
<td><code>1000</code></td>
</tr>
<tr id="gcOverreplicatedLedgerWaitTime">
<td><code>gcOverreplicatedLedgerWaitTime</code></td>
<td><p>How long the interval to trigger next garbage collection of overreplicated ledgers, in milliseconds. This should not be run very frequently since we read the metadata for all the ledgers on the bookie from zk.</p>
</td>
<td><code>86400000</code></td>
</tr>
<tr id="isForceGCAllowWhenNoSpace">
<td><code>isForceGCAllowWhenNoSpace</code></td>
<td><p>Whether force compaction is allowed when the disk is full or almost full. Forcing GC may get some space back, but may also fill up disk space more quickly. This is because new log files are created before GC, while old garbage log files are deleted after GC.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="verifyMetadataOnGC">
<td><code>verifyMetadataOnGC</code></td>
<td><p>Whether the bookie should double check if a ledger exists in metadata service prior to gc.</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="disk-utilization">Disk utilization</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="diskUsageThreshold">
<td><code>diskUsageThreshold</code></td>
<td><p>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).</p>
</td>
<td><code>0.95</code></td>
</tr>
<tr id="diskUsageWarnThreshold">
<td><code>diskUsageWarnThreshold</code></td>
<td><p>The disk free space low water mark threshold. Disk is considered full when usage threshold is exceeded. Disk returns back to non-full state when usage is below low water mark threshold. This prevents it from going back and forth between these states frequently when concurrent writes and compaction are happening. This also prevent bookie from switching frequently between read-only and read-writes states in the same cases.</p>
</td>
<td><code>0.95</code></td>
</tr>
<tr id="diskUsageLwmThreshold">
<td><code>diskUsageLwmThreshold</code></td>
<td><p>Set the disk free space low water mark threshold. Disk is considered full when usage threshold is exceeded. Disk returns back to non-full state when usage is below low water mark threshold. This prevents it from going back and forth between these states frequently when concurrent writes and compaction are happening. This also prevent bookie from switching frequently between read-only and read-writes states in the same cases.</p>
</td>
<td><code>0.9</code></td>
</tr>
<tr id="diskCheckInterval">
<td><code>diskCheckInterval</code></td>
<td><p>Disk check interval in milliseconds. Interval to check the ledger dirs usage.</p>
</td>
<td><code>10000</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="sorted-ledger-storage-settings">Sorted Ledger Storage Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="skipListSizeLimit">
<td><code>skipListSizeLimit</code></td>
<td><p>The skip list data size limitation (default 64MB) in EntryMemTable</p>
</td>
<td><code>67108864</code></td>
</tr>
<tr id="skipListArenaChunkSize">
<td><code>skipListArenaChunkSize</code></td>
<td><p>The number of bytes we should use as chunk allocation for org.apache.bookkeeper.bookie.SkipListArena</p>
</td>
<td><code>4194304</code></td>
</tr>
<tr id="skipListArenaMaxAllocSize">
<td><code>skipListArenaMaxAllocSize</code></td>
<td><p>The max size we should allocate from the skiplist arena. Allocations larger than this should be allocated directly by the VM to avoid fragmentation.</p>
</td>
<td><code>131072</code></td>
</tr>
<tr id="openFileLimit">
<td><code>openFileLimit</code></td>
<td><p>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.</p>
</td>
<td><code>20000</code></td>
</tr>
<tr id="fileInfoCacheInitialCapacity">
<td><code>fileInfoCacheInitialCapacity</code></td>
<td><p>The minimum total size of the internal file info cache table. Providing a large enough estimate at construction time avoids the need for expensive resizing operations later,
but setting this value unnecessarily high wastes memory. The default value is <code class="highlighter-rouge">1/4</code> of <code class="highlighter-rouge">openFileLimit</code> if openFileLimit is positive, otherwise it is 64.</p>
</td>
<td></td>
</tr>
<tr id="fileInfoMaxIdleTime">
<td><code>fileInfoMaxIdleTime</code></td>
<td><p>The max idle time allowed for an open file info existed in the file info cache. If the file info is idle for a long time, exceed the given time period. The file info will be
evicted and closed. If the value is zero or negative, the file info is evicted only when opened files reached <code class="highlighter-rouge">openFileLimit</code>.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="fileInfoFormatVersionToWrite">
<td><code>fileInfoFormatVersionToWrite</code></td>
<td><p>The fileinfo format version to write.
Available formats are 0-1:
0: Initial version
1: persisting explicitLac is introduced</p>
<p>By default, it is <code class="highlighter-rouge">1</code>. If you’d like to disable persisting ExplicitLac, you can set this config to 0 and also journalFormatVersionToWrite should be set to &lt; 6. If there is mismatch then the serverconfig is considered invalid.</p>
</td>
<td><code>1</code></td>
</tr>
<tr id="pageSize">
<td><code>pageSize</code></td>
<td><p>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.</p>
</td>
<td><code>8192</code></td>
</tr>
<tr id="pageLimit">
<td><code>pageLimit</code></td>
<td><p>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.</p>
</td>
<td><code>-1</code></td>
</tr>
<tr id="numOfMemtableFlushThreads">
<td><code>numOfMemtableFlushThreads</code></td>
<td><p>When entryLogPerLedger is enabled SortedLedgerStorage flushes entries from memTable using OrderedExecutor having numOfMemtableFlushThreads number of threads.</p>
</td>
<td><code>8</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="db-ledger-storage-settings">DB Ledger Storage Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="dbStorage_writeCacheMaxSizeMb">
<td><code>dbStorage_writeCacheMaxSizeMb</code></td>
<td><p>Size of write cache. Memory is allocated from JVM direct memory. Write cache is used for buffer entries before flushing into the entry log. For good performance, it should be big enough to hold a substantial amount of entries in the flush interval.</p>
</td>
<td><code>25% of the available direct memory</code></td>
</tr>
<tr id="dbStorage_readAheadCacheMaxSizeMb">
<td><code>dbStorage_readAheadCacheMaxSizeMb</code></td>
<td><p>Size of read cache. Memory is allocated from JVM direct memory. The read cache is pre-filled doing read-ahead whenever a cache miss happens.</p>
</td>
<td><code>25% of the available direct memroy</code></td>
</tr>
<tr id="dbStorage_readAheadCacheBatchSize">
<td><code>dbStorage_readAheadCacheBatchSize</code></td>
<td><p>How many entries to pre-fill in cache after a read cache miss</p>
</td>
<td><code>100</code></td>
</tr>
<tr id="dbStorage_rocksDB_blockSize">
<td><code>dbStorage_rocksDB_blockSize</code></td>
<td><p>Size of RocksDB block-cache. RocksDB is used for storing ledger indexes.
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.</p>
</td>
<td><code>268435456</code></td>
</tr>
<tr id="dbStorage_rocksDB_writeBufferSizeMB">
<td><code>dbStorage_rocksDB_writeBufferSizeMB</code></td>
<td><p>Size of RocksDB write buffer. RocksDB is used for storing ledger indexes.</p>
</td>
<td><code>64</code></td>
</tr>
<tr id="dbStorage_rocksDB_sstSizeInMB">
<td><code>dbStorage_rocksDB_sstSizeInMB</code></td>
<td><p>Size of RocksDB sst file size in MB. RocksDB is used for storing ledger indexes.</p>
</td>
<td><code>64</code></td>
</tr>
<tr id="dbStorage_rocksDB_blockSize">
<td><code>dbStorage_rocksDB_blockSize</code></td>
<td>
</td>
<td><code>65536</code></td>
</tr>
<tr id="dbStorage_rocksDB_bloomFilterBitsPerKey">
<td><code>dbStorage_rocksDB_bloomFilterBitsPerKey</code></td>
<td>
</td>
<td><code>10</code></td>
</tr>
<tr id="dbStorage_rocksDB_numLevels">
<td><code>dbStorage_rocksDB_numLevels</code></td>
<td>
</td>
<td><code>-1</code></td>
</tr>
<tr id="dbStorage_rocksDB_numFilesInLevel0">
<td><code>dbStorage_rocksDB_numFilesInLevel0</code></td>
<td>
</td>
<td><code>10</code></td>
</tr>
<tr id="dbStorage_rocksDB_maxSizeInLevel1MB">
<td><code>dbStorage_rocksDB_maxSizeInLevel1MB</code></td>
<td>
</td>
<td><code>256</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="metadata-service-settings">Metadata Service Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="metadataServiceUri">
<td><code>metadataServiceUri</code></td>
<td><p>metadata service uri that bookkeeper is used for loading corresponding metadata driver and resolving its metadata service location.</p>
</td>
<td><code>zk+hierarchical://localhost:2181/ledgers</code></td>
</tr>
<tr id="ledgerManagerFactoryClass">
<td><code>ledgerManagerFactoryClass</code></td>
<td><p>@Deprecated in favor of using <code class="highlighter-rouge">metadataServiceUri</code></p>
<p>The ledger manager factory class, which defines how ledgers are stored, managed, and garbage collected. See the <a href="../../getting-started/concepts#ledger-manager">Ledger Manager</a> guide for more details.</p>
</td>
<td><code>hierarchical</code></td>
</tr>
<tr id="allowShadedLedgerManagerFactoryClass">
<td><code>allowShadedLedgerManagerFactoryClass</code></td>
<td><p>Sometimes the bookkeeper server classes are shaded. The ledger manager factory classes might be relocated to be under other packages.
This would fail the clients using shaded factory classes since the factory classes are stored in cookies and used for verification.
Users can enable this flag to allow using shaded ledger manager factory classes to connect to a bookkeeper cluster.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="shadedLedgerManagerFactoryClassPrefix">
<td><code>shadedLedgerManagerFactoryClassPrefix</code></td>
<td><p>The shaded ledger manager factory prefix. This is used when <code class="highlighter-rouge">allowShadedLedgerManagerFactoryClass</code> is set to true.</p>
</td>
<td><code>dlshade.</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="zookeeper-metadata-service-settings">ZooKeeper Metadata Service Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="zkLedgersRootPath">
<td><code>zkLedgersRootPath</code></td>
<td><p>@Deprecated in favor of using <code class="highlighter-rouge">metadataServiceUri</code></p>
<p>Root Zookeeper path to store ledger metadata. This parameter is used by zookeeper-based ledger manager as a root znode to store all ledgers.</p>
</td>
<td><code>/ledgers</code></td>
</tr>
<tr id="zkServers">
<td><code>zkServers</code></td>
<td><p>@Deprecated in favor of using <code class="highlighter-rouge">metadataServiceUri</code></p>
<p>A list of one of more servers on which Zookeeper is running. The server list can be comma separated values, for example <code class="highlighter-rouge">zkServers=zk1:2181,zk2:2181,zk3:2181</code>.</p>
</td>
<td><code>localhost:2181</code></td>
</tr>
<tr id="zkTimeout">
<td><code>zkTimeout</code></td>
<td><p>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.</p>
</td>
<td><code>10000</code></td>
</tr>
<tr id="zkRetryBackoffStartMs">
<td><code>zkRetryBackoffStartMs</code></td>
<td><p>The Zookeeper client backoff retry start time in millis.</p>
</td>
<td><code>1000</code></td>
</tr>
<tr id="zkRetryBackoffMaxMs">
<td><code>zkRetryBackoffMaxMs</code></td>
<td><p>The Zookeeper client backoff retry max time in millis.</p>
</td>
<td><code>10000</code></td>
</tr>
<tr id="zkRequestRateLimit">
<td><code>zkRequestRateLimit</code></td>
<td><p>The Zookeeper request limit. It is only enabled when setting a postivie value.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="zkEnableSecurity">
<td><code>zkEnableSecurity</code></td>
<td><p>Set ACLs on every node written on ZooKeeper, this way only allowed users will be able to read and write BookKeeper metadata stored on ZooKeeper. In order to make ACLs work you need to setup ZooKeeper JAAS authentication all the bookies and Client need to share the same user, and this is usually done using Kerberos authentication. See ZooKeeper documentation</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="statistics">Statistics</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="enableStatistics">
<td><code>enableStatistics</code></td>
<td><p>Whether statistics are enabled for the bookie.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="statsProviderClass">
<td><code>statsProviderClass</code></td>
<td><p>Stats provider class.
Options:</p>
<ul>
<li>Prometheus : org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider</li>
<li>Codahale : org.apache.bookkeeper.stats.codahale.CodahaleMetricsProvider</li>
<li>Twitter Finagle : org.apache.bookkeeper.stats.twitter.finagle.FinagleStatsProvider</li>
<li>Twitter Ostrich : org.apache.bookkeeper.stats.twitter.ostrich.OstrichProvider</li>
<li>Twitter Science : org.apache.bookkeeper.stats.twitter.science.TwitterStatsProvider</li>
</ul>
</td>
<td><code>org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider</code></td>
</tr>
<tr id="limitStatsLogging">
<td><code>limitStatsLogging</code></td>
<td><p>option to limit stats logging</p>
</td>
<td><code>false</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="prometheus-metrics-provider-settings">Prometheus Metrics Provider Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="prometheusStatsHttpAddress">
<td><code>prometheusStatsHttpAddress</code></td>
<td><p>default bind address for Prometheus metrics exporter</p>
</td>
<td><code>0.0.0.0</code></td>
</tr>
<tr id="prometheusStatsHttpPort">
<td><code>prometheusStatsHttpPort</code></td>
<td><p>default port for prometheus metrics exporter</p>
</td>
<td><code>8000</code></td>
</tr>
<tr id="prometheusStatsLatencyRolloverSeconds">
<td><code>prometheusStatsLatencyRolloverSeconds</code></td>
<td><p>latency stats rollover interval, in seconds</p>
</td>
<td><code>60</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="codahale-metrics-provider-settings">Codahale Metrics Provider Settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="codahaleStatsPrefix">
<td><code>codahaleStatsPrefix</code></td>
<td><p>metric name prefix, default is empty.</p>
</td>
<td><code></code></td>
</tr>
<tr id="codahaleStatsOutputFrequencySeconds">
<td><code>codahaleStatsOutputFrequencySeconds</code></td>
<td><p>the frequency that stats reporters report stats, in seconds.</p>
</td>
<td><code>60</code></td>
</tr>
<tr id="codahaleStatsGraphiteEndpoint">
<td><code>codahaleStatsGraphiteEndpoint</code></td>
<td><p>the graphite endpoint for reporting stats. see <a href="//metrics.dropwizard.io/3.1.0/manual/graphite/">graphite reporter</a> for more details.</p>
</td>
<td><code>null</code></td>
</tr>
<tr id="codahaleStatsCSVEndpoint">
<td><code>codahaleStatsCSVEndpoint</code></td>
<td><p>the directory for reporting stats in csv format. see <a href="//metrics.dropwizard.io/3.1.0/manual/core/#csv">csv reporter</a> for more details.</p>
</td>
<td><code>null</code></td>
</tr>
<tr id="codahaleStatsSlf4jEndpoint">
<td><code>codahaleStatsSlf4jEndpoint</code></td>
<td><p>the slf4j endpoint for reporting stats. see <a href="//metrics.dropwizard.io/3.1.0/manual/core/#slf4j">slf4j reporter</a> for more details.</p>
</td>
<td><code>null</code></td>
</tr>
<tr id="codahaleStatsJmxEndpoint">
<td><code>codahaleStatsJmxEndpoint</code></td>
<td><p>the jmx endpoint for reporting stats. see <a href="//metrics.dropwizard.io/3.1.0/manual/core/#jmx">jmx reporter</a> for more details.</p>
</td>
<td></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="twitter-ostrich-metrics-provider">Twitter Ostrich Metrics Provider</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="statsExport">
<td><code>statsExport</code></td>
<td><p>Flag to control whether to expose ostrich metrics via a http endpoint configured by <code class="highlighter-rouge">statsHttpPort</code>.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="statsHttpPort">
<td><code>statsHttpPort</code></td>
<td><p>The http port of exposing ostrich stats if <code class="highlighter-rouge">statsExport</code> is set to true</p>
</td>
<td><code>9002</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="twitter-science-metrics-provider">Twitter Science Metrics Provider</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="statsExport">
<td><code>statsExport</code></td>
<td><p>Flag to control whether to expose metrics via a http endpoint configured by <code class="highlighter-rouge">statsHttpPort</code>.</p>
</td>
<td><code>false</code></td>
</tr>
<tr id="statsHttpPort">
<td><code>statsHttpPort</code></td>
<td><p>The http port of exposing stats if <code class="highlighter-rouge">statsExport</code> is set to true</p>
</td>
<td><code>9002</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="autorecovery-general-settings">AutoRecovery general settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="autoRecoveryDaemonEnabled">
<td><code>autoRecoveryDaemonEnabled</code></td>
<td><p>Whether the bookie itself can start auto-recovery service also or not.</p>
</td>
<td></td>
</tr>
<tr id="digestType">
<td><code>digestType</code></td>
<td><p>The default digest type used for opening ledgers.</p>
</td>
<td><code>CRC32</code></td>
</tr>
<tr id="passwd">
<td><code>passwd</code></td>
<td><p>The default password used for opening ledgers. Default value is empty string.</p>
</td>
<td><code></code></td>
</tr>
<tr id="enableDigestTypeAutodetection">
<td><code>enableDigestTypeAutodetection</code></td>
<td><p>The flag to enable/disable digest type auto-detection. If it is enabled, the bookkeeper client will ignore the provided digest type provided at <code class="highlighter-rouge">digestType</code> and the provided passwd provided at <code class="highlighter-rouge">passwd</code>.</p>
</td>
<td><code>true</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="autorecovery-placement-settings">AutoRecovery placement settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="ensemblePlacementPolicy">
<td><code>ensemblePlacementPolicy</code></td>
<td><p>The ensemble placement policy used for finding bookie for re-replicating entries.</p>
<p>Options:</p>
<ul>
<li>org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy</li>
<li>org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy</li>
</ul>
</td>
<td><code>org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy</code></td>
</tr>
<tr id="reppDnsResolverClass">
<td><code>reppDnsResolverClass</code></td>
<td><p>The DNS resolver class used for resolving network locations for bookies. The setting is used
when using either RackawareEnsemblePlacementPolicy and RegionAwareEnsemblePlacementPolicy.</p>
</td>
<td><code>org.apache.bookkeeper.net.ScriptBasedMapping</code></td>
</tr>
<tr id="networkTopologyScriptFileName">
<td><code>networkTopologyScriptFileName</code></td>
<td><p>The bash script used by <code class="highlighter-rouge">ScriptBasedMapping</code> DNS resolver for resolving bookies’ network locations.</p>
</td>
<td></td>
</tr>
<tr id="networkTopologyScriptNumberArgs">
<td><code>networkTopologyScriptNumberArgs</code></td>
<td><p>The max number of args used in the script provided at <code class="highlighter-rouge">networkTopologyScriptFileName</code>.</p>
</td>
<td></td>
</tr>
<tr id="minNumRacksPerWriteQuorum">
<td><code>minNumRacksPerWriteQuorum</code></td>
<td><p>minimum number of racks per write quorum. RackawareEnsemblePlacementPolicy will try to get bookies from atleast ‘minNumRacksPerWriteQuorum’ racks for a writeQuorum.</p>
</td>
<td></td>
</tr>
<tr id="enforceMinNumRacksPerWriteQuorum">
<td><code>enforceMinNumRacksPerWriteQuorum</code></td>
<td><p>‘enforceMinNumRacksPerWriteQuorum’ enforces RackawareEnsemblePlacementPolicy to pick bookies from ‘minNumRacksPerWriteQuorum’ racks for a writeQuorum. If it cann’t find bookie then it would throw BKNotEnoughBookiesException instead of picking random one.</p>
</td>
<td></td>
</tr>
<tr id="ignoreLocalNodeInPlacementPolicy">
<td><code>ignoreLocalNodeInPlacementPolicy</code></td>
<td><p>‘ignoreLocalNodeInPlacementPolicy’ specifies whether to ignore localnode in the internal logic of placement policy. If it is not possible or useful to use Bookkeeper client node’s (or AutoReplicator) rack/region info. for placement policy then it is better to ignore localnode instead of false alarming with log lines and metrics.</p>
</td>
<td></td>
</tr>
<tr id="enforceMinNumFaultDomainsForWrite">
<td><code>enforceMinNumFaultDomainsForWrite</code></td>
<td><p>‘enforceMinNumFaultDomainsForWrite’ enforces EnsemblePlacementPolicy to check if a write has made it to bookies in ‘minNumRacksPerWriteQuorum’ number of fault domains, before acknowledging the write back.</p>
</td>
<td></td>
</tr>
<tr id="minNumZonesPerWriteQuorum">
<td><code>minNumZonesPerWriteQuorum</code></td>
<td><p>minimum number of zones per write quorum in ZoneawareEnsemblePlacementPolicy. ZoneawareEnsemblePlacementPolicy would get bookies from atleast ‘minNumZonesPerWriteQuorum’ racks for a writeQuorum.</p>
</td>
<td><code>2</code></td>
</tr>
<tr id="desiredNumZonesPerWriteQuorum">
<td><code>desiredNumZonesPerWriteQuorum</code></td>
<td><p>desired number of zones per write quorum in ZoneawareEnsemblePlacementPolicy. ZoneawareEnsemblePlacementPolicy will try to get bookies from ‘desiredNumZonesPerWriteQuorum’ zones for a writeQuorum.</p>
</td>
<td><code>3</code></td>
</tr>
<tr id="enforceStrictZoneawarePlacement">
<td><code>enforceStrictZoneawarePlacement</code></td>
<td><p>in ZoneawareEnsemblePlacementPolicy if strict placement is enabled then minZones/desiredZones in writeQuorum would be maintained otherwise it will pick nodes randomly.</p>
</td>
<td><code>true</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="autorecovery-auditor-settings">AutoRecovery auditor settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="auditorPeriodicBookieCheckInterval">
<td><code>auditorPeriodicBookieCheckInterval</code></td>
<td><p>The time interval between auditor bookie checks, in seconds. The auditor bookie check checks ledger metadata to see which bookies should contain entries for each ledger. If a bookie that should contain entries is unavailable, then the ledger containing that entry is marked for recovery. Setting this to 0 disables the periodic check. Bookie checks will still run when a bookie fails. The default is once per day.</p>
</td>
<td><code>86400</code></td>
</tr>
<tr id="auditorPeriodicCheckInterval">
<td><code>auditorPeriodicCheckInterval</code></td>
<td><p>The time interval, in seconds, at which the auditor will check all ledgers in the cluster. By default this runs once a week.</p>
<p>Set this to 0 to disable the periodic check completely. Note that periodic checking will put extra load on the cluster, so it should not be run more frequently than once a day.</p>
</td>
<td><code>604800</code></td>
</tr>
<tr id="auditorPeriodicPlacementPolicyCheckInterval">
<td><code>auditorPeriodicPlacementPolicyCheckInterval</code></td>
<td><p>The time interval between auditor placement policy checks, in seconds. The auditor placement policy check validates if the ensemble of segments of all the closed ledgers is adhering to the placement policy. It is just monitoring scrutiny but doesn’t take any corrective measure other than logging error and reporting metrics. By default it is disabled.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="auditorLedgerVerificationPercentage">
<td><code>auditorLedgerVerificationPercentage</code></td>
<td><p>The percentage of a ledger (fragment)’s entries will be verified before claiming a fragment as missing. If it is 0, it only verifies the first and last entries of a given fragment.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="lostBookieRecoveryDelay">
<td><code>lostBookieRecoveryDelay</code></td>
<td><p>How long to wait, in seconds, before starting autorecovery of a lost bookie.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="storeSystemTimeAsLedgerUnderreplicatedMarkTime">
<td><code>storeSystemTimeAsLedgerUnderreplicatedMarkTime</code></td>
<td><p>Enable the Auditor to use system time as underreplicated ledger mark time. If this is enabled, Auditor will write a ctime field into the underreplicated ledger znode.</p>
</td>
<td><code>true</code></td>
</tr>
<tr id="underreplicatedLedgerRecoveryGracePeriod">
<td><code>underreplicatedLedgerRecoveryGracePeriod</code></td>
<td><p>The grace period (in seconds) for underreplicated ledgers recovery. If ledger is marked underreplicated for more than this period then it will be reported by placementPolicyCheck in Auditor. Setting this to 0 will disable this check.</p>
</td>
<td><code>0</code></td>
</tr>
<tr id="auditorReplicasCheckInterval">
<td><code>auditorReplicasCheckInterval</code></td>
<td><p>Sets the regularity/interval at which the auditor will run a replicas check of all ledgers, which are closed. This should not be run very often since it validates availability of replicas of all ledgers by querying bookies. Setting this to 0 will completely disable the periodic replicas check. By default it is disabled.</p>
</td>
<td><code>0</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="autorecovery-replication-worker-settings">AutoRecovery replication worker settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="rereplicationEntryBatchSize">
<td><code>rereplicationEntryBatchSize</code></td>
<td><p>The number of entries that a replication will rereplicate in parallel.</p>
</td>
<td><code>10</code></td>
</tr>
<tr id="openLedgerRereplicationGracePeriod">
<td><code>openLedgerRereplicationGracePeriod</code></td>
<td><p>The grace period, in milliseconds, that the replication worker waits before fencing and replicating a ledger fragment that’s still being written to upon bookie failure.</p>
</td>
<td><code>30000</code></td>
</tr>
<tr id="lockReleaseOfFailedLedgerGracePeriod">
<td><code>lockReleaseOfFailedLedgerGracePeriod</code></td>
<td><p>Set the grace period, in milliseconds, which the replication worker has to wait before releasing the lock after it failed to replicate a ledger. For the first ReplicationWorker.NUM_OF_EXPONENTIAL_BACKOFF_RETRIALS failures it will do exponential backoff then it will bound at lockReleaseOfFailedLedgerGracePeriod.</p>
</td>
<td><code>300000</code></td>
</tr>
<tr id="rwRereplicateBackoffMs">
<td><code>rwRereplicateBackoffMs</code></td>
<td><p>The time to backoff when replication worker encounters exceptions on replicating a ledger, in milliseconds.</p>
</td>
<td><code>5000</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<h2 id="memory-allocator-settings">Memory allocator settings</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr id="allocatorPoolingPolicy">
<td><code>allocatorPoolingPolicy</code></td>
<td><p>Define the memory pooling policy.</p>
<p>Available options are:</p>
<ul>
<li>PooledDirect: Use Direct memory for all buffers and pool the memory.
Direct memory will avoid the overhead of JVM GC and most
memory copies when reading and writing to socket channel.
Pooling will add memory space overhead due to the fact that
there will be fragmentation in the allocator and that threads
will keep a portion of memory as thread-local to avoid
contention when possible.</li>
<li>UnpooledHeap: Allocate memory from JVM heap without any pooling.
This option has the least overhead in terms of memory usage
since the memory will be automatically reclaimed by the
JVM GC but might impose a performance penalty at high
throughput.</li>
</ul>
</td>
<td><code>PooledDirect</code></td>
</tr>
<tr id="allocatorPoolingConcurrency">
<td><code>allocatorPoolingConcurrency</code></td>
<td><p>Controls the amount of concurrency for the memory pool.
Default is to have a number of allocator arenas equals to 2 * CPUS.
Decreasing this number will reduce the amount of memory overhead, at the
expense of increased allocation contention.</p>
</td>
<td><code>2 * CPUS</code></td>
</tr>
<tr id="allocatorOutOfMemoryPolicy">
<td><code>allocatorOutOfMemoryPolicy</code></td>
<td><p>Define the memory allocator out of memory policy.</p>
<p>Available options are:</p>
<ul>
<li>FallbackToHeap: If it’s not possible to allocate a buffer from direct memory,
fallback to allocate an unpooled buffer from JVM heap.
This will help absorb memory allocation spikes because the heap
allocations will naturally slow down the process and will result
if full GC cleanup if the Heap itself is full.</li>
<li>ThrowException: Throw regular OOM exception without taking addition actions.</li>
</ul>
</td>
<td><code>FallbackToHeap</code></td>
</tr>
<tr id="allocatorLeakDetectionPolicy">
<td><code>allocatorLeakDetectionPolicy</code></td>
<td><p>Define the memory allocator leak detection policy.</p>
<p>Available options are:</p>
<ul>
<li>Disabled: No leak detection and no overhead.</li>
<li>Simple: Instruments 1% of the allocated buffer to track for leaks.</li>
<li>Advanced: Instruments 1% of the allocated buffer to track for leaks, reporting
stack traces of places where the buffer was used.</li>
<li>Paranoid: Instruments 100% of the allocated buffer to track for leaks, reporting
stack traces of places where the buffer was used. Introduce very
significant overhead.</li>
</ul>
</td>
<td><code>Disabled</code></td>
</tr>
<!-- for param in group.params -->
</tbody>
</table>
<p><!-- for group in configs.groups --></p>
</section>
</div>
</div>
<div class="column is-2 is-hidden-mobile">
<div class="toc">
<h2 class="title">BookKeeper configuration</h2>
<ul class="section-nav">
<li class="toc-entry toc-h2"><a href="#server-parameters">Server parameters</a></li>
<li class="toc-entry toc-h2"><a href="#worker-thread-settings">Worker thread settings</a></li>
<li class="toc-entry toc-h2"><a href="#long-poll-settings">Long poll settings</a></li>
<li class="toc-entry toc-h2"><a href="#read-only-mode-support">Read-only mode support</a></li>
<li class="toc-entry toc-h2"><a href="#netty-server-settings">Netty server settings</a></li>
<li class="toc-entry toc-h2"><a href="#http-server-settings">Http server settings</a></li>
<li class="toc-entry toc-h2"><a href="#security-settings">Security settings</a></li>
<li class="toc-entry toc-h2"><a href="#tls-settings">TLS settings</a></li>
<li class="toc-entry toc-h2"><a href="#journal-settings">Journal settings</a></li>
<li class="toc-entry toc-h2"><a href="#ledger-storage-settings">Ledger storage settings</a></li>
<li class="toc-entry toc-h2"><a href="#entry-log-settings">Entry log settings</a></li>
<li class="toc-entry toc-h2"><a href="#entry-log-compaction-settings">Entry log compaction settings</a></li>
<li class="toc-entry toc-h2"><a href="#garbage-collection-settings">Garbage collection settings</a></li>
<li class="toc-entry toc-h2"><a href="#disk-utilization">Disk utilization</a></li>
<li class="toc-entry toc-h2"><a href="#sorted-ledger-storage-settings">Sorted Ledger Storage Settings</a></li>
<li class="toc-entry toc-h2"><a href="#db-ledger-storage-settings">DB Ledger Storage Settings</a></li>
<li class="toc-entry toc-h2"><a href="#metadata-service-settings">Metadata Service Settings</a></li>
<li class="toc-entry toc-h2"><a href="#zookeeper-metadata-service-settings">ZooKeeper Metadata Service Settings</a></li>
<li class="toc-entry toc-h2"><a href="#statistics">Statistics</a></li>
<li class="toc-entry toc-h2"><a href="#prometheus-metrics-provider-settings">Prometheus Metrics Provider Settings</a></li>
<li class="toc-entry toc-h2"><a href="#codahale-metrics-provider-settings">Codahale Metrics Provider Settings</a></li>
<li class="toc-entry toc-h2"><a href="#twitter-ostrich-metrics-provider">Twitter Ostrich Metrics Provider</a></li>
<li class="toc-entry toc-h2"><a href="#twitter-science-metrics-provider">Twitter Science Metrics Provider</a></li>
<li class="toc-entry toc-h2"><a href="#autorecovery-general-settings">AutoRecovery general settings</a></li>
<li class="toc-entry toc-h2"><a href="#autorecovery-placement-settings">AutoRecovery placement settings</a></li>
<li class="toc-entry toc-h2"><a href="#autorecovery-auditor-settings">AutoRecovery auditor settings</a></li>
<li class="toc-entry toc-h2"><a href="#autorecovery-replication-worker-settings">AutoRecovery replication worker settings</a></li>
<li class="toc-entry toc-h2"><a href="#memory-allocator-settings">Memory allocator settings</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="entry-popover-html" class="popover-template">
<p>An entry is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Entries are also known as records.</p>
</div>
<div id="ledger-popover-html" class="popover-template">
<p>A ledger is a sequence of entries written to BookKeeper. Entries are written sequentially to ledgers and at most once, giving ledgers append-only semantics.</p>
</div>
<div id="bookie-popover-html" class="popover-template">
<p>A bookie is an individual BookKeeper storage server.</p>
<p>Bookies store the content of ledgers and act as a distributed ensemble.</p>
</div>
<div id="rereplication-popover-html" class="popover-template">
<p>A subsystem that runs in the background on bookies to ensure that ledgers are fully replicated even if one bookie from the ensemble is down.</p>
</div>
<div id="striping-popover-html" class="popover-template">
<p>Striping is the process of distributing BookKeeper ledgers to sub-groups of bookies rather than to all bookies in a BookKeeper ensemble.</p>
<p>Striping is essential to ensuring fast performance.</p>
</div>
<div id="striped-popover-html" class="popover-template">
<p>Striping is the process of distributing BookKeeper ledgers to sub-groups of bookies rather than to all bookies in a BookKeeper ensemble.</p>
<p>Striping is essential to ensuring fast performance.</p>
</div>
<div id="journal-popover-html" class="popover-template">
<p>A journal file stores BookKeeper transaction logs.</p>
</div>
<div id="fencing-popover-html" class="popover-template">
<p>When a reader forces a ledger to close, preventing any further entries from being written to the ledger.</p>
</div>
<div id="record-popover-html" class="popover-template">
<p>A record is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Records are also known as entries.</p>
</div>
<script type="text/javascript">
tippy('#entry-popover', {
html: '#entry-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#ledger-popover', {
html: '#ledger-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#bookie-popover', {
html: '#bookie-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#rereplication-popover', {
html: '#rereplication-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#striping-popover', {
html: '#striping-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#striped-popover', {
html: '#striped-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#journal-popover', {
html: '#journal-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#fencing-popover', {
html: '#fencing-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#record-popover', {
html: '#record-popover-html',
arrow: true,
animation: 'fade'
});
</script>
</main>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<p>
Copyright &copy; 2016 - 2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>,<br /> licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, version 2.0</a>.
</p>
<p>
Apache BookKeeper, BookKeeper®, Apache®, the Apache feature logo, and the Apache BookKeeper logo are either registered trademarks or trademarks of The Apache Software Foundation.
</p>
</div>
</div>
</footer>
</body>
<script src="/js/app.js"></script>
<!--
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.
-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-104419626-1', 'auto');
ga('send', 'pageview');
</script>
</html>