LoadBalancedView bloats memory - bug or wrong settings?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 32/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- jupyter-notebook, mysql, python
- Domaine
- databases, distributed-systems
Piste de recherche
Commencez par exécuter le MWE 660000-task fourni après avoir lancé ipcluster start, en vous concentrant sur le chemin LoadBalancedView map_async(...) et wait_interactive(). Comparez son comportement en matière de mémoire avec DirectView et examinez l’issue associée ainsi que le rapport Stack Overflow. Le travail est considéré comme terminé lorsqu’il est déterminé si la croissance est un bug ou un paramètre, et qu’une correction ou un workaround à mémoire bornée est défini et documenté.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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()
- Langage dominant
- Jupyter Notebook
- Étoiles
- 2.6k
- Forks
- 1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ipython/ipyparallel
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
ipython/ipyparallel#1029 · 9 commentaires ·
-
pidigits example website is gone Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
ipython/ipyparallel#984 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
ipython/ipyparallel#937 · 4 commentaires ·
-
Packages and definitions loaded in the regular kernel are not known by engines and vice versa Ouvertequestion
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
ipython/ipyparallel#897 · 12 commentaires ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
ipython/ipyparallel#882 ·
Toutes les issues de ipython/ipyparallel
Issues similaires
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
DATABASE_URL=pglite:memory: creates a directory named 'memory:' instead of an in-memory database Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
BuilderIO/agent-native#5730 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
supabase/agent-skills#602 ·