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 Partitioner #241

Merged
merged 7 commits into from
Feb 22, 2022

Conversation

wycccccc
Copy link
Collaborator

優化Partitioner效能,現在在10KiB的record.size下也能保持一定的效能。
右邊爲改善過後的astraea partitioner的數據,原先的數據結果大概爲30min avg=500MB/s
Screenshot from 2022-02-18 20-25-17

主要的改善點爲減少不必要的該方法brokersWeight調用。JMC告訴我該方法佔了整個程式12%的cpu使用量。
而如果metrics不變這個方法的結果就不會改變。metrics最快也是1s更新一次,所以改爲超過1s再進行一次計算。

@wycccccc wycccccc requested a review from chia7712 February 18, 2022 12:59
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@wycccccc nice catch. a couple of comments below.

@wycccccc
Copy link
Collaborator Author

我繼續優化,減少了一些臨時變量,讓GC可以減輕一些工作。
現在astraea基本能與kafka持平(左邊爲astraea throughput,右邊爲單打單)。
Screenshot from 2022-02-20 23-06-35

但還存在一些問題 #244 ,我會開新的pr處理。

@chia7712
Copy link
Contributor

現在astraea基本能與kafka持平(左邊爲astraea throughput,右邊爲單打單)

請問這句是什麼意思?

@wycccccc
Copy link
Collaborator Author

請問這句是什麼意思?

就是astraea partitioner 在10KiB的record.size大小下,传输速率能达到与kafka同样的速度(原先只有500M/s,第一次修改后大概有850MB/S,这次修改让他能够到达1000MB/s)

@chia7712
Copy link
Contributor

就是astraea partitioner 在10KiB的record.size大小下,传输速率能达到与kafka同样的速度(原先只有500M/s,第一次修改后大概有850MB/S,这次修改让他能够到达1000MB/s)

所以是在叢集從0開始跑,沒有刻意製造不均勻的負載的狀態下?

@wycccccc
Copy link
Collaborator Author

所以是在叢集從0開始跑,沒有刻意製造不均勻的負載的狀態下?

製造與不製造都能做到相同速度。

chia7712
chia7712 previously approved these changes Feb 21, 2022
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

overall +1

please merge it after fixing remaining requests

@wycccccc wycccccc merged commit 33aad70 into opensource4you:main Feb 22, 2022
@wycccccc wycccccc mentioned this pull request Feb 24, 2022
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.

3 participants