You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a demonstrative, we were chewing 70 cores using go-syslog through the OpenTelemetry Collector, which reduced to 3 when introducing a sync.Pool to store/reuse bufio.Readers
At the moment, every parser (one of which is constructed for each message), allocates a new buffer (https://github.com/leodido/go-syslog/blob/develop/octetcounting/scanner.go#L42). In high throughput scenarios, this can chew up a huge amount of CPU allocating memory to parse messages. I would like to propose that we create a new
sync.Pool
that storesbufio.Reader
s which https://github.com/leodido/go-syslog/blob/develop/octetcounting/scanner.go#L40 can pull from, rather than allocating a new buffer every time.The text was updated successfully, but these errors were encountered: