Austin B
Austin B

Reputation: 1600

High CPU usage with Android x86 emulators, only with multiple instances

On Windows 10 with the most recent release of the Android emulator (26.0.3), I notice high CPU usage only when running multiple instances of the emulator, and this leaves all instances after the first unusably laggy. I have tried the Marshmallow x86-64 and Nougat x86 (32-bit) instances, and have the Intel Hardware Accelerated Execution Manager (HAXM) installed.

I have tried disabling audio and multicore according to answers on another question, but this has not helped. I also tried different x86 emulator images and even creating new ones. This only started happening recently, I believe just after I ran the SDK updater.

System Specs:

Upvotes: 1

Views: 3505

Answers (1)

Austin B
Austin B

Reputation: 1600

In my case, I noticed that the emulator process (qemu-system-i386.exe) that was using the higher amount of CPU was surprisingly using less memory than the one that was running fine. This hinted to me that there may be an allocation issue.

I re-ran the HAXM installer, located in <Android SDK path>\extras\intel\Hardware_Accelerated_Execution_Manager and selected the Change option to see how much memory was allocated to HAXM, the maximum amount it can use across all instances.

It turns out it had been either set or reset (maybe the SDK update silently re-ran the HAXM installer) to only 2 GB, which is only enough to run one emulator instance comfortably (which are set to use 1536 MB of RAM by default at creation). I raised this to 8 GB (4 GB is probably sufficient for two instances but I have RAM to spare) and restarted my emulators, and now they're all running just fine.

Upvotes: 1

Related Questions