LoadBalancedView bloats memory - bug or wrong settings?
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 32/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- jupyter-notebook, mysql, python
研究方向
首先在啟動 ipcluster start 後執行提供的 660000-task MWE,重點關注 LoadBalancedView map_async(...) 和 wait_interactive() 路徑。將其記憶體行為與 DirectView 進行比較,並檢查相關 issue 和 Stack Overflow 報告。完成標準是確定這種增長究竟是 bug 還是設定問題,並設定和記錄一種有界記憶體修正方案或 workaround。
由索引模型根據 Issue 內容生成。
描述
This issue may be related to https://github.com/ipython/ipyparallel/issues/207 which is also not marked as solved, yet.
Also I posted this problem on stackoverflow (https://stackoverflow.com/questions/45781545/ipyparallels-loadbalancedview-bloats-memory-how-can-i-avoid-that).
I want to execute multiple tasks in parallel using python and ipyparallel in a jupyter notebook and using 4 local engines by executing ipcluster start in a local console.
Besides that one can also use DirectView, I use LoadBalancedView to map a set of tasks. Each task takes around 0.2 seconds (can vary though) and each task does a MySQL query where it loads some data and then processes it.
Working with ~45000 tasks works fine, however, my memory grows really high. This is actually bad because I want to run another experiment with over 660000 tasks which I can't run anymore because it bloats up my memory limit of 16 GB and then the memory swapping on my local drive starts. However, when using the DirectView my memory grows relatively small and is never full. But I actually need LoadBalancedView.
Even when running a minimal working example without database query this happens (see below).
I am not perfectly familiar with the ipyparallel library but I've read something about logs and caches that the ipcontroler does which may cause this. I am still not sure if it is a bug or if I can change some settings to avoid my problem.
Running a MWE
For my Python 3.5.3 environment running on Windows 10 I use the following (recent) packages:
- ipython 6.1.0
- ipython_genutils 6.1.0
- ipyparallel 6.0.2
- jupyter 1.0.0
- jupyter_client 4.4.0
- jupyter_console 5.0.0
- jupyter_core 4.2.0
I would like the following example to work for LoadBalancedView without the immense memory growth (if possible at all):
-
Start
ipcluster starton a console -
Run a jupyter notebook with the following three cells:
<1st cell> import ipyparallel as ipp rc = ipp.Client() lview = rc.load_balanced_view() <2nd cell> %%px --local import time <3rd cell> def sleep_here(i): time.sleep(0.2) return 42 amr = lview.map_async(sleep_here, range(660000)) amr.wait_interactive()
- 主要語言
- Jupyter Notebook
- 星號
- 2.6k
- 分支
- 1k
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ipython/ipyparallel 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
ipython/ipyparallel#1029 · 9 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 35/100
ipython/ipyparallel#984 ·
-
難度 4/5 3-5 天 新手友好度 35/100
ipython/ipyparallel#937 · 4 則留言 ·
-
question
難度 5/5 一週以上 新手友好度 25/100
ipython/ipyparallel#897 · 12 則留言 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
ipython/ipyparallel#882 ·
查看 ipython/ipyparallel 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
-
Business User Story
難度 2/5 1-3 小時 新手友好度 75/100
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters 未關閉
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
0. Needs triage bug
難度 2/5 1-3 小時 新手友好度 75/100