Open daliang111 opened 1 month ago
dev_weight = net.core.netdev_budget
The structure of the /proc/net/softnet_stat file is typically as follows (as of the latest Linux kernel versions):
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Each field is presented in hexadecimal format. Here's what these fields usually represent:
The time_squeeze field is particularly important if you are interested in how often the netdev_budget is insufficient for processing all packets in the queue during one softirq call. If this value is high, it may indicate that the current net.core.netdev_budget is too low for the current load and should be increased to improve the performance of the network subsystem.
what is different between net.core.netdev_budget and net.core.dev_weight,and is any way to moniotr if dev_weight is too small ? time_squeeze is about net.core.netdev_budget ,nothing to do with net.core.dev_weight . kernel code, https://elixir.bootlin.com/linux/v5.0/source/net/core/dev.c#L6389
budget=netdev_budget if (unlikely(budget <= 0 || time_after_eq(jiffies, time_limit))) { sd->time_squeeze++; break; }
and net.core.netdev_budget(system parameter ) ---->netdev_budget(kernel code) net.core.dev_weight net.core.dev_weight_tx_bias ----> dev_tx_weight net.core.dev_weight net.core.dev_weight_rx_bias ----> dev_rx_weight
i want to monitor whether dev_weight is suitable,if dev_weight is too small ,which monitor metric can show it?
is there any way to monitor the dev_weight, /proc/net/softnet_stat have no info about dev_weight. like the kernel code, no way to monitor if dev_weight is to small? void __qdisc_run(struct Qdisc q){
int quota = dev_tx_weight; // max send package num int packets;
while (qdisc_restart(q, &packets)) {
/
quota -= packets;
if (quota <= 0 || need_resched()) { //quota is <=0, next softirq and break
__netif_schedule(q);
break;
}
} }