Thoughts on “Rancid: Reliable Benchmarking on Android Platforms”

Paper: S. Afonso and F. Almeida, “Rancid: Reliable Benchmarking on Android Platforms,” in IEEE Access, vol. 8, pp. 143342-143358, 2020, doi: 10.1109/ACCESS.2020.3014533.

This is a recent paper (published August 2020) talking about the problem of benchmarking code on Android platform. Benchmarking allows us to gather data in regard to how our software is performing as well as potential opportunities for additional optimization. The author mentions how benchmarking on Android poses unique challenges. Android is built on top of Linux OS. Application code is typically written in Java (and now more recently potentially in Kotlin). Android also does allow Native code (C/C++) to be written and then it can be referenced in Java through the JNI. There are few challenges that come into play when benchmarking on Android: there could be other processes & apps running in the background that could skew results, processor frequency which can be updated (for example due to power constraints), temperature (temperature throttling), and processor affinity. In the case of processor frequency, there are two separate governors for CPU and GPU. Temperature can impact processor and memory frequency, since the frequency may be reduced by the governors to cool the device. This means that even the ambient temperature which the device is in can impact test results. The author observed sometimes cores being shut down due to this thermal throttling. One thing that I learned from this paper about Android is the concept of processor affinity and how it impacts performance. The author mentioned that modern architecture is built around Arm’s big/little multicore CPU. This architecture consists of having two processors with one that is more performant than the author (hence the name big/little). This means that the performance of the code will be impacted by which processor it runs on. 

The author introduces a framework they have developed called ‘Rancid’, which can be used to mitigate some of the issues outlined earlier when benchmarking Android code. For me, the greatest take away from this paper was the additional understanding it gave me when it comes to Android code optimization and how things such as background processes, processor frequency, processor affinity and temperature impact it. I chose to read this paper because Android continues to grow in influence as a mobile operating system. The mobile space itself does not show any signs of slowing down. Learning Android deeply is a valuable asset to have. 

I tried searching for ‘Rancid Android framework’ to find the website where it can be downloaded, however the only results that came up were references to the paper. So it seems as though the authors have not yet released this framework for public consumption. It would be interesting to play around with this framework to get a better sense of how it works and perhaps eventually it can be incorporated into developer’s standard toolchain when developing on Android. 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s