-
Notifications
You must be signed in to change notification settings - Fork 409
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
Read I/O rate limit for background and foreground read request. #2440
Conversation
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
@@ -0,0 +1,219 @@ | |||
#include <Encryption/RateLimiter.h> |
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.
BTW, why RateLimiter.h
is put in Encryption
?
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.
It was in Encryption
before.
@lidezhu Do you know why?
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.
Comment it in https://github.com/pingcap/tics/blob/master/dbms/src/Encryption/RateLimiter.h#L11. Put it simply, just to avoid the dependency of the io module on encryption module which makes the compile of some clickhouse unit test fail.
IORateLimiter supports read limit;
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.
LGTM with a comment
/merge |
/run-all-tests |
@JinheLin merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@JinheLin merge failed. |
/run-all-tests |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
What problem does this PR solve?
Problem Summary:
This PR is a sub-task of issue: #1720. It implements configurable I/O rate limit for background and foreground read request base on the statistic data of
/proc/<pid>/io
and/proc/<pid>/tasks/<tid>/io
. You can refer the design document (Chinese) for more detail.What is changed and how it works?
Proposal: TiFlash IO Rate Limiter
What's Changed:
New Configurations:
max-bytes-per-sec
is the maximum bandwidth for I/O limiter.max-read-bytes-per-sec
andmax-write-bytes-per-sec
is the maximum bandwidth for read and write I/O limiter.Also, you can refer the document (Chinese) for more detail.
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note
Testing results
Limit the foreground read to 1MB/s, 2MB/s, 3MB/s, 60MB/s.Below is the screenshot of the testing results: yellow line is the bandwidth of the disk, red line is the statistic data of the limiter.
Before each test, we need to drop the page cache by the commands:
Limit the foreground read to 1MB/s
Limit the foreground read to 2MB/s
Limit the foreground read to 3MB/s
Limit the foreground read to 60MB/s
Grafana I/O limiter example link: http://172.16.5.59:19169/d/SVbh2xUWk/jinhe-test-bench-tiflash-summary?orgId=1&from=1626766214135&to=1626774127373&viewPanel=84