Friday, May 24, 2013

Android Emulator performance - Windows 8 vs Ubuntu 13.04

I mentioned earlier I've been trying Ubuntu for Android development, and today I'll try to capture the difference in performance of the Android emulator on the two platforms. I haven't seen much difference in terms of Eclipse performance, but when it comes down to the Emulator it is quite obvious.

I'm not quite sure what makes the difference so large, might be the OS or maybe the QEMU software implementation on each OS. I chose to test with Android 4.2.2 AVD images just to push it - older versions like Android 2.1 or 2.3 seem to work better.

Also I'm running the tests on my home Dell laptop which is a few years old, making the difference even more obvious. I find Windows 8 on this machine faster than Windows 7 and generally a pleasant experience while probably on par with Ubuntu 13.04 in terms of performance.

While I find Windows more familiar and easier to use, because of the poor Android emulator experience on Windows I find using Ubuntu a less annoying experience for this particular task.

Environment


Machine

  • Dell Vostro 1520
  • 15.4” Widescreen WXGA+ CCLF, anti-glare (1440x900);
  • Intel Core 2 Duo P8600 (2.4 GHz, 1066 Mhz, 3 MB cache);
  • Intel® 45 Express chipset
  • Intel Integrated GMA 4500MHD;
  • 4 GB RAM, 800 MHz DDR2 Dual Channel;
  • 320 GB Seagate ST9320423ASG 7200 rpm, NCQ enabled;

    Windows 8

    • Windows 8 (x64)
      Version: 6.2.9200
    • android-sdk\tools\emulator-x86.exe
      Version: n/a
      Build Time: Tue May 14 02:49:56 2013
    • Intel HAXM 1.0.6 
    • Intel 4 Series Express display driver
      WDDM 1.1, 8.15.10.2702

    Ubuntu 13.04

    • Ubuntu 13.04 (x64)
      Linux VOSTRO 3.8.0-21-generic #32-Ubuntu SMP Tue May 14 22:16:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    • android-sdk/tools/emulator64-x86
      Android emulator version 22.0 (build_id OPENMASTER-675183)

    Eclipse / Android SDK

    • Eclipse 4.3 M7 x64, Kepler
      • 20130509-1105 (x64) - Windows
      • 20130225-0426 (x64) - Ubuntu
    • Oracle / Sun JDK 1.7.0_21 (x64)
    • Android SDK Tools 22
    • Android SDK Platform Tools 17
    • Android 4.2.2 (API 17) - Intel x86 Atom System Image rev. 1

    Android Virtual Devices


    Phone

    • 3.2" QVGA (320 x 480: mdpi)
    • Android 4.2.2 - API Level 17
    • Intel Atom (x86)
    • RAM: 512 MB
    • VM Heap: 16 MB
    • Internal Storage: 200 MB
    • SD Card: 200 MB
    • Use Host GPU

    Nexus 7

    • Nexus 7 (7.27", 800 x 1280: tvdpi)
    • Android 4.2.2 - API Level 17
    • Intel Atom (x86)
    • RAM: 512 MB
    • VM Heap: 32 MB
    • Internal Storage: 200 MB
    • SD Card: 200 MB
    • Use Host GPU

    Windows 8


    Performance on the Phone AVD is acceptable although slightly laggy, using Intel HAXM 1.0.6 and "Use Host GPU" option. My GPU chip / driver don't seem to support OpenGL 2.0 (1.1 only?), showing in the startup messages.
    Starting emulator for AVD 'Phone_4.2'
    Failed to create Context 0x3005
    could not get wglGetExtensionsStringARB
    emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    emulator: device fd:688
    HAX is working and emulator runs in fast virt mode
    AnTuTu Benchmark v3.3 scores:
    • Total: 13,837
    • CPU: 7,503
    • GPU: 141
    • RAM: 5,643
    • I/O: 550

    For Nexus 7 AVD, I had to drop down the RAM to 512 MB to get HAXM working with it, maybe because I configured HAXM earlier to only use 512 MB, trying to avoid the system running out of memory (only 4 GB of RAM). The experience is laggy (1-2 seconds wait between activities), barely usable - disabling animations helps a bit.
    Starting emulator for AVD 'Nexus_7'
    Failed to create Context 0x3005
    could not get wglGetExtensionsStringARB
    emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    could not get wglGetExtensionsStringARB
    emulator: device fd:692
    HAX is working and emulator runs in fast virt mode
    emulator: emulator window was out of view and was recentered
    AnTuTu Benchmark v3.3 scores:
    • Total: 11,572
    • CPU: 6,282
    • GPU: 42
    • RAM: 4,713
    • I/O: 535

    Ubuntu 13.04


    Emulators start in seconds (15-30) to desktop, compared to minutes (1-3) in Windows!

    Phone 4.2 AVD is quite snappy, and haven't done anything special for it like install KVM. No additional messages at startup. AnTuTu shows same OpenGL 1.1 on screen during testing, but the FPS is much higher (~60 fps)!

    AnTuTu Benchmark v3.3 scores:
    • Total: 15,440
    • CPU: 7,728
    • GPU: 1,234
    • RAM: 5,918
    • I/O: 560

    Nexus 7 AVD starts quickly and it's very snappy! Navigation through activities and scrolling is very responsive, a huge difference from Windows. Some error messages at image startup though:
    Starting emulator for AVD 'Nexus_7'
    Failed to load libGL.so
    error libGL.so: cannot open shared object file: No such file or directory
    Failed to load libGL.so
    error libGL.so: cannot open shared object file: No such file or directory
    emulator: emulator window was out of view and was recentered
    Reading this thread I created the link below to fix the error message - didn't see any change in the scores though.
    # sudo apt-get install libgl1-mesa-dev
    # sudo ln -sv /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/libGL.so
    ‘/usr/lib/libGL.so’ -> ‘/usr/lib/x86_64-linux-gnu/libGL.so’
    
    AnTuTu Benchmark v3.3 scores:
    • Total: 14,104
    • CPU: 7,365
    • GPU: 538
    • RAM: 5,662
    • I/O: 560

    No comments :

    Post a Comment