kevin-pan-skydio commented on issue #1423:
URL: 
https://github.com/apache/pulsar-client-go/issues/1423#issuecomment-3336132565

   We have solved the problem.
   
   Here's a summary:
   1. Leak was caused by cgo zstd compression. Key-based batching exacerbated 
the severity of the leak
   2. Since it's cgo, go's pprof utility had no visibility into the memory leak
   3. Go heap saw a sensible max 100mb usage of memory, but resident memory for 
the Go process (which contains cgo's memory usage) was large, 1gb after a 
load-test run, and kept increasing without dropping as we ran more load tests
   4. Tried upgrading to zstd 1.5.7 and leak was still happening
   5. We ended up choosing to move forward with zlib since it's part of Go's 
standard library (`compress/zlib`)
   6. We also tried lz4 and didn't see a memory leak
   
   Thanks for all the help and attention @merlimat @AlvaroStream (and Christie 
Schaefer in the Pulsar community slack).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to