Skip to content
hero
Philippe Bordron

How to use VSCode on the cluster

Do not run VSCode on the login nodes

Do not run VSCode directly on the login nodes, even with the SSH-Remote extension. When using SSH-Remote extension as it, VSCode run a copy of itself on the login nodes and stress them with its resource requirements.

Do not use remote-SSH on login nodes

Context

VScode and its derivates, like VSCodium or Positron, are resource-intensive editors that are used by many users. There is no major issue by using them as a single user on its own computer; any huge stress on the system only affects the user itself. But when used without caution by multiple users on the cluster, it is stressful enough to freeze login nodes.

As alternative, we presents 3 ways to use VSCode based editors on the cluster. Each way has its own advantages and drawbacks listed in next table. Whatever the solution you choose, we strongly recommend to tune VSCode to be less stressful on a system.

Method Advantages Drawbacks
Mount point on your computer (recommended)
SSHFS mountpoint diagram
VSCode runs on your own computer, not in a cluster job. It is not subject to cluster job reservation. Sensible to network:
• In some cases, if the login nodes become unreachable, it can freeze your system until them become reachable again.
• Many network exchanges, as your local VSCode will scan remote files on the cluster. It must be taken in account when using connection with data limits, like cellular networks.
Check tune VSCode page to limit the network pressure.
Remote-SSH on compute node
VSCode remote-ssh on compute node diagram
Can be an alternative to Open On Demand with notebooks like quarto, Rmarkdown, jupyter, etc. Subject to cluster load; like any other job, it can be in pending state for a long time when cluster is under huge load.
Sensible to network. Micro-breaks will make you lose your session
Code-server on compute node
Code-server on compute node diagram
No installation required.
The best VSCode alternative when traveling.
Subject to cluster load; like any other job, it can be in pending state for a long time when cluster is under huge load.
A bit technical to run compared to other solutions (use an SSH tunnel).
Updates depend on cluster administrators.