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

Proposing a simple Balancer benchmark suite #1108

Open
garyparrot opened this issue Nov 12, 2022 · 1 comment
Open

Proposing a simple Balancer benchmark suite #1108

garyparrot opened this issue Nov 12, 2022 · 1 comment
Assignees

Comments

@garyparrot
Copy link
Collaborator

未來會推出其他類型的 Balancer 實作,對此我們需要一個機制來可靠的比較各個 Balancer 的好壞。

由於 Balancer 運作本身會牽涉到很多因素,這裡我打算先推出一個工具能在固定下面的幾項因素的情況下做比較

  • 使用相同的 CostFunction
  • 使用相同的 ClusterInfo, Data Directory
  • 使用相同的 ClusterBean
  • 使用相同的 Execution Time Limit

計算資源的部分就是整個測試設備的所有資源,如果有 Balacner 使用多個 thread 做搜尋,但另外一個 Balancer 只使用一個 thread 做搜尋而得出比較劣勢的結果,這個算 Balancer 實作的好壞範疇之一,這部分不會做任何公平上的處理。

預期簡單的測試方法

  1. 給定兩套 Balancer 實作,雙方進行比較(只能兩套,不能三套或更多)
  2. 在上述的固定條件(cost, cluster, bean, time)下,觸發 k 次 Balancer 去重複計算負載平衡計劃,收集最後得到的 Cost 分數。計算標準差或平均值等統計量
  3. 把蒐集到的 Cost 分數拿去做 Hypothesis Test,確定兩套 Balancer 跑出來的數據差異是真的差距,而非兩個 Balancer 在找解能力上其實一樣強,或是測試次數 k 不夠多,我們的實驗可能有某個算法運氣特別好的疑慮存在。

預期的程式碼實作

  • 會寫一個新工具,實作上述的內容
    • 輸入兩套 Balancer 的實作
    • 輸入 CostFunctions
    • ClusterInfo 可以自 cluster 或是 json 引入,不過初版自己隨機生成一個就好
    • ClusterBean 可能也可以讓使用者從 json 引入,不過初版留空就好,以後再支援有 metrics 的版本

未來如果發現現有的 cost function 不夠提升解空間的複雜度,可能會考慮推一些比較複雜的 cost function 上來,比如要求特定 topic 被放在 ssd 的 data directory 的 cost function。

@garyparrot garyparrot self-assigned this Nov 12, 2022
@chia7712
Copy link
Contributor

這個概念很棒,期待看到實作

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

No branches or pull requests

2 participants