0

As I learned from different websites like this one, vCPU represents a portion of time of a physical CPU core(s) that is assigned to a VM, where some process is running. And also:

As threads execute (vCPUs are used) they are cycled around the physical CPUs.

Does that mean that if I assign more vCPUs to my VM then my app (node.js) thread will be able to use all of this vCPUs and run faster despite that node.js is single-threaded?

p.s. If I picked the wrong place (forum) to ask this question please tell me the forum where I can get an answer.

Ruslan Plastun
  • 1,985
  • 3
  • 21
  • 48
  • The only benefit you'll get from multiple processors will come from having a separate one for syscalls. You can use the cluster module to run multiple threads with the same script to take advantage of multiple processors. https://nodejs.org/dist/latest-v10.x/docs/api/cluster.html –  Aug 29 '18 at 16:39
  • But what about the info on the website that linked? And the fact that this vCPUs will most probably reside on a single core, and a single core can fully process single thread? One core (without hyperthreading) is only capable of processing one thread, so that's probably exactly what I need. – Ruslan Plastun Aug 29 '18 at 16:50
  • Did you ever figure it out? – Croolsby Jul 30 '20 at 04:15

0 Answers0