lkml.org 
[lkml]   [2022]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH linux-next] net: record times of netdev budget exhausted
On Tue, 6 Dec 2022 10:47:07 +0800 (CST) kuba@kernel.org wrote:
> But are you seeing actual performance wins in terms of throughput
> or latency?

I did a test and see 7~8% of performance difference with small and big
netdev_budget. Detail:
1. machine
In qemu. CPU is QEMU TCG CPU version 2.5+.
2. kernel
Linux (none) 5.14.0-rc6+ #91 SMP Tue Dec 6 19:55:14 CST 2022 x86_64 GNU/Linux
3. test condition
Run 5 rt tasks to simulate workload, task is test.sh:
---
#!/bin/bash

while [ 1 ]
do
ls > /dev/null
done
---
4. test method
Use ping -f to flood.
# ping -f 192.168.1.201 -w 1800

With netdev_buget is 500, and netdev_budget_usecs is 2000:
497913 packets transmitted, 497779 received, 0% packet loss, time 1799992ms
rtt min/avg/max/mdev = 0.181/114.417/1915.343/246.098 ms, pipe 144, ipg/ewma 3.615/0.273 ms

With netdev_budget is 1, and netdev_budget_usecs is 2000:
457530 packets transmitted, 457528 received, 0% packet loss, time 1799997ms
rtt min/avg/max/mdev = 0.180/123.287/1914.186/253.883 ms, pipe 147, ipg/ewma 3.934/0.301 ms

With small netdev_budget, avg latency increases 7%, packets transmitted
decreases 8%.

> Have you tried threaded NAPI? (find files called 'threaded' in sysfs)

Thanks, we had researched on threaded NAPI, much applaud for it!
But we think someone maynot use it because some kinds of reasons.
One is threaded NAPI is good for control, but maynot good for
throughput, especially for those who not care real-time too much.
Another reason is distribution kernel may too old to support
threaded NAPI?

>Well, we can't be sure if there's really nobody that uses them :(

As we still retain netdev_budget*, and there maybe some using it,
should it be improve? Netdev_budget* are sysctl for administrator,
when administrator adjust them, they may want to see the effect in
a direct or easy way. That's what this patch's purpose.

\
 
 \ /
  Last update: 2022-12-07 08:27    [W:0.145 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site