Skip to content

MINOR: Extends RocksDB docs#10046

Merged
mjsax merged 3 commits into
apache:trunkfrom
mjsax:minor-rocksdb-docs
Feb 5, 2021
Merged

MINOR: Extends RocksDB docs#10046
mjsax merged 3 commits into
apache:trunkfrom
mjsax:minor-rocksdb-docs

Conversation

@mjsax

@mjsax mjsax commented Feb 3, 2021

Copy link
Copy Markdown
Member

We recommend users to switch to jemalloc for RocksDB

Call for review @ableegoldman @JimGalasyn @rodesai

We recommend users to switch to jemalloc for RocksDB
<span class="c1">// Cache and WriteBufferManager should not be closed here, as the same objects are shared by every store instance.</span>
<span class="o">}</span>
<span class="o">}</span>
</div>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some cleanup... (here and below). My editor flagged those...

Comment thread docs/streams/developer-guide/memory-mgmt.html Outdated

@JimGalasyn JimGalasyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one suggestion.

@rodesai rodesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

<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>We further recommend, to change 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>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>
To change the memory allocator to <code>jemalloc</code>, you need to set the environment variable before you start your Kafka Streams application:</p>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it should be set an environment variable as we don't include the name?

Or should we change it to set the environment variable LD_PRELOAD?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm good point. I think set the environment variable LD_PRELOAD is best

Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
# 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”

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@mjsax mjsax merged commit 016128c into apache:trunk Feb 5, 2021
@mjsax mjsax deleted the minor-rocksdb-docs branch February 5, 2021 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants