-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aggregate reads & writes in disk_io
#1205
Aggregate reads & writes in disk_io
#1205
Conversation
e718585
to
aa6007e
Compare
disk_io
disk_io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted a few opportunities for simplification below using proposed upstream features
8071ccf
to
d72e98e
Compare
de6806f
to
e2c24e6
Compare
Ensure that all buffers are backed by `uint8` NumPy arrays. This way they use hugepages when available and can be transferred to the GPU faster.
Before doing more expensive IO operations, allocate all memory needed in one go. This way it can be fed into the IO operations rapidly or be batched.
Simplify allocating memory for reading by using one `list`-comprehension for all cases.
Instead of writing each buffer one at a time, write all of them together in one call with `writelines`. This should result in fewer releases of the GIL and fewer kernel traps.
Handle reading and writing multiple buffers in one go with lower level OS primitives. Since Dask-CUDA is Linux only, can just rely on `readv` and `writev`. This way both reading *and* writing can be done in one call.
Instead of waiting on each `FutureIO` from KvikIO before creating the next one, submit all IO requests and then get each one at the end.
e2c24e6
to
77a1600
Compare
77a1600
to
7c7dafd
Compare
Thanks Mads! 🙏 Please let me know if anything else is needed here 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @jakirkham
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @jakirkham and @madsbk !
/merge |
Thank you both! 🙏 |
Follow up to this discussion ( #925 (comment) )
uint8
arrays for all host memory (benefits from hugepages on transfers)