Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIGH CPU usage of qemu-system-x86 #1964

Closed
adaholycs opened this issue Feb 11, 2021 · 10 comments
Closed

HIGH CPU usage of qemu-system-x86 #1964

adaholycs opened this issue Feb 11, 2021 · 10 comments
Labels
bug high high importance

Comments

@adaholycs
Copy link

Describe the bug
Since today the CPU of my VMs each is raging between 100% and 200%

To Reproduce

  1. multipass launch -c 2 --disk 24G --mem 4G --name relay 18.04
  2. I experience on two independent maschines the same behavior

Expected behavior
Since the VMs just started and no process is launched on the VM which requires high CPU, I expect very low CPU usage when monitoring the VMs. This was the behavior in the past month.

Logs
ps aux | grep qemu-system-x86
root 3627 60.2 7.3 8299992 1200044 ? Sl 17:51 29:41 /snap/multipass/3387/usr/bin/qemu-system-x86_64 --enable-kvm -device virtio-scsi-pci,id=scsi0 -drive file=/var/snap/multipass/common/data/multipassd/vault/instances/relay/ubuntu-18.04-server-cloudimg-amd64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 2 -m 4096M -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:9f:4c:31 -netdev tap,id=hostnet0,ifname=tap-643df183fe0,script=no,downscript=no -qmp stdio -cpu host -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/snap/multipass/common/data/multipassd/vault/instances/relay/cloud-init-config.iso

Additional info

  • multipass version
    multipass 1.6.1
    multipassd 1.6.1
  • multipass info --all
    Name: relay
    State: Running
    IPv4: 10.52.196.75
    Release: Ubuntu 18.04.5 LTS
    Image hash: 04a92109979d (Ubuntu 18.04 LTS)
    Load: 1.92 0.78 0.29
    Disk usage: 21.0G out of 24.1G
    Memory usage: 102.8M out of 3.9G

I am happy to provide more logs, if you have a clue what can cause this issue.

@adaholycs adaholycs added the bug label Feb 11, 2021
@Saviq
Copy link
Collaborator

Saviq commented Feb 11, 2021

Hi @adaholycs, can you please try if snap revert helps with this?

We just released a new version, and somehow it must be causing this issue.

Can you please say what's your host OS?

@Saviq Saviq added the high high importance label Feb 11, 2021
@Saviq
Copy link
Collaborator

Saviq commented Feb 11, 2021

@adaholycs the Load: in the output being 1.92 seems related, can you verify if nothing inside the instances is hogging the CPU?

@adaholycs
Copy link
Author

adaholycs commented Feb 11, 2021

Thanks for the fast reply I will check it!

I see popping up:
landscape-sysin in the top when I monitor inside the VM.

My operating system is 18.04 I do not upgrade to 20.04. It seems like multipass does not like 20.04, yet.

@adaholycs
Copy link
Author

adaholycs commented Feb 11, 2021

Hi @adaholycs, can you please try if snap revert helps with this?

Yes now my CPU is silent!
I am happy to help if you need anything feel free to ask!

Both machines are fine after the revert!

@adaholycs
Copy link
Author

@adaholycs the Load: in the output being 1.92 seems related, can you verify if nothing inside the instances is hogging the CPU?

How to check this. What do you mean?

@Saviq
Copy link
Collaborator

Saviq commented Feb 11, 2021

@adaholycs I think we found what the problem is, do you have the multipass.gui running? You should see the Multipass logo on your system tray. If so, please close it and see if the CPU usage stays down, even after snap refresh multipass --stable?

You can also disable it permanently with multipass set client.gui.autostart=false.

@adaholycs
Copy link
Author

adaholycs commented Feb 11, 2021

Hello,

indeed this helps to avoid the high CPU issue. Thank you very much!

For anyone having the same issue:
You may look up the PID number
ps aux | grep multipass.gui
and kill it with
sudo kill ####

Best,
Johann

@townsend2010
Copy link
Contributor

Fixed by #1965.

@Saviq
Copy link
Collaborator

Saviq commented Feb 12, 2021

@adaholycs would you please try the version from the candidate channel?

snap refresh multipass --candidate

Remember please to start the Multipass GUI app and see if the CPU situation is normal. Thanks!

@adaholycs
Copy link
Author

Yes the CPU usage is normal with multipass gui started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high high importance
Projects
None yet
Development

No branches or pull requests

3 participants