Closed
Description
Commit 672729e (https://golang.org/cl/37879) introduced performance regression for "no such host" case.
goos: linux
goarch: amd64
pkg: net
BenchmarkGoLookupIPNoSuchHost-4 30 43958216 ns/op
BenchmarkGoLookupIPNoSuchHost-4 30 43639313 ns/op
BenchmarkGoLookupIPNoSuchHost-4 30 58653180 ns/op
BenchmarkGoLookupIPNoSuchHost-4 30 49881501 ns/op
BenchmarkGoLookupIPNoSuchHost-4 30 52573745 ns/op
Before that commit:
goos: linux
goarch: amd64
pkg: net
BenchmarkGoLookupIPNoSuchHost-4 2000 681589 ns/op
BenchmarkGoLookupIPNoSuchHost-4 2000 717598 ns/op
BenchmarkGoLookupIPNoSuchHost-4 2000 688904 ns/op
BenchmarkGoLookupIPNoSuchHost-4 2000 690374 ns/op
BenchmarkGoLookupIPNoSuchHost-4 2000 780634 ns/op
In other words:
name old time/op new time/op delta
GoLookupIPNoSuchHost-4 712µs ±10% 53484µs ±11% +7413.71% (p=0.008 n=5+5)
Needs investigation.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]net: GoLookupIPNoSuchHost performance regressions[/-][+]net: GoLookupIPNoSuchHost performance regression[/+]odeke-em commentedon May 10, 2018
Thank you for reporting this @quasilyte!
/cc @iangudger @bradfitz
iangudger commentedon May 10, 2018
That is a big jump. I will look into it. I will admit that I mostly optimized for the non-error case.
Edit: How do I run this benchmark?
quasilyte commentedon May 10, 2018
@iangudger, the simplest way is
go test -bench=GoLookupIPNoSuchHost net
. Is this what you're asking? See also: benchstat.iangudger commentedon May 17, 2018
I have been able to reproduce the issue. I will start debugging.
iangudger commentedon May 18, 2018
I found the issue. I will try to send out a fix and some benchmarks tomorrow.
iangudger commentedon May 18, 2018
Go 10.10.2:
tip:
after patch:
gopherbot commentedon May 18, 2018
Change https://golang.org/cl/113815 mentions this issue:
net: fix DNS NXDOMAIN performance regression
gopherbot commentedon Sep 6, 2018
Change https://golang.org/cl/133675 mentions this issue:
net: fail fast for DNS rcode success with no answers of requested type
6 remaining items