Performance

On this page, I try to give you a honest representation of the speed DosBox Turbo. No BS.  No claims that my emulator is 10x faster than yours.  Just the best estimates I can give:

Q. Just how fast is DosBox Turbo?  [Updated 11/30/2013]
A. It depends on the CPU in your device.  DosBox Turbo is the fastest, most optimized DOS emulator available on the Android platform.  Here are some rough estimates garnered from the DOOM Timedemo benchmark results:
  • Quad Core Snapdragon 800 (2.26 Ghz - Nexus 5) ~ Pentium 75 - 90
  • Quad Core Samsung Exynos (1.6 Ghz - Samsung Galaxy Note II) ~ Pentium 75 - 90
  • Quad Core Nvidia Tegra3 CPU (1.5Ghz) ~ Pentium 60-75Mhz
  • Quad Core Snapdragon S4 Pro (1.5 Ghz - Nexus 7 [2013 model]) ~ Pentium 60 Mhz
  • Dual Core A9/Exynos Processor (Samsung Galaxy II @ 1.2Ghz) ~ 486@75-90Mhz
  • Dual Core Nvidia Tegra2 CPU (1Ghz) ~ 486@66-80Mhz
  • Dual Core Qualcomm Snapdragon S3 (MSM8260 1.5Ghz) ~ 486@50Mhz
  • Single Core Generic Cortex A8 (1Ghz) ~ 486@33-40Mhz
Having a newer phone with an ARMv7 CPU will benefit from the new ARMv7 optimizations in the DosBox CPU emulation.  Having an Cortex A9 (Tegra2, Tegra 3, OMAP4, Exynos etc) processor seems to bring about a fairly substantial speed boost due to the new microarchitecture changes in the A9 series (ie. out-of-order, speculative execution).  As of version 2.0.x, DosBox Turbo is now being built with a custom build system that automatically generates optimized builds for ARMv5, ARMv7, ARMv7+NEON and MIPS CPU's.
[Update 5/1/2012] - DosBox Turbo v1.3.7+ has additional optimizations making it about 10% faster than previous versions.
[Update 8/26/2012] - DosBox Turbo 1.4.3+ incorporates numerous additional performance optimizations.
[Update 2/17/2013] - DosBox Turbo 2.0.0+ uses a custom build system that performs Profile Guided Optimization and automatically vectorizes code for NEON.

I've started tabulating benchmark results using Shareware Doom v1.9 timedemo, which makes for a great repeatable benchmark that stresses the CPU, GPU and Audio subsystems.  In order to have comparable results, I used the default DOOM settings of Music Card = Soundblaster, Sound Card = Soundblaster (3 fx channels), Input = Keyboard Only. On the DosBox Turbo side, all the settings are default except:
  • Screen Scaling = Enabled
  • GPU Rendering = true (if your device can support it)
  • Turbo Cycles = true
