You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following workflow which worked on Arrow 5.0 on Windows 10 and R 4.1.2:
open_dataset(path) %>%
select(i, j) %>%
collect()
The dataset in path is partitioned by i and {}j{}, with 16 partitions in total, 5 million rows in each partition and each partition has several other regular columns (i.e. present in every partition). The entire dataset can be read into memory on my 16GB machine, which results in an R data.frame of around 3GB. However, on Arrow 6.0 the same operation fails, and R runs out of memory. Interestingly, this still works:
I cannot reproduce the same issue on Linux. Measuring the actual memory consumption with GNU time ({}--format=%Mmax{}) I get very similar figures for the first pipeline both on 5.0 and 6.0. The same is true for the second pipeline, which of course consumes slightly more memory, as expected. On Windows I don’t know of a simple method to measure maximum memory consumption but eyeballing it from Process Explorer, Arrow 5.0 needs around 0.5GB for the first example, while with Arrow 6.0 my 16GB machine becomes unresponsive, starts swapping, and depending on the circumstances, other apps might crash before R crashes with this error:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
With the second example, both versions consume roughly the same amount of memory.
With the new features in Arrow 6.0, this doesn’t work in Windows either, memory consumption shoots up into the 10s of GBs:
Will Jones / @wjones127:
Hi András! I've started to work to reproduce this, though haven't yet had success. You might try using the profmem package like below, or even adapt the below script to be closer to your data such that it starts reproducing the behavior.
I tested this on Windows 10 with Arrow 6.0.0 and R 4.1.2. If you run both open_dataset() in same R session, you'll notice the one you run first having a larger number of allocations. But I consistently saw the version just selecting i and j to allocate less memory in total.
Let me know if there is some tweak to the script to make it more like your situation. Or what results you are seeing using profmem.
I have the following workflow which worked on Arrow 5.0 on Windows 10 and R 4.1.2:
The dataset in
path
is partitioned byi
and{}j{
}, with 16 partitions in total, 5 million rows in each partition and each partition has several other regular columns (i.e. present in every partition). The entire dataset can be read into memory on my 16GB machine, which results in an R data.frame of around 3GB. However, on Arrow 6.0 the same operation fails, and R runs out of memory. Interestingly, this still works:where
x
is a regular column.I cannot reproduce the same issue on Linux. Measuring the actual memory consumption with GNU time (
{}--format=%Mmax{
}) I get very similar figures for the first pipeline both on 5.0 and 6.0. The same is true for the second pipeline, which of course consumes slightly more memory, as expected. On Windows I don’t know of a simple method to measure maximum memory consumption but eyeballing it from Process Explorer, Arrow 5.0 needs around 0.5GB for the first example, while with Arrow 6.0 my 16GB machine becomes unresponsive, starts swapping, and depending on the circumstances, other apps might crash before R crashes with this error:With the second example, both versions consume roughly the same amount of memory.
With the new features in Arrow 6.0, this doesn’t work in Windows either, memory consumption shoots up into the 10s of GBs:
Meanwhile this works, with under 1GB memory needed:
These last two examples work without any issue on Linux, and as expected, they consume significantly less memory, as the select-then-collect examples.
Reporter: András Svraka
Note: This issue was originally created as ARROW-14727. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: