TakaHiR07 opened a new issue, #24355:
URL: https://github.com/apache/pulsar/issues/24355

   ### Search before reporting
   
   - [x] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   pulsar-2.9.x and pulsar-3.0.x both have this memory leak
   
   ### Issue Description
   
   After running the broker for a long time, it is found that the broker heap 
memory  and zgc time keep increasing. 
   After dumping the heap memory, we found that reason is in netty recycler 
which is use for cache of bookie client variable. The recycler used memory keep 
increasing. 
   
   As seen in the heapdump, there are so many LocalPools in one 
FastThreadLocalThread, and the consumerBuffer contain so many reference in one 
LocalPool.
   
   Our setting is io.netty.recycler.maxCapacityPerThread=1024, 
PerchannelBookieClient number is 16 * 500=8000.  And if change to 
io.netty.recycler.maxCapacityPerThread=0, the memory leak issue is fixed, but 
the write and read performance would decrease.
   
   
![Image](https://github.com/user-attachments/assets/49037835-fb80-4503-ad96-2ae6175b9830)
   
![Image](https://github.com/user-attachments/assets/428c5d39-4774-49a4-b676-96181449e72d)
   
   
![Image](https://github.com/user-attachments/assets/83ffa9c5-6b18-4325-8f5e-1afa8eadf628)
   
   
![Image](https://github.com/user-attachments/assets/f5780d09-8630-4f50-bbea-5bf6f2cb29cf)
   
   ### Error messages
   
   ```text
   
   ```
   
   ### Reproducing the issue
   
   continue running broker, start a perf produce process with large qps, normal 
throughput can reproduce.
   
   ### Additional information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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: commits-unsubscr...@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to