crypto/tls: lots of small objects allocations on .Read when using HTTP1.1 #58249
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (
go1.20
)What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a program which downloads at 2.5Gbit/s from ~12 stream concurrently and runs GC more often than I like.
After some profiling I see:
What did you expect to see?
HTTP1 is a simple protocol, I expect calls to
.Read
to be allocation free (after buffers have been grown). Either work inplace with the buffer passed in, or by caching buffers.What did you see instead?
The TLS implementation seems to allocate this
atLeastReader
pointer very often (on each Read ?).The text was updated successfully, but these errors were encountered: