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

curvefs/client: optimizing the read amplification problem(especial me… #2792

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

wuhongsong
Copy link
Contributor

@wuhongsong wuhongsong commented Oct 11, 2023

…mcached)

memcached does not support partial reads (object size:4MB in Curve) of an object, but the io will not exceed 128KB in linux kernel(1MB in kernel 4.20+).so for sequential reads, this will cause memcached write amplification is:4MB/128KB = 40 .

To solve this problem, we cache the first read memcached object locally.

@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong force-pushed the memcached_to_disk_1008 branch 2 times, most recently from 29e40b3 to f98ba2e Compare October 11, 2023 08:18
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong force-pushed the memcached_to_disk_1008 branch 4 times, most recently from 710590c to 0c6705e Compare October 11, 2023 08:36
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong closed this Oct 18, 2023
@wuhongsong wuhongsong reopened this Oct 18, 2023
@wuhongsong wuhongsong closed this Oct 18, 2023
@wuhongsong wuhongsong reopened this Oct 18, 2023
@wuhongsong wuhongsong force-pushed the memcached_to_disk_1008 branch 3 times, most recently from e21d0cc to 25d5735 Compare October 19, 2023 04:27
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong
Copy link
Contributor Author

cicheck

1 similar comment
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong closed this Oct 19, 2023
@wuhongsong wuhongsong reopened this Oct 19, 2023
@wuhongsong wuhongsong reopened this Oct 19, 2023
@wuhongsong wuhongsong changed the title [WIP]curvefs/client: optimizing the read amplification problem(especial me… curvefs/client: optimizing the read amplification problem(especial me… Oct 19, 2023
@wu-hanqing wu-hanqing self-requested a review October 20, 2023 01:59
@@ -0,0 +1,307 @@
/*
* Copyright (c) 2021 NetEase Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

2021 -> 2023

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

LOG(WARNING) << "download object: " << name << " timeout";
return false;
}
} while (!s3ClientAdaptor_->GetDiskCacheManager()->IsCached(name));
Copy link
Contributor

Choose a reason for hiding this comment

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

There are multi same operations, maybe you can use one function to replace this chain operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@wuhongsong wuhongsong force-pushed the memcached_to_disk_1008 branch 3 times, most recently from c025a09 to 17a4874 Compare October 23, 2023 02:43
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong closed this Oct 23, 2023
@wuhongsong wuhongsong reopened this Oct 23, 2023
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong wuhongsong force-pushed the memcached_to_disk_1008 branch 6 times, most recently from 199e246 to ab4d997 Compare October 23, 2023 06:18
@wuhongsong
Copy link
Contributor Author

cicheck

@wuhongsong
Copy link
Contributor Author

@201341 PTAL

@wuhongsong wuhongsong merged commit 41e0eb4 into opencurve:master Oct 23, 2023
7 checks passed
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