VMware Player VM - 1 core CPU limitation

2019-08-28 23:53发布

问题:

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.

It seems that the VM is limited to use 1 single core.

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.

Thanks

回答1:

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.

On a separate note, a VM may be more overhead for you than you might like; consider using Docker to host your development environment.