hongkunxu opened a new pull request, #17489:
URL: https://github.com/apache/pinot/pull/17489

   ### BackGround
   After upgrading pinot to 1.4.0, a group of machines experienced a signicicat 
increase in off-heap memory usage, growing from less thatn 10GB to more than 
50+ GB.
   <img width="1713" height="340" alt="image" 
src="https://github.com/user-attachments/assets/a16e059a-3e74-4009-a937-81dd66fba2b3";
 />
   ---
   ### Analysis 
   After troubleshooting, I found the issue is the error of 
SegmentSizeBasedFlushThresholdUpdater. This algorithm use preCommitRows and 
other parameters to estimate sizeForCalculation. and preCommitRows is assigned 
by _numRowsConsumed from Server(RealtimeSegmentDataManager). But
   ```
   _numRowsConsumed = _numRowsIndexed + _numRowsErrored + _numRowsFiltered + 
.... 
   ```
   If we use filterConfig to extract part data from Kafka topic. Using 
_numRowsConsumed to estimate the number of rows for the next segment is 
fundamentally incorrect. In one of our real production cases, a table needs to 
consume approximately 13 million Kafka records to generate a segment with only 
200 thousand indexed documents—a difference of nearly 60×. This means that a 
table which originally required around 100 MB of memory would instead request 
nearly 6 GB of off-heap memory.
   
   Therefore, this PR was introduced to correct this behavior.
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to