R文件大小(内存)限制:OSX / Ubuntu之间存在差异

时间:2019-02-28 14:11:31

标签: r ubuntu rstudio remote-server

硬件:

  1. MacBook Air 2013,4 GB 1600 MHz DDR3,1,3 GHz英特尔酷睿i5。优胜美地10.10.5。

  2. 远程云服务器,6 GB RAM,2个CPU。 Ubuntu 16.04 LTS / RStudio服务器。

我有一个大型数据集(32,500,000 x 88),我设法在5岁的MacBook Air上的RStudio中将.csv编译为.RDS。考虑到笔记本电脑缺少用于处理数据集上的预测模型的硬件,我将2.6GB的.RDS数据库上传到了Cloud Server。

我的问题: 当我尝试通过RStudio服务器或ssh / terminal R在远程Ubuntu堆栈上 readRDS()数据库时,我收到了臭名昭著的错误:无法分配大小为123.9 Mb的向量错误。 db的.fst版本与 read.fst()结合使用时,也会发生相同的情况。

我不明白的是,当我的笔记本电脑可以在3-4分钟内完成远程数据处理时,远程服务器怎么也无法加载?

MacBook Air SessionInfo():

R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X Yosemite 10.10.5

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

远程服务器sessionInfo():

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

MacBook Air Ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 709
virtual memory          (kbytes, -v) unlimited
Jacobs-MacBook-Air:~ JacobGrapendal$ 

远程服务器Ulimit -a

core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 23796
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 23796
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

笔记本电脑上已加载.RDS的对象大小:

object.size(core)
20021819880 bytes

因此,远程服务器正在运行64位R,并且具有无上限的虚拟内存使用率。但是,它无法完成我5岁的MacBook Air可以做的事情。为什么?

0 个答案:

没有答案