GitHub user sitalkedia reopened a pull request:
https://github.com/apache/spark/pull/18317
[SPARK-21113][CORE] Read ahead input stream to amortize disk IO cost â¦
Profiling some of our big jobs, we see that around 30% of the time is being
spent in reading the spill files from disk. In order to amortize the disk IO
cost, the idea is to implement a read ahead input stream which asynchronously
reads ahead from the underlying input stream when specified amount of data has
been read from the current buffer. It does it by maintaining two buffer -
active buffer and read ahead buffer. The active buffer contains data which
should be returned when a read() call is issued. The read-ahead buffer is used
to asynchronously read from the underlying input stream and once the active
buffer is exhausted, we flip the two buffers so that we can start reading from
the read ahead buffer without being blocked in disk I/O.
## How was this patch tested?
Tested by running a job on the cluster and could see up to 8% CPU
improvement.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sitalkedia/spark read_ahead_buffer
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18317.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18317
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]