Nicola
Nicola

Reputation: 331

Compute Engine n1-standard only use 50% of CPU

I'm running an heavy pytorch task on this VM(n1-standard, 2vCpu, 7.5 GB) and the statistics show that the cpu % is at 50%. On my PC(i7-8700) the cpu utilization is about 90/100% when I run this script (deep learning model). I don't understand if there is some limit for the n1-standard machine(I have read in the documentation that only the f1 obtain 20% of cpu usage and the g1 the 50%). Maybe if I increase the max cpu usage, my script runs faster. Is there any setting I should change?

Upvotes: 1

Views: 418

Answers (1)

siamsot
siamsot

Reputation: 1579

In this case, the task utilizes only one of the two processors that you have available so that's why you see only 50% of the CPU getting used.

If you allow pytorch to use all the CPUs of your VM by setting the number of threads, then it will see that the usage goes to 100%

Upvotes: 2

Related Questions