简体   繁体   English

在 Vscode 中限制 CPU 使用率

[英]Limit CPU usage in Vscode

I would like to ask if it's possible to limit the CPU usage of Vscode?请问是否可以限制Vscode的CPU使用率? I saw some articles related to disabling extensions and typescripts and it works as it does not clog the CPU but on the system side or in the Vscode itself, would it be possible to force limit the resources that code can consume?我看到一些与禁用扩展和打字稿相关的文章,它的工作原理是它不会阻塞 CPU,但在系统端或 Vscode 本身,是否有可能强制限制代码可以消耗的资源?

I am using vscode in remote (Windows using ssh) and in a shared virtual machine - Centos 7 which affects other users when my Vscode clogs the CPU.我在远程(使用 ssh 的 Windows)和共享虚拟机中使用 vscode - Centos 7 当我的 Vscode 阻塞 CPU 时会影响其他用户。

Thank you in advance for the answers!预先感谢您的回答!

There are ways to limit the CPU usage of a process/application at the OS level.有一些方法可以在操作系统级别限制进程/应用程序的 CPU 使用率。

You can read about how to do it in Windows here , and CentOS here您可以在此处的 Windows此处的 CentOS 中了解如何操作

I do not entirely understand your setup (are you connecting to the vscode-server, or VSCode UI via something like RDP), but you would need to limit the resource usage on the machine running the server (aka. the remote machine).我不完全理解你的设置(你是通过 RDP 之类的东西连接到 vscode-server 还是 VSCode UI),但是你需要限制运行服务器的机器(也就是远程机器)上的资源使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM