`Arrow.write()` cannot handle large `Mmap`-ed table

未关闭
#413 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
julia

调研方向

首先,在指定的内存限制下,使用报告中所示的大型未压缩 Arrow 文件、Mmap-ed table view 和两个 Arrow.write 调用来复现该问题。从 view input 开始跟踪 Arrow.write,并比较随着 mask 增长时的内存行为;当过滤后的表能够成功写入且不再出现报告中的内存不足错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Premise:

  1. input file is large, uncompressed Arrow file
  2. we produce a mask and produce a view() over the Mmap-ed table
  3. use Arrow.write() to write filtered table to disk

This seems to take increasing memory as the content of the mask.

I know this doesn't work correctly because if I set memory limit first:

> ulimit -Sv 8000000
julia> using Arrow, DataFrames

julia> const df = @time DataFrame(Arrow.Table("./nanoAOD_nocomp.feather"); copycols=false);
  2.685720 seconds (4.84 M allocations: 321.109 MiB, 4.41% gc time, 100.89% compilation time)

julia> Arrow.write("/home/akako/Downloads/out.feather", @view df[1:1*10^4, :]);

julia> Arrow.write("/home/akako/Downloads/out.feather", @view df[1:2*10^4, :]);
ERROR: Internal error: encountered unexpected error in runtime:
OutOfMemoryError()
unknown function (ip: 0x7f9d7329fc99)
unknown function (ip: 0x7f9d732935b5)
jl_gc_alloc at /home/akako/Documents/github/dotFiles/homedir/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
ijl_alloc_array_1d at /home/akako/Documents/github/dotFiles/homedir/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7f9d5ec6259e)
unknown function (ip: 0x7f9d5e36c9dc)
unknown function (ip: 0x7f9d5e73ee1f)
unknown function (ip: 0x7f9d5e73ed98)
主要语言
Julia
星标
315
派生
80
平均合并
1 小时 29 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/arrow-julia 的其他 Issue

查看 apache/arrow-julia 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。