You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[broker] parameter "loadBalancerOverrideBrokerNicSpeedGbps" does not work #14820
Describe the bug
machine:tencent Cloud Virtual Machine,CVM
os: tencent os tlinux 2.6
i wanna set loadBalancerOverrideBrokerNicSpeedGbps=9 to setting to correct the max NIC speed bandwidthout, but it does not work because org.apache.pulsar.broker.loadbalance.impl.LinuxBrokerHostUsageImpl getNics() get two nics,one is physical Nic eth1,another one is virtual Nic veth51f9d919
To Reproduce
Steps to reproduce the behavior:
set broker parameter loadBalancerOverrideBrokerNicSpeedGbps=9
check nics path
[root@9 ~]# cd /sys/class/net
[root@9 /sys/class/net]# ls -l
total 0
lrwxrwxrwx 1 root root 0 Mar 8 21:01 cbr0 -> ../../devices/virtual/net/cbr0
lrwxrwxrwx 1 root root 0 Mar 8 21:01 dummy0 -> ../../devices/virtual/net/dummy0
lrwxrwxrwx 1 root root 0 Mar 8 20:59 eth1 -> ../../devices/pci0000:00/0000:00:05.0/virtio0/net/eth1
lrwxrwxrwx 1 root root 0 Mar 8 21:01 kube-ipvs0 -> ../../devices/virtual/net/kube-ipvs0
lrwxrwxrwx 1 root root 0 Mar 8 20:59 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root 0 Mar 8 21:03 veth51f9d919 -> ../../devices/virtual/net/veth51f9d919
Becasue org.apache.pulsar.broker.loadbalance.impl.LinuxBrokerHostUsageImpl isPhysicalNic(Path path) path is relative path, so veth51f9d919 in !path.toString().contains("/virtual/") is true, Expected false。
In this condition, org.apache.pulsar.broker.loadbalance.impl.LinuxBrokerHostUsageImpl getTotalNicLimitKbps() return 18874368, Expected 9437184。the setting max NIC speed bandwidthout does not work
Expected behavior
virtual nic veth51f9d919 in !path.toString().contains("/virtual/") is false。
Screenshots
use tool arthas to watch params and returnObj
/sys/class/net relative path
Desktop (please complete the following information):
PS: due to filtering virtual nics out, in k8s pods, all nics are now filtered out (since all of them are virtual, at least on our hardware) and thus network doesn't contribute at all to the broker host load.
I have personally confirmed that the eth0 nic paths still continues to show the correct rx and tx values for the broker though even though its under /virtual/
PS: due to filtering virtual nics out, in k8s pods, all nics are now filtered out (since all of them are virtual, at least on our hardware) and thus network doesn't contribute at all to the broker host load. I have personally confirmed that the eth0 nic paths still continues to show the correct rx and tx values for the broker though even though its under /virtual/
Activity
grssam commentedon Dec 7, 2022
PS: due to filtering virtual nics out, in k8s pods, all nics are now filtered out (since all of them are virtual, at least on our hardware) and thus network doesn't contribute at all to the broker host load.
I have personally confirmed that the
eth0nic paths still continues to show the correct rx and tx values for the broker though even though its under/virtual/(the counter updates with correct rate as monitored in
dstat)Technoboy- commentedon Dec 8, 2022
Thanks for reporting this. we're working on the fix.