Quasi-NVRAM in Android and Apple devices

Summary:You still hear complaints about nonremovable batteries in mobile devices – mostly Apple – but there is an upside: the ability to eliminate performance overhead. Here's how.

Three researchers, Hao Luo, Lei Tian and Hong Jiang of the University of Nebraska, asked a simple and seemingly obvious question. Since our mobile devices have non-removable batteries why don't we treat DRAM as if it were nonvolatile?

Their paper, qNVRAM: quasi Non-Volatile RAM for Low Overhead Persistency Enforcement in Smartphones was presented at the Usenix HotStorage conference last month.

Background

Typically Android mobile devices rely on SQLite, a shared preference key value store or the filesystem API to save persistent data on local flash. These employ journaling or file-level double-writes to ensure persistency.

The problem is that these techniques require multiple writes to storage, incurring substantial system overhead in devices that are already performance and power constrained.

For example, they found that more than 75 percent of Twitter data was written for persistency reasons. Looking at a group of common mobile apps they found that anywhere from 37 percent to 78 percent of the data writes were for atomicity. From the paper:

cost_of_persistency
Courtesy the authors.

Furthermore, it turns out that Android kernel reliability — where these data structures reside — is quite good, based on bug fixes and user support calls. They analyzed Android issue reports and found that only 10 reports or 0.05 percent of all 19,670 reported issues related to Android defects with unexpected or random power-off. That implies a small chance that unexpected power failure may occur.

The test

The researchers constructed a prototype test system with the with several innovations.

  • Quasi-NVRAM. They set aside a portion of system DRAM to act as a battery backed up nonvolatile DRAM.
  • Device driver. A new device driver and library that manage I/O between the qNVRAM and system flash memory.
  • Persistent Page Cache. A new data structure in SQLite using quasi-NVRAM to perform in-place updates to the database files. 
  • Relaxed data flushing. Absorbs repeated writes to table files to further reduce I/O.

Results

Implemented on an Android smartphone they found that

"...qNVRAM speeds up the insert, update and delete transactions by up to 16.33x, 15.86x and 15.76x respectively."

Furthermore, the amount of data committed to flash was reduced by about 40 percent. Given how common constant feed updates are on mobile devices, this is a significant result.

The Storage Bits take 

Some are miffed that many smartphones don't have easily removable batteries. This research shows the upside of such designs: all DRAM can be treated as NVRAM whether on Android or Apple's iOS.

Note that qNVRAM can't replace flash. DRAM is more power-hungry and costly than flash.

But research shows that by reducing the I/O overhead of the system with qNVRAM, significant gains in performance — and presumably battery life — can be achieved at very little cost. It also simplifies the problem of extending flash endurance.

It was obvious five years ago with the advent of non-removable batteries on phones and notebooks that engineers could take a new look at achieving persistency. Congratulations to the researchers for taking a rigorous approach to the problem.

Comments welcome, as always. What problems do you see with qNVRAM?

Topics: Storage, Android, Apple, Hardware, iOS

About

Harris has been working with computers for over 35 years and selling and marketing data storage for over 30 in companies large and small. He introduced a couple of multi-billion dollar storage products (DLT, the first Fibre Channel array) to market, as well as a many smaller ones. Earlier he spent 10 years marketing servers and networks.... Full Bio

zdnet_core.socialButton.googleLabel Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.