Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

LoadBalancedView bloats memory - bug or wrong settings?

Aberta
#286 5 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
32/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
jupyter-notebook, mysql, python

Direção de pesquisa

Comece executando o MWE 660000-task fornecido após iniciar ipcluster start, concentrando-se no caminho LoadBalancedView map_async(...) e wait_interactive(). Compare seu comportamento de memória com DirectView e examine a issue relacionada e o relatório do Stack Overflow. Considera-se concluído determinar se o crescimento é um bug ou uma configuração e definir e documentar uma correção ou workaround com memória limitada.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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 start on 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()
    
Linguagem predominante
Jupyter Notebook
Estrelas
2.6k
Forks
1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ipython/ipyparallel

Todas as issues de ipython/ipyparallel

Issues semelhantes

Mais issues de Databases

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.