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]curvefs/mds: change some config on fly #2813

Merged

Conversation

Cyber-SiKu
Copy link
Contributor

@Cyber-SiKu Cyber-SiKu commented Oct 17, 2023

What problem does this PR solve?

1. use gflag to change mds heartbeatMissTimeOutMs on fly
2. use gflag to change metaserver transh.expiredAfterSec on fly
3. use gflag to change metaserver transh.scanPeriodSec on fly
4. use gflag to change client fs.disableXattr on fly
5. set client s3.maxAsyncRequestInflightBytes default vale to 1GiB

Issue Number: #xxx

Problem Summary:

What is changed and how it works?

What's Changed:

How it Works:

  1. heartbeatMissTimeOutMs
    Use the following command to observe the status of the corresponding metaserver
 watch -n 1 "curl -X POST http://xxx.xxx.xxx.xxx:xxxx/TopologyService/ListMetaServer -H 'Content-Type: application/protobuf'  -d $'{\n  \"serverID\": 1\n}' | jq"

Use the following command to modify the corresponding configuration items:

curl xxx.xxx.xxx.xxx:xxxx/flags/heartbeat_OffLineTimeOutMs\?setvalue\=30000

  1. transh.expiredAfterSec
curl xxx.xxx.xxx.xxx:xxx/flags/trash_expiredAfterSec\?setvalue\=1

Increase the log level of deleted inodes and observe the logs.

image
image
image


image
image

curl xxx.xxx.xxx.xxx:xxxx/flags/fs_disableXattr\?setvalue=true

image

curl xxx.xxx.xxx.xxx:xxxx/flags/fs_disableXattr\?setvalue=false

image

Observe whether the change time of onlineState changes according to the modification.

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@Cyber-SiKu Cyber-SiKu force-pushed the feat/curvefs/change_conf_on_fly branch from bb66c12 to ab5cafe Compare October 17, 2023 13:25
@Cyber-SiKu Cyber-SiKu changed the title [feat]curvefs/mds: change MissTimeOutMs on fly [feat]curvefs/mds: change some config on fly Oct 17, 2023
@Cyber-SiKu Cyber-SiKu force-pushed the feat/curvefs/change_conf_on_fly branch from ab5cafe to 2fd200f Compare October 17, 2023 13:31
@YunhuiChen
Copy link
Contributor

cicheck

@Cyber-SiKu Cyber-SiKu force-pushed the feat/curvefs/change_conf_on_fly branch 5 times, most recently from 2e762fe to 113aa40 Compare October 19, 2023 02:02
@Cyber-SiKu Cyber-SiKu closed this Oct 19, 2023
@Cyber-SiKu Cyber-SiKu reopened this Oct 19, 2023
@h0hmj
Copy link
Contributor

h0hmj commented Oct 19, 2023

spell weird... TimeOut -> Timeout maybe

// the maximun peroid that heartbeat is missed without
// setting the metaserver to offline status and alarm.
// scheduling will depend on this status of metaserver
DEFINE_uint64(heartbeat_OffLineTimeOutMs, 1800000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its name is a hyper monster 👿, just heartbeat_offline_timeout_ms

// background process will alarm during the inspection once it
// finds out that heartbeat is missed after heartbeatMissTimeOut peroid
DEFINE_uint64(
heartbeat_MissTimeOutMs, 30000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -129,7 +140,7 @@ bool TrashImpl::NeedDelete(const TrashItem &item) {
// if fs recycleTimeHour is not 0, return true
uint64_t recycleTimeHour = GetFsRecycleTimeHour(item.fsId);
if (recycleTimeHour == 0) {
return ((now - item.dtime) >= options_.expiredAfterSec);
return ((now - item.dtime) >= FLAGS_trash_expiredAfterSec);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if so, should options_.expiredAfterSec be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if so, should options_.expiredAfterSec be removed?

The reason for retaining this is to consider that the configuration-related content will be rewritten later. If you keep it, you can know that there is such a configuration item.

while (sleeper_.wait_for(std::chrono::seconds(options_.scanPeriodSec))) {
ScanEveryTrash();
}
while (sleeper_.wait_for(std::chrono::seconds(FLAGS_trash_scanPeriodSec))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, remove options_.scanPeriodSec?

1. use gflag to change mds heartbeatMissTimeOutMs on fly
2. use gflag to change metaserver transh.expiredAfterSec on fly
3. use gflag to change metaserver transh.scanPeriodSec on fly
4. use gflag to change client fs.disableXattr on fly
5. set client s3.maxAsyncRequestInflightBytes default vale to 1GiB

Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
@Cyber-SiKu Cyber-SiKu force-pushed the feat/curvefs/change_conf_on_fly branch from 113aa40 to 5c77924 Compare October 19, 2023 03:03
@Cyber-SiKu
Copy link
Contributor Author

spell weird... TimeOut -> Timeout maybe

fix

@Cyber-SiKu
Copy link
Contributor Author

cicheck

5 similar comments
@Cyber-SiKu
Copy link
Contributor Author

cicheck

@Cyber-SiKu
Copy link
Contributor Author

cicheck

@Cyber-SiKu
Copy link
Contributor Author

cicheck

@Cyber-SiKu
Copy link
Contributor Author

cicheck

@Cyber-SiKu
Copy link
Contributor Author

cicheck

@Cyber-SiKu Cyber-SiKu merged commit 1341a58 into opencurve:master Oct 23, 2023
5 checks passed
@Cyber-SiKu Cyber-SiKu deleted the feat/curvefs/change_conf_on_fly branch October 23, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants