-
Notifications
You must be signed in to change notification settings - Fork 62
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
Optimization Partitioner #241
Conversation
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.
@wycccccc nice catch. a couple of comments below.
app/src/main/java/org/astraea/partitioner/nodeLoadMetric/NodeLoadClient.java
Show resolved
Hide resolved
app/src/main/java/org/astraea/partitioner/smoothPartitioner/SmoothWeightPartitioner.java
Outdated
Show resolved
Hide resolved
我繼續優化,減少了一些臨時變量,讓GC可以減輕一些工作。 但還存在一些問題 #244 ,我會開新的pr處理。 |
請問這句是什麼意思? |
就是astraea partitioner 在10KiB的record.size大小下,传输速率能达到与kafka同样的速度(原先只有500M/s,第一次修改后大概有850MB/S,这次修改让他能够到达1000MB/s) |
所以是在叢集從0開始跑,沒有刻意製造不均勻的負載的狀態下? |
製造與不製造都能做到相同速度。 |
app/src/main/java/org/astraea/partitioner/smoothPartitioner/SmoothWeightPartitioner.java
Show resolved
Hide resolved
app/src/main/java/org/astraea/partitioner/smoothPartitioner/SmoothWeightPartitioner.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/astraea/partitioner/smoothPartitioner/SmoothWeightPartitioner.java
Outdated
Show resolved
Hide resolved
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.
overall +1
please merge it after fixing remaining requests
優化Partitioner效能,現在在10KiB的record.size下也能保持一定的效能。

右邊爲改善過後的astraea partitioner的數據,原先的數據結果大概爲30min avg=500MB/s
主要的改善點爲減少不必要的該方法
brokersWeight
調用。JMC告訴我該方法佔了整個程式12%的cpu使用量。而如果metrics不變這個方法的結果就不會改變。metrics最快也是1s更新一次,所以改爲超過1s再進行一次計算。