在網路流量很大時,Container 的網路對資料庫效能的影響

Percona 的「How Container Networking Affects Database Performance」這篇在討論 Kubernetes 上選擇不同的 CNI 對於資料庫效能的影響。

最重要的是結果的這張圖:

可以看到 TPS 與 throughput 都有影響到,要注意的是這是兩個不同的工具測出來的結果,在 TPS 上是用 sysbench,可以看到最好的 Kube-Router 上也掉了 13% 的 TPS:

Another key thing we found was that even in the best-case with Kube-Router we see an approximate 13% decrease in database performance comparing bare metal to running within Kubernetes. This illustrates that there are still improvements to be made to the performance of container networking in Kubernetes.

throughput 是用 iperf3,只要不是真的掉很多,就沒那麼關心了...

不過這個測試另外一個解讀是,如果你用資料庫不單純是 PK find() 類的處理,那麼效能應該是還好,因為會有不少 CPU 資源 (以及對應的時間) 是用在 join 或是其他處理上,對於 latency 與 throughput 應該就沒有那麼敏感了...

2 thoughts on “在網路流量很大時,Container 的網路對資料庫效能的影響”

Leave a Reply

Your email address will not be published. Required fields are marked *