You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "theogaraj (via GitHub)" <gi...@apache.org> on 2024/05/01 21:43:16 UTC
[I] memory relationship between write_dataset max_open_files and scanner batch_readahead and fragment_readahead [arrow]
theogaraj opened a new issue, #41489:
URL: https://github.com/apache/arrow/issues/41489
### Describe the usage question you have. Please include as many useful details as possible.
Thanks for this great library!
This is what I am doing:
```python
dataset = ds.dataset(INPATH, format='parquet')
scanner = dataset.scanner(
batch_size=batch_size,
batch_readahead=batch_readahead,
fragment_readahead=fragment_readahead
)
ds.write_dataset(
dataset,
base_dir=OUTPATH,
format='parquet',
max_open_files=max_open_files,
max_rows_per_file=maxrecords,
min_rows_per_group=batch_size,
max_rows_per_group=batch_size,
)
```
This is a straightforward scan and write, with no partitioning.
I understand that I can control memory usage on the read side by specifying `batch_size`, `batch_readahead` and `fragment_readahead`.
Similarly, on the write side I can use `max_open_files` and `batch_size` to control buffering by the writer.
However, I'm unable to figure out the relationship between the scanner and writer. **How many batches** are actually buffered in memory before being written? Is it:
* `max_open_files * batch_readahead * fragment_readahead`? (separate scanning operation for _each_ file that the writer has open)
OR
* `(batch_readahead * fragment_readahead) + max_files` (scanning and writing operating independently of each other)
When I test with input files with known average record size (deserialized size in memory), my memory consumption seems way higher than either of those two options would suppose. Which would suggest there's something else being done that's consuming memory (that would be manageable if I could understand how to account for it).
### Component(s)
Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] memory relationship between write_dataset max_open_files and scanner batch_readahead and fragment_readahead [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #41489:
URL: https://github.com/apache/arrow/issues/41489#issuecomment-3547490191
This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this usage question has evolved into a feature request or docs update, please remove the 'Type: usage' label and add the 'Type: enhancement' label instead.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] memory relationship between write_dataset max_open_files and scanner batch_readahead and fragment_readahead [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed issue #41489: memory relationship between write_dataset max_open_files and scanner batch_readahead and fragment_readahead
URL: https://github.com/apache/arrow/issues/41489
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org