Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] Ubuntu is using only one core when running multiple jobs

$
0
0
I created a VM (Ubuntu 20.04) on Win-10 system with Hyper-V and allocated 20 cores (out of 24) to this VM. It worked fine till I ran multiple python jobs in the background.

on a remote machine, I SSH into this VM and launch the python jobs with a script like this:

#!/bin/bash
python job1.py > ~/tmp/log.txt 2>&1 &
sleep 3s
python job2.py > ~/tmp/log.txt 2>&1 &
sleep 3s
......



Then I noticed that only one core (out of 20) is running at 100%, all the rest are idle.
I ran this same on a native Ubuntu server (also 20.04), it would use all the cores and much faster.



I am new to Hyper-V and just started to explore Ubuntu VM yesterday, it was pretty smooth other than this problem. I think it should be a typical set-up but did not find many discussions on this issue. I would very much appreciate if any experts here could point out what the problem might be. Thanks!

Viewing all articles
Browse latest Browse all 4211

Trending Articles