LoadBalancedView bloats memory - bug or wrong settings?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 32/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- jupyter-notebook, mysql, python
- Bereich
- databases, distributed-systems
Rechercherichtung
Führe zunächst das bereitgestellte 660000-task MWE nach dem Start von ipcluster start aus und konzentriere dich dabei auf den Pfad LoadBalancedView map_async(...) und wait_interactive(). Vergleiche sein Speicherverhalten mit DirectView und untersuche das zugehörige Issue sowie den Stack-Overflow-Bericht. Als erledigt gilt, festzustellen, ob das Wachstum ein Fehler oder eine Einstellung ist, und eine Lösung oder einen Workaround mit begrenztem Speicherverbrauch festzulegen und zu dokumentieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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()
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 2.6k
- Forks
- 1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ipython/ipyparallel
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
ipython/ipyparallel#1029 · 9 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
ipython/ipyparallel#984 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
ipython/ipyparallel#937 · 4 Kommentare ·
-
question
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
ipython/ipyparallel#897 · 12 Kommentare ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
ipython/ipyparallel#882 ·
Alle Issues in ipython/ipyparallel
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
hanami/hanami-cli#449 ·
-
external-issue to-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
external
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
langchain-ai/langgraph#9074 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
litestar-org/sqlspec#816 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Offenfuzz
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
ClickHouse/ClickHouse#122114 ·