icexelloss opened a new issue, #37630:
URL: https://github.com/apache/arrow/issues/37630

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I have been testing "What is the max rss needed to scan through ~100G of 
data in a parquet stored in gcs using Arrow C++". 
   
   The current answer is about ~6G of memory which seems a bit high so I looked 
into it. What I observed during the process led me to think that there are some 
potential cache/memory issues in the dataset/parquet cpp code.
   
   Main observation:
   (1) As I am scanning through the dataset, I printed out (a) memory allocated 
by the memory pool from ScanOptions (b) process rss. I found that while (a) 
stays pretty stable throughout the scan (stays < 1G), (b) keeps increasing 
during the scan (looks linear to the number of files scanned).
   (2) I tested ScanNode in Arrow as well as an in-house library that 
implements its own "S3Dataset" similar to Arrow dataset, both showing similar 
rss usage. (Which led me to think the issue is more likely to be in the parquet 
cpp code instead of dataset code).
   (3) Scan the same dataset twice in the same process doesn't increase the max 
rss.
   
   Following suggestions from the mailing list, I also did a memory profiling 
of the test program and the results seem to indicate potential memory leak.
   ![Screenshot from 2023-09-08 
09-54-31](https://github.com/apache/arrow/assets/793516/c6b0ada6-fe93-4a8d-848e-d5540848c82e)
   
   
   ### Component(s)
   
   C++, Parquet


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