jinchengchenghh commented on issue #8025:
URL:
https://github.com/apache/incubator-gluten/issues/8025#issuecomment-2496510231
The kSpillReadBufferSize controls the size to read each file, the ordered
reader will create FileOutputStream for each file and allocate
kSpillReadBufferSize (default 1MB) for one file. Can you try to adjust this
value?
Maybe we should add a new config to control the read buffer size for all the
files. numFiles * bufferSize < threshold.
```
for (auto& fileInfo : files_) {
streams.push_back(FileSpillMergeStream::create(
SpillReadFile::create(fileInfo, bufferSize, pool, spillStats)));
}
input_ = std::make_unique<common::FileInputStream>(
std::move(file), bufferSize, pool_);
FileInputStream::FileInputStream(
std::unique_ptr<ReadFile>&& file,
uint64_t bufferSize,
memory::MemoryPool* pool)
: file_(std::move(file)),
fileSize_(file_->size()),
bufferSize_(std::min(fileSize_, bufferSize)),
pool_(pool),
readAheadEnabled_((bufferSize_ < fileSize_) &&
file_->hasPreadvAsync()) {
VELOX_CHECK_NOT_NULL(pool_);
VELOX_CHECK_GT(fileSize_, 0, "Empty FileInputStream");
buffers_.push_back(AlignedBuffer::allocate<char>(bufferSize_, pool_)); //
allocate buffer cause OOM
if (readAheadEnabled_) {
buffers_.push_back(AlignedBuffer::allocate<char>(bufferSize_, pool_));
}
readNextRange();
}
```
kSpillWriteBufferSize controls the serialization buffer, if up to this
threshold, flush and compress the buffer.
--
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]