You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/04 23:58:17 UTC

[GitHub] [kafka] rodesai commented on a change in pull request #10046: MINOR: Extends RocksDB docs

rodesai commented on a change in pull request #10046:
URL: https://github.com/apache/kafka/pull/10046#discussion_r570627385



##########
File path: docs/streams/developer-guide/memory-mgmt.html
##########
@@ -168,7 +168,15 @@
       <h2><a class="toc-backref" href="#id3">RocksDB</a><a class="headerlink" href="#rocksdb" title="Permalink to this headline"></a></h2>
       <p> Each instance of RocksDB allocates off-heap memory for a block cache, index and filter blocks, and memtable (write buffer). Critical configs (for RocksDB version 4.1.0) include
         <code class="docutils literal"><span class="pre">block_cache_size</span></code>, <code class="docutils literal"><span class="pre">write_buffer_size</span></code> and <code class="docutils literal"><span class="pre">max_write_buffer_number</span></code>.  These can be specified through the
-        <code class="docutils literal"><span class="pre">rocksdb.config.setter</span></code> configuration.</li>
+        <code class="docutils literal"><span class="pre">rocksdb.config.setter</span></code> configuration.</p>
+      <p>Also, we recommend changing RocksDB's default memory allocator, because the default allocator may lead to increased memory consumption.
+        To change the memory allocator to <code>jemalloc</code>, you need to set the an environment variable before you start your Kafka Streams application:</p>
+      <pre>
+# example: install jemalloc (on Debian)
+$ apt install -y libjemalloc-dev
+# set LD_PRELOAD before you start your Kafka Streams application
+$ LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so”

Review comment:
       just doing `LD_PRELOAD=` will only set the variable for that one command, which isn't doing anything. This should either be:
   ```
   $ export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
   $ <application>
   ```
   OR
   ```
   $ LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so" <application>
   ```
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org