Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rocksdb): Adapt rate limiter to prevent bust writes and huge compaction #543

Merged
merged 9 commits into from
Jun 12, 2020

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented May 29, 2020

What problem does this PR solve?

rocksdb compaction has large influence when put data. this pr add rocksdb write limiter to improve performance.The follows are some result:

1. no limit, 3(client)*20(thread)

下载 (2)
下载
选区_126

2. 500MB limit and open auto-tune, 3(client)*20(thread)

下载 (3)
下载 (1)
选区_128

3. 500MB limit and open auto-tune, 3(client)*30(thread)

下载 (5)
下载 (4)
选区_127

Besides, for observe the pegasus performance, this pr add one new perfcounter: rate limiter through rate: replica*app.pegasus*rdb.write_limiter_rate_bytes
选区_103

And add new config:

[pegasus.server]
rocksdb_limiter_max_write_megabytes_per_sec = 500
rocksdb_limiter_enable_auto_tune = false

Note: rocksdb_limiter_enable_auto_tune = true may cause write stall especially when the put data size is large(In my test, it will happen when qps=10k, value=10k), so new commit set the config to false

What is changed and how it works?

add rocksdb write limiter for compaction and flush

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note
  • Need to update config

@foreverneverer foreverneverer changed the title Compaction limiter feat: add rocksdb write limiter May 29, 2020
@neverchanje neverchanje changed the title feat: add rocksdb write limiter feat: add rate limiter to disk write of rocksdb May 30, 2020
@foreverneverer foreverneverer marked this pull request as ready for review June 4, 2020 09:49
@acelyc111
Copy link
Member

acelyc111 commented Jun 4, 2020

How about rename this pr to "feat(rocksdb): Adapt rate limiter to prevent bust writes and huge compaction"?

src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl.h Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
@foreverneverer
Copy link
Contributor Author

foreverneverer commented Jun 10, 2020

Note: rocksdb_limiter_auto_tune_enable = true may cause write stall especially when the put data size is large(In my test, it will happen when qps=10k, value=10k), so new commit set the config to false

Update the description

acelyc111
acelyc111 previously approved these changes Jun 12, 2020
@acelyc111
Copy link
Member

How about rename this pr to "feat(rocksdb): Adapt rate limiter to prevent bust writes and huge compaction"?

@shuo-jia

@hycdong hycdong added type/config-change Added or modified configuration that should be noted on release note of new version. type/perf-counter PR that made modification on perf-counter, which should be noted in release note. labels Jun 12, 2020
@foreverneverer foreverneverer changed the title feat: add rate limiter to disk write of rocksdb feat(rocksdb): Adapt rate limiter to prevent bust writes and huge compaction Jun 12, 2020
@foreverneverer
Copy link
Contributor Author

How about rename this pr to "feat(rocksdb): Adapt rate limiter to prevent bust writes and huge compaction"?

@shuo-jia

Yeah,have updated

src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
src/server/pegasus_server_impl_init.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.0 type/config-change Added or modified configuration that should be noted on release note of new version. type/perf-counter PR that made modification on perf-counter, which should be noted in release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants