Laboratory for Scientific Computing

Remote working

VSCode and Home Quotas

Microsoft's VSCode is a very capable development environment. Usefully, it has a client-server mode, so you can connect to a remote server and edit code there while using your own laptop/desktop. Unfortunately, VSCode puts a lot of files into your home directory. With a limited home-quota (maybe 2GB) this can cause problems...

Following are some instructions on how to reduce VSCode's home-directory usage:

Cache folder

Microsoft have not made it very obvious how to change the cache folder for VSCode. However, the following should work:

  1. Open VSCode.
  2. Open Settings
  3. Search for "remote ssh server install"
  4. For the "Remote.SSH: Server Install Path" setting, add:
    Item: apollo.lsc.phy.private.cam.ac.uk
    Value: /local/data/public/USERNAME/VSCode_Cache

    (Replace USERNAME with your username, e.g. pmb39, and replace apollo by the machine you are connecting to.)
  5. Reconnect to the remote server.

The folder named above is then the new location for "/home/raid/USERNAME/.vscode-server" so once it's set up, you should be able to delete that folder from your home directory.

VSCode CPP Cache

The vscode-cpptools plugin also results in a lot of storage in your home directory.

Microsoft has some suggestions, specifically setting XDG_CACHE_HOME.

On Linux, you can change this by editing your ~/.bashrc (on the CSC network) and add a line:

  • export XDG_CACHE_HOME=/local/data/public/USERNAME/Cache

Further notes

I (pmb39) have done some initial testing of the above instructions, but let me know if the instructions aren't clear, or if other things start filling up your home directory.