To run the DOOM timedemo:  doom -timedemo demo3 

 real tics  avg fps  SoC/CPU Type  Device  DosBox Emulator  Remarks
 462  161.7  Intel Core i7-3770k @ 3.9Ghz  Ivy Bridge Desktop PC + DosBox  Desktop DosBox SVN  Doom Timedemo on PC w/32GB RAM with DosBox 0.74
 1674 44.5 Samsung Exynos Quad-core @ 1.6 Ghz Samsung Galaxy Note II DB Turbo 2.0.4 cycles=max 105%, with N.E.A.K. kernel v1.6, conservative governor w/ Lionheart tweaks, GPU Render
 1752 42.6 Qualcomm Snapdragon 800 @ 2.28 Ghz Nexus 5 DB Turbo 2.1.11 Stock Nexus 5 (Android 4.4)
 1759 42.5 Samsung Exynos Quad-core @ 1.6 Ghz Samsung Galaxy Note II DB Turbo 2.0.4 cycles=max 100% + GPU Rendering
 1784  41.9  Samsung Exynos Quad-core @ 1.6 Ghz  Samsung Galaxy Note II  DB Turbo 1.5.5  cycles=max 100%
 1966 38.1 Tegra 3 @ 1.5 Ghz Nexus 7 (2012) Tablet DB Turbo 2.0.0 AOKP overclocked to 1.5 Ghz.  (Interactive Governor) + GPU Rendering
 2128  35.1  Tegra 3 @ 1.5 Ghz  Nexus 7 (2012) Tablet  DB Turbo 1.5.0  AOKP overclocked to 1.5 Ghz. (Interactive Governor)
 2193  34.1  Tegra 3 @ 1.5 Ghz  Nexus 7 (2012) Tablet  DB Turbo 1.4.3  AOKP overclocked to 1.5 Ghz. (Interactive Governor)
 2422 30.8 Snapdragon S4 Pro @ 1.51 Ghz (APQ8064–1AA) Nexus 7 (2013) Tablet DB Turbo 2.1.9 stock rom. Android 4.3
 2716  27.5  Samsung Exynos 4210 Dual @ 1.4 Ghz  Samsung Galaxy Note  DB Turbo 1.4.3  sound device = soundblaster 16 (need to retest w/SB2)
 2886   25.9 Tegra 2 @ 1.0 Ghz ASUS Transformer TF101 DB Turbo 2.1.7 stock rom
 2916  25.6  Tegra 3 @ 1.5 Ghz  Nexus 7 (2012) Tablet  AnDosBox 1.2.8  AOKP overclocked to 1.5 Ghz. Emulation Mode = Speed in settings. (Interactive Governor)
 3015  24.8  Tegra 2 @ 1.0 Ghz  ASUS Transformer TF101  DB Turbo 1.5.0  stock rom
 3411  21.9  Snapdragon S3 @ 1.56 Ghz (MSM8260)  HTC Sensation 4G  DB Turbo 1.5.0  Viper Custom Rom, overclocked to 1.566 Ghz
 3463 21.6 Snapgragon S4 Pro @ 1.51 Ghz (APQ8064) Nexus 4 DB Turbo 2.1.11 Stock Rom. Android 4.4 (KitKat). w/Interactive Governor
 3466  21.5  Snapdragon S3 @ 1.56 Ghz (MSM8260)  HTC Sensation 4G  DB Turbo 1.4.3  Viper Custom Rom, overclocked to 1.566 Ghz
 3630  20.6  Tegra 2 @ 1.0 Ghz  ASUS Transformer TF101  AnDosBox 1.2.8  stock rom.  Emulation Mode = Speed in AnDosBox settings.
 4143 18.0 Cortex A8 @ 1.0 Ghz Samsung SGS i9000 DB Turbo 2.0.4 stock rom. Android 2.3.6
 4221 17.7 Cortex A8 @ 1.0 Ghz Samsung SGS i9000 DB Turbo 1.5.5 stock rom. Android 2.3.6
 4665  16.0  Snapdragon S2 @ 1.0 Ghz (MSM8255)  MyTouch 4G  DB Turbo 1.5.0  Virtuous rom
 4878  15.3  Snapdragon S2 @ 1.0 Ghz (MSM8255)  MyTouch 4G  DB Turbo 1.4.3  Virtuous rom
 5190  14.4  Snapdragon S2 @ 1.0 Ghz (MSM8255)  MyTouch 4G  DB Turbo 1.3.8  Virtuous rom
 7259  10.3   Snapdragon S2 @ 1.0 Ghz (MSM8255)  MyTouch 4G  AnDosBox 1.2.8  Virtuous rom. Emulation Mode = Speed in AnDosBox settings.
 12320  6.1  Tegra 3 @ 1.5 Ghz  Nexus 7 (2012) Tablet  aDosBox 0.2.5  AOKP (JB Build 3) overclocked to 1.5 Ghz.

If you'd like to compare your results to the above, please run the test 3 times.  If you want to compare results with other dosbox emulators, use this dosbox.conf file, and make sure you have screen scaling and landscape mode enabled. The average number of frames per second, rounded to the nearest 0.1fps is computed using the formula from the Doom FAQ: 35*gameticks/realticks, in our case 74690/realticks.

Q. Why is DosBox Turbo running faster on Tegra & Samsung SoC's rather than on Qualcomm Snapdragon S4 (Krait) [Nexus 4, Droid Maxx]? [Updated 11/17/2013]
There are three reasons that users see better performance on Nvidia Tegra 3 and Samsung SoC's rather than the Qualcomm Snapdragon S4 SoC:
1. The stock ROM on most Krait devices (ie. Nexus 4) ship with the conservative ondemand governor which has trouble staying in a higher Mhz state when other apps are running, due to the high frequency at which most Krait SoC's ship. 
2. The original Qualcomm Snapdragon S4 series (especially the first gen S4 Pro in the Nexus 4) has poor integer & NEON IPC when running code with low ILP (ie. most emulators).  Due to the poor Integer & NEON IPC, most emulators will suffer a performance hit on Snapdragon S4 series SoC's when compared to a standard Cortex A8/A9/A15. (reference: discussion in Qualcomm Developer Forum & latencies seen in compiled code).  Furthermore, the SoC is very sensitive to the governor used (see #1 above).
3. The Nexus devices (ie. Nexus 4) that utilize the Snapdragon SoC use the default "non-optimized" dalvik & bionic libraries.
NOTE: Android 4.4 (KitKat) + Interactive Governor goes a long way to improve performance on the Nexus 4 over the older Android 4.3 (Jelly Bean).
NOTE2: The newer Nexus Devices (ie. Nexus 7 2013 and Nexus 5) use the newer Qualcomm Snapdragon 600 & 800 series which have fixed the poor Integer & NEON IPC that was present in the first generation Krait.


