Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable starting of multiple Kernels for a single interactive notebook #1269

Closed
Tracked by #1122
schaffino opened this issue Jun 23, 2020 · 2 comments
Closed
Tracked by #1122
Labels
interactive-window Impacts interactive window notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@schaffino
Copy link

It seems that when we start executing an interactive notebook in the python extension with VSCode two kernels are created. Looking through previously raised issues in this repo, this behaviour is intentional as a way to allow quick restarting of a kernel by switching over to a pre-warmed idle kernel. This may be a nice feature for some users, but for others is undesirable.

In our use case we are using a remote jupyter instance and some preconfigured pyspark kernels. In this case launching multiple kernels is undesired for the following reasons.

  • The kernels themselves are not lightweight. The pyspark kernel starts a JVM taking resources in the jupyter instance. More often than not the user may never restart the kernel and this is wasted resource.
  • The kernels start a spark session in a remote cluster, which also ends up reserving resources in that cluster, for both the idle kernel and the in use kernel.

For our use case we would much rather have an option to turn off starting multiple kernels, and simply wait 10-15 seconds for a new kernel creation rather than taking up the resources and making sessions that will usually remain idle and unused. Having two kernels start for a single user session is quite an unexpected side effect for people new to VSCode who have been working with notebooks directly in jupyterlab.

@IanMatthewHuff
Copy link
Member

@schaffino Thanks for the feedback. We do indeed start up the second kernel session for fast restart swaps. We were working on the assumption that the kernel sessions were generally very light until they were used. But I can see how that's not working in your case. We'll talk at our triage meeting about adding a setting to disable our restart session kernel.

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@greazer greazer added the P2 label Nov 14, 2020
@greazer greazer added this to the July 2021 Release milestone Jun 8, 2021
@greazer greazer removed the P2 label Jul 26, 2021
@greazer greazer removed this from the July 2021 milestone Jul 30, 2021
@greazer greazer added interactive-window Impacts interactive window notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) labels Jul 30, 2021
@DonJayamanne
Copy link
Contributor

We no longer start multiple kernels for restart kernels
We have the option to disable pre-warming of kernels via the setting "jupyter.disableJupyterAutoStart": true,

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
interactive-window Impacts interactive window notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

5 participants