net/http: unexpectedly slow initialization #50511
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
Here is trivial program that makes GET request:
When compiled and run on Darwin system (using binary distribution), it have more or less expected performance -- twice as slow compared to curl.
But when I compile and run it on my Linux box (
Linux void-live 5.13.13_1 #1 SMP Fri Aug 27 13:28:13 UTC 2021 x86_64 GNU/Linux
),also using binary distribution, I get following results:
Difference is much bigger. This time seems to come from some one-time initialization -- second request made in same program is fast. Here is annotated strace. It looks like it is doing many "rt_sigreturn" calls, but this is just my guess.
I have access to another linux box, with unusual kernel (lacking madvise(2), for example), which have more of the same problem: first request takes around 4 seconds, any subsequent work as expected.
The text was updated successfully, but these errors were encountered: