003

command module
v0.0.0-...-425d60b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

README

003

Third attempt.

SO_REUSEPORT

https://medium.com/high-performance-network-programming/performance-optimisation-using-so-reuseport-c0fe4f2d3f88

To run:

go get
go run server.go

then in another terminal:

go run client.go

Results:

glenn@hulk:~/udp/003$ go run client.go
starting 1000 clients
sent delta 97545, received delta 97545
sent delta 94000, received delta 94000
sent delta 94110, received delta 94003
sent delta 94559, received delta 94666
sent delta 95927, received delta 95869
sent delta 95014, received delta 95072
sent delta 94000, received delta 93992
sent delta 94000, received delta 94008
^C
received shutdown signal
shutting down
done.

Once again, no change.

The reason is that we're sending all the packets from the same source IP address to the same dest IP address, so the hash is always the same, and they end up getting processed on one core only.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL