Android System Benchmark

In 2012 winter quarter, I took the course Operating Systems. It involves a programming project that requires us to benchmark an operating system in terms of the time to finish some certain tasks. My partner and I decided to choose Android as the target platform while most of the other students chose Linux which seems easier. The reason we chose it is that Android is quite popular nowadays and it is open source compared to iOS. We believe that working on this new platform will be more interesting, challenging and rewarding.

Google build Android on top of Linux, they also tailor Linux to meet the special requirement of mobile device context. Later in the project we found those customization causing some problems that might not appear in standard Linux platform. We finally solved these problems and got deep understanding of Android system. For example, Android doesn’t use swap space for memory backing store. If the phone is running out of memory, the system simply kill some apps. That cause problem when we want to benchmark page fault service time. We came up with an alternative approach that measuring the time for accessing a memory mapped file which is essentially same as serving a page fault. More of such examples can be found in our report.

We built an Android application which calls low level C code through JNI. The reason we didn’t use Java directly is that most of the benchmark need to access low level system API, even directly invoke system calls. These couldn’t be implemented in the JVM level. All the benchmarks are implemented with C. The project has roughly 1000 lines of code.

Complete list of benchmarks done:

  • CPU benchmark (overhead of loop, procedure call, system call, process/thread creation, process/thread context switch)
  • Memory benchmark (L1/L2 cache/memory access time, memory bandwidth, page fault service time)
  • Network benchmark (TCP connection time, TCP round trip time, TCP bandwidth)
  • File system benchmark (FS cache size, file read time, remote file read time, contention)

To see how we design the benchmark and the benchmark result, please contact me.

This report got the first place among more than 30 students in the class.