Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

High CPU usage with Android emulator (qemu-system-i386.exe)

People also ask

What is QEMU system i386?

DESCRIPTION. The QEMU PC System emulator simulates the following peripherals: i440FX host PCI bridge and PIIX3 PCI to ISA bridge. Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA extensions (hardware level, including all non standard modes). PS/2 mouse and keyboard.

How do I reduce CPU usage on emulator?

I reduced the CPU usage of my emulator by setting the framerate of the monitor to 60hz. It was on 144hz and my CPU was running at 60% - 70%. By only changing the framerate of the monitor, it's now sitting at 3% usage.

How do I make BlueStacks use less CPU?

It's possible to manually force Bluestacks to use less CPU processing power. Open up Task Manager by pressing Ctrl + Shift + Esc. Click on the Details tab, find BlueStacks, and right-click on it. Select “Set priority” and choose either “Below Normal” or “Low” depending on your needs.


The cause of the constant CPU usage could be the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file.

Change/add those two lines

hw.audioInput=no
hw.audioOutput=no

Update: As buncis commented you can also try to disable GPS if not needed:

hw.GPS = no 

On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini
On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini


On Mac I noticed that the emulator was using over 100% CPU after my laptop went to sleep. Turning the audio off as Benjamin suggested didn't fix that problem.

Restarting the simulated device by long-pressing the power button on the emulator works for me.


Using the x86_64 (Or the 64 bit) emulator solved it for me. They recommend the x86 version, but it was acting up for me.


To find out what on the virtual device is using the most CPU:

adb shell

$ top

This will show you a list of processes with the highest CPU usage atop.

This will help you determine whether it's a process (such as your app) inside the emulator, another process inside the emulator, or just the emulation itself using a lot of CPU.

In the latter case, try optimizing the emulator by installing HAX (Native intel instructions) or perhaps enable hardware acceleration using the AVD profile editor.


I had that problem on the start of November 2018.

Virtual device was contently trying to connect to the mobile network data, so I turned it off inside of the device itself. Work great now.


The same problem with qemu on Win7, HAXM 7.2.0. I've tried switch off audio, it didn't help, qemu consumes about 20% of CPU anytime, Android works very slow on both x86 and x64 images.

I've found solutions in HAXM's Release Notes file:

  • On Windows, Avast Antivirus may interfere with HAXM and cause Android Emulator or QEMU to run very slowly. A workaround is to uncheck "Use nested virtualization where available" in Avast Settings > Troubleshooting.

I have Avast Pro Antivirus 18.5. I've unchecked this param, rebooted PC and now qemu consumes 0% in idle, Android works fine.

UPDATE: if QEMU started consume CPU again, first check Avast's update status. After background update Avast may start to interfere to HAXM again. Just reboot Windows to solve it.