-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Segment log storage #156
Merged
Merged
Segment log storage #156
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killme2008
force-pushed
the
feature/log-storage-v2
branch
from
May 9, 2019 09:28
c0de3bc
to
a2785e6
Compare
本机的性能测试, nvme 的 ssd , 总数据大小写入控制在 10~ 18G,测试可用内存不到 7G。 日志攒批写入,一批 100 条,读是从 1 开始循环遍历所有写入的日志,测试程序参见 下面根据日志大小分析测试结果,耗时单位都是秒: 1K
4K
8K
16K
结论新的实现优点:
缺点:
TODO
|
定位到为什么 1k 情况下,读的性能急剧下降。
最终根据关键字找到这个 issue facebook/rocksdb#3961 在 key 的数量巨大情况下,设置
|
// Begin to use partitioned index filters
// https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters#how-to-use-it
setIndexType(IndexType.kTwoLevelIndexSearch). // use hash search(btree) for prefix scan.
setFilter(new BloomFilter(16, false)). //
setPartitionFilters(true). //
setMetadataBlockSize(8 * SizeUnit.KB). //
setCacheIndexAndFilterBlocks(false). //
setCacheIndexAndFilterBlocksWithHighPriority(true). //
setPinL0FilterAndIndexBlocksInCache(true). //
// End of partitioned index filters settings.
setBlockSize(4 * SizeUnit.KB).//
setBlockCacheSize(512 * SizeUnit.MB). //
setCacheNumShardBits(8);
|
…nfig, bump rocksdb to 5.18.3
fengjiachun
reviewed
Jun 26, 2019
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Jun 26, 2019
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Show resolved
Hide resolved
fengjiachun
reviewed
Jun 26, 2019
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Jun 26, 2019
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Show resolved
Hide resolved
* (fix) minor fix * (fix) minor fix * (fix) minor fix * (feat) minor changes in RocksDBSegmentLogStorage#onShutdown * (fix) remove special characters
mac os 上性能不到预期的可能原因,先记录下 |
Closed
* (feat) follow logStorage's tableConfig * (fix) fix javadoc * (fix) format * (fix) log storage text path * (fix) compare ref is better * (fix) format
* (fix) read after db shutdown * (fix) check state before access db * (fix) by review comments
killme2008
force-pushed
the
feature/log-storage-v2
branch
from
July 29, 2019 08:59
0e0ed1d
to
aeb1536
Compare
killme2008
force-pushed
the
feature/log-storage-v2
branch
from
July 29, 2019 10:06
cd044eb
to
6e18f91
Compare
…/sofa-jraft into feature/log-storage-v2
fengjiachun
approved these changes
Jul 31, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An experimental implementation for #39