Performance issues with VBox+Android-x86

Christian Menard christian.menard at ...104...
Thu Nov 6 13:59:31 CET 2014

Hello everyone,

I'm still working on NOVA(64)+VBox+Android_x86 on the Panasonic Toughpad FZ-M1 
with Intel Core i5-4302Y CPU (With VT-X). After all the basic stuff is working 
my problem is that overall performance of the system is very bad. This issue 
is related to Genode as Android runs fast and with smooth animations on top of 
Linux+VBox and Linux+Qemu (on the same hardware).

Do you have any ideas on what might be causing the performance issues or any 
hints on where to investigate?

Here is what I know so far:

I used VBox's built-in performance counters to investigate the issue. Based on 
these counters I found that a big portion of processing time is spend on 
'other' tasks (most often more than 50%). This is described as "Time spent in 
the VMM or preempted recently."

I found that during boot-up a lot of time is spend in the Recompiler, or more 
specific: on executing recompiled code. Here is an example of the performance 
counter as found after Android booted to welcome screen:

52808 ticks/call (112541953198 ticks, 2131148 times, max 9428119254, min 116)

What surprises me here is the max value. Several billion ticks (should 
correspond to several seconds of processing time) seems to be very much for 
instruction emulation. However, only a small amount of time is spend in 
Runcode once Android is booted up. So if this is an issue, it would only speed 
up the boot. 

I also had a look at the graphics backend and found that a significant amount 
of time is spend on framebuffer updates. Here it might be possible to do some 
optimizations. However, tests showed that this is a not the major problem. The 
calculation done between two frames takes too long, in comparison the update 
of the frame itself is only a minor part.

Recently there was a issue and a related commit added on github by Christian 
Prochaska. I pulled this 
commit along with a chain of preceding changes. This significantly improved 
performance to a somewhat usable level but it is still way too slow. So far I 
did not test if this specific commit or some of the preceding commits are 
responsible for the increase in performance.

All best
-------------- next part --------------
# \brief Start Android in VMBox directly using the HW framebuffer
# \author Christian Menard
# \date   2014-07-08

# Build

# base components
set build_components { core init drivers/timer }

# basic driver components
append build_components {

# android components 
append build_components { 

build $build_components

# Generate config

# Basic configuration

set config {
<config prio_levels="4">
		<service name="ROM"/>
		<service name="RAM"/>
		<service name="CAP"/>
		<service name="IRQ"/>
		<service name="IO_MEM"/>
		<service name="IO_PORT"/>
		<service name="PD"/>
		<service name="RM"/>
		<service name="CPU"/>
		<service name="LOG"/>
		<service name="SIGNAL"/>
		<any-service> <parent/> <any-child/> </any-service>
	<start name="timer" priority="0"> 
		<resource name="RAM" quantum="1M"/>
		<provides> <service name="Timer"/> </provides>

# Basic driver configuration

append config {
	<start name="acpi" priority="-1">
		<resource name="RAM" quantum="32M"/>
		<binary name="acpi_drv"/>
			<service name="PCI"/>
			<service name="IRQ" />
			<service name="PCI"> <any-child /> </service>
			<any-service> <parent/> <any-child /> </any-service>
	<start name="fb_drv" priority="-1">
		<resource name="RAM" quantum="4M"/>
		<provides><service name="Framebuffer"/></provides>
 		<config width="1280"
	<start name="usb_drv" priority="-1">
		<resource name="RAM" quantum="12M"/>
		<provides><service name="Input"/></provides>
		<config ehci="yes" uhci="yes" xhci="yes"> <hid/> </config>

# Android configuration

append config {
	<start name="rtc_drv" priority="-1">
		<resource name="RAM" quantum="1M"/>
			<service name="Rtc"/>
	<start name="virtualbox" priority="-2">
		<resource name="RAM" quantum="1G"/>
			<image type="iso" file="android.iso" />
			<libc stdout="/dev/log" stderr="/dev/log">
					<dir name="dev"> <log/> </dir>
					<rom name="android.iso" />
			<service name="Framebuffer"><child name="fb_dv" /></service>
			<service name="Input"><child name="usb_drv" /></service>
			<any-service> <parent/> <any-child /> </any-service>

append config {

install_config $config

# Create launchpad configuration
set launchpad_config_fd [open "bin/launchpad.config" w]
puts $launchpad_config_fd {<config>
	<launcher name="testnit"   ram_quota="768K" />
	<launcher name="scout"     ram_quota="41M" />
	<launcher name="launchpad" ram_quota="6M">
		<configfile name="launchpad.config" />
	<launcher name="nitlog"    ram_quota="1M" />
	<launcher name="liquid_fb" ram_quota="7M" />
		<config resize_handle="on" />
	<launcher name="nitpicker" ram_quota="1M" />
close $launchpad_config_fd

# Boot modules

# generic modules
set boot_modules { core init timer }

# basic driver modules
append boot_modules { 
	acpi_drv pci_drv pci_device_pd 

# android modules 
append boot_modules {
	virtualbox android.iso

build_boot_image $boot_modules

# Execute test case

set builddir [pwd]
set tooldir [file dirname $argv0]

exec $tooldir/create_grub2_entry_nova.perl $builddir toughpad-android
exec $tooldir/ $builddir toughpad-android

More information about the users mailing list