Closed centny closed 1 year ago
Compile with --release
.
@Dirbaio try it, better
my results:
[dirbaio@mars smoltcp]$ go run test.go 192.168.69.1:6970
R 171.18649768829346 MB/s
W 178.171875 MB/s
R 169.0466833114624 MB/s
W 175.515625 MB/s
R 159.88054370880127 MB/s
trying the same on 6971, which only receives:
[dirbaio@mars smoltcp]$ go run test.go 192.168.69.1:6971
W 655.328125 MB/s
W 628.37890625 MB/s
W 620.4973955154419 MB/s
W 605.966796875 MB/s
W 599.6374998092651 MB/s
W 584.1624994277954 MB/s
That's approx ~5gbit. It's about the performance to be expected out of a tun/tap interface, these are somewhat inefficient because they require a system call for each packet. If you check with perf
, a lot of the CPU time is spent entering/exiting syscalls:
Laptop with i7-8850H, Linux 6.3.4-arch2-1.
@Dirbaio thinks. it is ok, try compare it with lwip. it is better performance to lwip. may be the vm server problem.
start server
cargo run --example server -- --tap tap0
examples/utils.rs
log level toLevelFilter::Info
try 1: defautl code resuts if
try 2: change rx/tx buffer to 65535
try 3: disable reverse data
try 4: only recv
try 5: --release
the test client code
go run test.go