joblib并行内存不足

时间:2019-02-11 21:48:24

标签: joblib ipython-parallel

我有这样的东西 theArray1

案例1:在具有80个内核的ubuntu上运行:

outputs = Parallel(n_jobs=12, verbose=10)(delayed(_process_article)(article, config) for article in data)

总共有90,000个任务。在大约67k时,它失败并终止。 CPU(s): 80 Thread(s) per core: 2 Core(s) per socket: 20 Socket(s): 2 当我以{67k]监视joblib.externals.loky.process_executor.BrokenProcessPool: A process in the executor was terminated abruptly, the pool is not usable anymore.时,发现内存急剧下降

top

案例2:具有8核的Mac

top - 11:40:25 up 2 days, 18:35,  4 users,  load average: 7.09, 7.56, 7.13
Tasks:  32 total,   3 running,  29 sleeping,   0 stopped,   0 zombie
%Cpu(s):  7.6 us,  2.6 sy,  0.0 ni, 89.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 33554432 total,       40 free, 33520996 used,    33396 buff/cache
KiB Swap:        0 total,        0 free,        0 used.       40 avail Mem

但是在Mac上它要慢得多。而且令人惊讶的是, 并没有以67k的速度被杀死。

此外,我将并行度(在第一种情况下)减小到了2,4,但仍然失败了:( 为什么会这样呢?有人遇到过这个问题并已解决吗?

注意:当我运行50,000个任务时,它运行良好,并且没有任何问题。

谢谢!

1 个答案:

答案 0 :(得分:0)

给一台增加了128GB内存的机器解决了这个问题!