Search code examples
linuxcontinuous-integrationandroid-emulatorgitlab-ci-runnerkvm

android emulator low performance with multicore cpus on linux server


when I start the emulator I get a message:

emulator: WARNING: Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.

the server is quite productive, has 6 cores with 2 threads. Sufficient amount of RAM. I installed everything necessary on the similarity of kvm and etc. I use intel-atom-x86 os27api. But this message still doesn't disappear. And this seems to have a strong impact on the performance of emulators. And the load average in top rises above 12.0

the ci structure is constructed as follows: gitlab-runner { docker { project, android-sdk+emulator } }

I understand that need to limit the use of only one core for one emulator. Is there any way to solve this?

P.S. emulators run and work, but CI tests often crash. (everything is fine locally on the computer). running 3 emulators


Solution

  • I was able to reduce the server load by specifying --device when creating the emulator. I use — 5.4in FWVGA for all 4 emulators. And after that, load Average I stable get a value of 4-6, instead of 12 as before.

    The warning didn't disappear. This is enough for me) but I also look forward to any suggestions for solving the problem.