-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-15368][e2e] Add end-to-end test for controlling RocksDB memory usage #10930
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit abfc351 (Thu Jan 23 07:53:33 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
carp84
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The design of the test looks good to me, please check my inline comments.
Could you also trigger the e2e tests in travis after resolving the comments, to confirm that the newly added tests could pass @Myasuka ? Thanks.
What is the purpose of the change
Add end-to-end test for controlling RocksDB memory usage. This job has 4 states in 4 different operator, and all the operators are shared in one slot.
NOTE: This end-to-end test could be a unstable one when too many unflushed immutable mem-tables. I wrote a doc to explain how write buffer manager works in RocksDB. In this doc I explained the most total memory usage could be much higher than expected in the worst case.
Below is the general test result:

1GB TM, 2 slot each without memory control. To compare fairly, I also cache index & filter into cache but not change other configurations of RocksDB.
When we do not control memory usage over RocksDB instances, the total memory should be summed as
block-cache-usgae+total-mem-tablefrom all 4 states. As you can see, the total memory usage in one slot could be 400MB+1GB TM, 2 slot each has 161061276 bytes of managed off-heap memory

Since we use the same cache to share among all rocksDB instances, the total memory usage is the block cache usage. As you can see, the memory usage could be near the vicinity of 161061276 bytes.
Brief change log
Add end-to-end test for controlling RocksDB memory usage.
Verifying this change
This change added tests and can be verified as follows:
RocksDBStateMemoryControlTestProgramto verify end-to-end.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation