The Storage 2.0 benchmark adds 64-bit support to the original Storage test. 64-bit CPUs deliver faster, richer experiences and other performance improvements. As a result, benchmark scores from Storage 2.0 are not comparable with results from the original Storage test.
Implementation
The Storage test consists of two parts:
- File IO performance
- Android SQLite performance
File IO performance
In the File IO part, the test reads and writes files from and to the device’s internal and external storage systems. The test performs both serial and random accesses with selected block sizes.
The data that is being read and written consists of random number characters. Before the read operations, the data is generated in the target partition by the application.
For each access pattern, the test is repeated 5 times, and the median bandwidth is used in the result calculation. The final result describes throughput measured in MB/s.
The implementation uses native code. The flags used when opening each file are O_RDWR|O_CREAT|O_DIRECT.
For the write operations, a call to fsync() follows each write.
Android SQL performance
In the Database part of the benchmark, the test performs a series of transactions for reading, updating, inserting, and deleting records in an SQLite database.
The reading part of the test reads 10 sets of 600 records, 6000 records in total. The update, insert, and delete parts use 2,000 records. For each kind of operation, the bandwidth is used in the result calculation, given in IOPS (Input/Output Operations Per Second).
Workloads
Internal storage workloads
- Read a 32 MB file sequentially in 2 MB blocks from internal storage
- Read a 32 MB file randomly in 4 KB blocks from internal storage
- Write a 16 MB file sequentially in 2 MB blocks to internal storage
- Write a 16 MB file randomly in 4 KB blocks to internal storage
External storage workloads
- Read a 32 MB file sequentially in 2 MB blocks from external storage
- Read a 32 MB file randomly in 4 KB blocks from external storage
- Write a 16 MB file sequentially in 2 MB blocks to external storage
- Write a 16 MB file randomly in 4 KB blocks to external storage
Database workloads
- Read 10 sets of 600 records from an SQLite database table
- Update 2000 records in an SQLite database table
- Insert 2000 records into an SQLite database table
- Delete 2000 records from an SQLite database table