VMware Player VM-1个核心CPU限制 [英] VMware Player VM - 1 core CPU limitation
问题描述
我正在将VM与VMware Player结合使用来编写代码和进行编译. 由于我当前的程序很大,因此编译需要一段时间(最多5分钟) 使用主机上4核CPU的25%= 1核的100%.
I'm using a VM with VMware Player to write code and compile. As my current program is huge, the compilation takes a while to be done (upto 5 minutes) using 25% of my 4 cores CPU on my host = 100% of one core.
VM似乎只能使用1个单核.
It seems that the VM is limited to use 1 single core.
是否有一种方法可以优化VM可以使用的内核数量? 我想使用4核CPU的50%或75%.
Is there a way to optimize the number of cores a VM can use? I'd like to use 50% or 75% of my 4 cores CPU.
谢谢
推荐答案
听起来您受可运行的并行构建任务数量的限制,而不是受VM CPU配置的限制,例如,默认情况下,make
一次运行一步.尝试并行运行几个步骤,例如,运行 make -j4
或等同于您的构建系统.
It sounds like you're limited by the number of parallel build tasks you can run, not the VM CPU configuration, e.g., by default, make
will run a single step at a time. Try running several steps in parallel, e.g., run make -j4
or equivalent for your build system.
另外,对于您来说,VM给您带来的开销可能比您想要的要多;考虑使用 Docker 托管您的开发环境.
On a separate note, a VM may be more overhead for you than you might like; consider using Docker to host your development environment.
这篇关于VMware Player VM-1个核心CPU限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!