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

Optimization performance of file sort #945

Closed
amyangfei opened this issue Sep 10, 2020 · 2 comments
Closed

Optimization performance of file sort #945

amyangfei opened this issue Sep 10, 2020 · 2 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@amyangfei
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe:

In current file sort implement, there exits too much cpu cost in PolymorphicEvent encode and decode, besides this codec is single thread, so the performance is poor.

Following is a benchmark when running sysbench in upstream.
企业微信截图_20200910184125

Besides as the slow of file flush, during incremental scan stage, the puller could accumulate too much data and leads to OOM, so the file sort doesn't support large incremental scan data size now.

Describe the feature you'd like:

Optimize the performance of file sort, by enabling multiple thread codec or change the architecture, such as cache key in memory and store data in a KV storage, which can take advantage of the sorting mechanism provided by KV storage. The optimized file sort should

  • Support per table incremental scan data size up to 20G (we should discuss about the upper size)
  • Support a high throughput real time replication
@amyangfei amyangfei added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Sep 10, 2020
@liuzix liuzix self-assigned this Sep 11, 2020
@liuzix
Copy link
Contributor

liuzix commented Sep 11, 2020

I have assigned myself and I have the following proposals

  • Explore ways to unify memory sorter and the file sorter. We need one implementation for two kind of sorts.
  • Decouple the serializer and the comparator from the sorter itself, so that we can easily test various solutions and optimize for performance. It will also make refactoring of the processor easier if the sorter(s) are more configurable.

@amyangfei
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

2 participants