-
Notifications
You must be signed in to change notification settings - Fork 487
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
build: add braft format patch #2661
Conversation
1e545a6
to
22370e8
Compare
cicheck |
22370e8
to
a614e1a
Compare
cicheck |
a614e1a
to
33cab42
Compare
cicheck |
2 similar comments
cicheck |
cicheck |
32796a9
to
88e51fb
Compare
cicheck |
@wu-hanqing continue? |
25de4f1
to
7b4adf1
Compare
cicheck |
2 similar comments
cicheck |
cicheck |
src/client/utils.h
Outdated
// Adjust the soft limit of open files to hard limit. | ||
// If |limit| equals 0, then directly return true. | ||
// If hard limit is less than |limit| than return false. | ||
bool AdjustOpenFileSoftLimit(uint64_t 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.
Can this limit be adjusted dynamically?
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.
we can use prlimit to change running process's soft and hard limits
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.
AdjustOpenFileSoftLimitToHardLimit is better?
Otherwise it looks like setting softlimit to limit
@@ -152,6 +152,14 @@ global.metricDummyServerStartPort=9000 | |||
# 是否关闭健康检查: true/关闭 false/不关闭 | |||
global.turnOffHealthCheck=true | |||
|
|||
# minimal open file 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.
minimal limit? has maximum 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.
This minimal limit affects how many TCP sockets the client can create, if it's too low, client can't create TCP sockets which will result in an IO Error.
A safe value for this is twice the number of cluster disks
conf/client.conf
Outdated
# the number of sockets is related to the number of chunkserver and mds in the cluster, | ||
# and during some exception handling processes, client will create additional sockets | ||
# the SAFE value is 2 * (#chunkserver + #mds) | ||
global.minOpenFileLimit=65536 |
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.
each client 65536?
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.
Lowering it to 1024 and it's fine in most cases.
7b4adf1
to
015be99
Compare
cicheck |
1 similar comment
cicheck |
015be99
to
57ff2f3
Compare
cicheck |
57ff2f3
to
f19891c
Compare
cicheck |
3 similar comments
cicheck |
cicheck |
cicheck |
@@ -274,6 +274,7 @@ struct IOOption { | |||
struct CommonConfigOpt { | |||
bool mdsRegisterToMDS = false; | |||
bool turnOffHealthCheck = false; | |||
uint32_t minimalOpenFiles = 65536; |
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.
Put the description of the configuration item in 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.
fixed
namespace client { | ||
|
||
// Adjust the soft limit of open files to hard limit. | ||
// If |limit| equals 0, then directly return true. |
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.
limit is uint64_t
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 seems to me that this code means to set softlimit to hardlimit. But hardlimit has a lower limit called `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.
that's right.
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.
that is all
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.
Do you think my understanding is correct?
cicheck |
f19891c
to
220b79b
Compare
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
220b79b
to
d6a0330
Compare
cicheck |
7 similar comments
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
cicheck |
What problem does this PR solve?
Issue Number: #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List