Often, I’m using VS Code’s Remote SSH extension to develop on a remote server. This consumes some compute on the server, so I’d like to taskset
the vscode-server
command so that it only runs on certain cores.
I’ve tried (without much success) to find the exact command that the Remote SSH extension runs on the remote server.
From looking at the output of ps
, it seems the first command is ~/.vscode-server/bin/<commit>/bin/code-server --start-server ...
, which seems to spawn several child processes.
How do I modify this command from the local machine and prefix it with taskset -c 0
?
2
Answers
One temporary solution I've found is to use
ps
to get the PIDs of the vscode-server processes, pipe them through awk, then manually taskset them.You can try to put following at the beginning of
code-server
: