Uh oh!
There was an error while loading. Please reload this page.
ARROW-14429: [C++] Speed up IPC file reader on high-latency filesystems - #11535
ARROW-14429: [C++] Speed up IPC file reader on high-latency filesystems#11535lidavidm wants to merge 6 commits into
Conversation
lidavidm
commented
Oct 25, 2021
I tested this with minio and toxiproxy set up with Median times are given below. Three methods are compared: iterating through all record batches, iterating through all batches using the generator (which also uses coalescing), and using Datasets (async scanner) to read the data as a table. |
kszucs
commented
Oct 27, 2021
@lidavidm can we have conbench benchmarks for this case to avoid regressions? |
lidavidm
commented
Oct 27, 2021
Good point - I'll add them when I get a chance. (Probably I'll artificially add delay in-process to keep the benchmark simple.) |
lidavidm
commented
Oct 29, 2021
I've added a unit test that counts the number of read operations, instead of a benchmark, since that's a more reliable metric to track for this instance. |
There was a problem hiding this comment.
Nit: metadata is a slightly inaccurate name now.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
If this condition is false would it be faster to read just the remaining portion instead of rereading a part of the file?
There was a problem hiding this comment.
I've updated this to just read the missing part of the footer.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Just to be sure, this does take padding into account?
There was a problem hiding this comment.
Hmm. So normally the body_length comes from CheckMetadataAndGetBodyLength which just gets the bodyLength from the Message flatbuffer. The body_length here comes from the FileBlock in the footer, which according to File.fbs should be aligned already. And in writer.cc it looks like we add the padding to the metadata length, so body_length should be OK:
arrow/cpp/src/arrow/ipc/writer.cc
Lines 1234 to 1236 in 16af17c
Co-authored-by: Weston Pace <weston.pace@gmail.com>
lidavidm
commented
Nov 5, 2021
@westonpace I've rebased this, but the interaction with ARROW-12683 leaves something to be desired - your PR might supersede this one. |
westonpace
commented
Nov 6, 2021
I'll incorporate these fixes into my PR then. |
lidavidm
commented
Dec 8, 2021
Closing in favor of #11616. |
This implements two minor optimizations for the IPC file reader: