Results 336 comments of Miek Gieben

Might make sense to write super simple udp echo server from scratch in go and see how that performs.

Thanks. The core question seems to be how long should it take to write 200 B to the UDP socket and is this slower than it should be in Go...

This is a supersimple Go UDP server: https://gist.github.com/miekg/d9bc045c89578f3cc66a214488e68227 Doing the same queryperf in GCE yields: ~~~ ./bin/queryperf-linux_amd64 -d domain.lst.queryperf -l 5 -s 10.132.0.3 -p 1053 DNS Query Performance Testing Tool...

LOL with profiling this drops to "Queries per second: 72013.668522 qps"

~~~ Fetching profile from http://localhost:6060/debug/pprof/profile Please wait... (30s) Saved profile in /home/miek/pprof/pprof.udp.localhost:6060.samples.cpu.001.pb.gz Entering interactive mode (type "help" for commands) (pprof) top 28760ms of 38180ms total (75.33%) Dropped 147 nodes (cum...

[pprof.udp.localhost:6060.samples.cpu.001.pb.gz](https://github.com/coredns/perf-tests/files/989356/pprof.udp.localhost.6060.samples.cpu.001.pb.gz)

~~~ (pprof) disasm syscall.Syscall Total: 38.18s ROUTINE ======================== syscall.Syscall6 13.44s 14.22s (flat, cum) 37.24% of Total . 520ms 477d00: CALL runtime.entersyscall(SB) . . 477d05: MOVQ 0x10(SP), DI . . 477d0a:...

UDP echo server in C (does not set the QR bit, just echo's bytes back): https://gist.github.com/miekg/a61d55a8ec6560ad6c4a2747b21e6128 Queryperf: 84343.155846 qps (some order of magnitude)

makes this somewhat faster in the Go case. Fluctuates in my localhost testing from 60K to 90K

~~~ top - 14:09:17 up 1 day, 3:34, 2 users, load average: 1.26, 0.35, 0.12 Tasks: 132 total, 1 running, 131 sleeping, 0 stopped, 0 zombie %Cpu0 : 17.8 us,...