Q: Why is there a small delay (lag) between when I tap a button on the screen and the response? [Updated 11/30/2013]
A: In order to differentiate between single tap (mapped by default to left mouse button) & double taps (mapped by default to right mouse button) on the screen, the system needs to wait approximately 300ms to differentiate the two.  If you disable the double tap gesture (ie. set it to NONE), screen taps will be near instantaneous (and perceived performance will be much higher!). You can enable the two-finger action (see main FAQ) for right mouse button, if you still need a right click action. 



Q. Is there anything I can do to improve performance? [Updated 11/17/2013]
A. Please make sure you are using the latest release of DosBox Turbo.  Version 2.0.0 and above have included numerous speed optimizations.  For users of rooted phones using SetCPU (or similar program) to change the CPU governor.  I strongly suggest using the ondemand governor, as most other governors (ie. badass, etc) will results in slower emulation speed. It's been reported that many newer Android devices running ICS and JellyBean (Android 4.0+) are now using a very conservative ondemand CPU governor. These 'de-tuned' versions of the governors will not allow the device stay in a high frequency state for more than a couple hundred milliseconds before scaling the frequency back. Most performance problems can be traced back to using an un-optimal CPU governor.  I strongly recommend using the interactive or interactivex governor, with the performance governor being a good 2nd choice if you need absolute maximum performance at the cost of battery life.

Problem with Governor
One can determine if there is a problem with the governor by accessing the "Quick Menu".  Slide the screen to the right, and scroll the quick menu to the bottom. A 'warning icon' will appear in the CPU Governor section if your device is using a non-optimal governor.

I suggest setting the Cycle Rate to auto, as that will force DosBox Turbo to run as fast as your phone allows without dropping audio samples.  This will suffice in the majority of cases; however, the auto setting tends to be a bit conservative and you can get more speed by manually set the cycle rate to a value higher than the phone would otherwise select on the 'auto' setting for more speed.  Audio samples may start dropping, and the sound might start to crackle if you do that; however, sometimes the crackling is un-noticable and the speed gains may be worth it.

The Memory should be set to the lowest amount necessary to run the application.  For example, DOOM runs great with 4MB, Warcraft requires 8MB.  A higher memory setting than necessary does not equate to improved performance and may actually hamper performance.

[Snapdragon S4 SoC (ie. Nexus 4) Tip]: Significant performance gains can be realized on these devices by simply changing the governor to interactive and killing all running apps in memory before starting DosBox Turbo.  Further performance gains be be realized by utilizing the Faux123 custom kernel.  Edit [11/17/2013] Android 4.4 (KitKat) + Interactive governor improve performance significantly over the older Android 4.3 (JellyBean).

If you have a dual/quad core device, set mpu401/GeneralMIDI instead of Sound Blaster for music in your game's setup if it is possible, and enable MT32/MIDI emulation in DosBox Turbo.

Optimum Performance Settings:
Memory: Use the lowest setting that runs your game.
3dfx Emulation: OFF
GPU Rendering: On (Some older devices are not compatible with or will run faster with this setting disabled)
Turbo Cycles: On (starting w/version 2.0.5, this option will improve speed much more than previously)
Turbo VGA: On
Turbo Audio: On
Frame Skip: 2
PC Speaker:  OFF
Virtual Joystick: OFF
Virtual Buttons: OFF
ISA PnP: OFF
IPX Networking: OFF
Scale Quality: FAST (As of DosBox Turbo v2.0.x, if GPU Rendering is enabled, the Scale Quality has no effect on performance)
CPU Core: Dynamic
CPU Type: auto
CPU Governor: Interactive [Your ROM will need to be rooted to change this]


Furthermore, in DB Turbo v1.3.6+ you can reduce the Audio Quality to get more performance, as well as choosing a simpler sound card.  The following may speed up the emulation (you should run the benchmark to confirm):
Sound Device: SoundBlaster 2  (If your game does not work with SoundBlaster 2, you may have to switch back to SoundBlaster 16).
Audio Frequency: 8000Hz (Note: On some modern devices with NEON support, 16000 or 22050 is actually faster than lower values due to NEON optimizations)
Mixer BlockSize: 512
Audio Prebuffer: 10 (or less)

For absolute maximum performance:
Screen Scaling: Off (As of DosBox Turbo v2.0.0, Screen Scaling no longer incurs a performance penalty if GPU Rendering is enabled in the Settings)
Enable Sound: Off
CPU Governor: Performance


Comments