skip to main content
research-article

Eager Synching: A Selective Logging Strategy for Fast fsync() on Flash-Based Android Devices

Authors Info & Claims
Published:19 December 2016Publication History
Skip Abstract Section

Abstract

Flash storage has been a standard component in Android devices. Recent research has reported that application data management in Android involves frequent fsync() operations. The current fsync() implementations, including those of ext4 and F2FS, have several common drawbacks. Specifically, ext4 commits a transaction every time to sync a file, whereas F2FS commits a checkpoint to sync a directory. Committing a transaction or checkpoint flushes all dirty data from the page cache to the flash storage via many small, random block write requests. The resultant high I/O frequency and excessive write traffic cause a high fsync() latency. This study presents an efficient fsync() method, called eager synching, which is based on a simple idea: write less, and write sequentially. To sync a file, eager synching writes only a subset of all dirty data in the page cache to a sequential log space using a few sequential block write requests. It does not involve transaction or checkpoint committing. We successfully implemented eager synching in ext4 and F2FS, and our experimental results show that, compared with the original fsync() methods of ext4 and F2FS, eager synching reduced the average and maximum fsync() latencies by up to 72% and 91%, respectively, block-level write traffic by up to 35%, and I/O frequency by up to 66%. Through enhanced crash recovery procedures, eager synching can successfully recover all previously synched files while still guaranteeing the file system integrity. We also conducted live application replays using the proposed eager synching approach and observed that this approach significantly improved the application frame updating rate and application execution time.

References

  1. Alan D. Brunelle. 2007. blktrace. Retrieved from http://www.cse.unsw.edu.au/∼aaronc/iosched/doc/blktrace.html.Google ScholarGoogle Scholar
  2. Li-Pin Chang, Po-Han Sung, and Po-Hung Chen. 2014. Fast file synching for applications in flash-based Android devices. In Proceedings of the 2014 IEEE Non-Volatile Memory Systems and Applications Symposium (NVMSA’14). IEEE, 1--6. Google ScholarGoogle ScholarCross RefCross Ref
  3. Tzi-Cker Chiueh and Lan Huang. 2002. Track-based disk logging. In Proceedings of the International Conference on Dependable Systems and Networks (DSN’02). 429--438. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Lorenzo Gomez, Iulian Neamtiu, Tanzirul Azim, and Todd Millstein. 2013. RERAN: Timing- and touch-sensitive record and replay for Android. In Proceedings of the 2013 International Conference on Software Engineering (ICSE’13). 72--81. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Constantin Gonzalez. 2010. Solaris ZFS, Synchronous Writes and the ZIL Explained. Retrieved from http://constantin.glez.de/blog/2010/07/solaris-zfs-synchronous-writes-and-zil-explained.Google ScholarGoogle Scholar
  6. Daeho Jeong, Youngjae Lee, and Jin-Soo Kim. 2015. Boosting quasi-asynchronous I/O for better responsiveness in mobile devices. In Proceedings of the 13th USENIX Conference on File and Storage Technologies. USENIX Association, 191--202. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sooman Jeong, Kisung Lee, Seongjin Lee, Seoungbum Son, and Youjip Won. 2013. I/O stack optimization for smartphones. In Proceedings of the 2013 USENIX Annual Technical Conference. USENIX, 309--320. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Woon-Hak Kang, Sang-Won Lee, Bongki Moon, Gi-Hwan Oh, and Changwoo Min. 2013. X-FTL: Transactional FTL for SQLite databases. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data (SIGMOD’13). 97--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Hyojun Kim, Nitin Agrawal, and Cristian Ungureanu. 2012. Revisiting storage for smartphones. In Proceedings of the USENIX Conference on File and Storage Technologies. 209--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Hyojun Kim and Seongjun Ahn. 2008. BPLRU: A buffer management scheme for improving random writes in flash storage. In Proceedings of the 6th USENIX Conference on File and Storage Technologies (FAST’08). USENIX Association, 1--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Je-Min Kim and Jin-Soo Kim. 2012a. Advil: A pain reliever for the storage performance of mobile devices. In Proceedings of the 2012 IEEE 15th International Conference on Computational Science and Engineering (CSE’12). 429--436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Je-Min Kim and Jin-Soo Kim. 2012b. AndroBench: Benchmarking the storage performance of Android-based mobile devices. In Frontiers in Computer Education, Sabo Sambath and Egui Zhu (Eds.). Advances in Intelligent and Soft Computing, Vol. 133. 667--674. Google ScholarGoogle ScholarCross RefCross Ref
  13. Changman Lee, Dongho Sim, Jooyoung Hwang, and Sangyeun Cho. 2015b. F2FS: A new file system for flash storage. In Proceedings of the USENIX Conference on File and Storage Technologies (FAST’15). 273--286. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Kisung Lee and Youjip Won. 2012. Smart layers and dumb result: IO characterization of an Android-based smartphone. In Proceedings of the 10th ACM International Conference on Embedded Software (EMSOFT’12). 23--32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Wongun Lee, Keonwoo Lee, Hankeun Son, Wook-Hee Kim, Beomseok Nam, and Youjip Won. 2015a. WALDIO: Eliminating the filesystem journaling in resolving the journaling of journal anomaly. In Proceedings of the USENIX Annual Technical Conference. 235--247. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Linux man page. 2015. fsync(2). (2015). http://linux.die.net/man/2/fsync.Google ScholarGoogle Scholar
  17. Aravind MacHiry, Rohan Tahiliani, and Mayur Naik. 2013. Dynodroid: An input generation system for android apps. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering. ACM, 224--234. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Robotium. 2015. Robotium testing framework for Android. Retrieved from https://code.google.com/p/robotium/.Google ScholarGoogle Scholar
  19. Liang Shi, Jianhua Li, Chun Jason Xue, Chengmo Yang, and Xuehai Zhou. 2011. ExLRU: A unified write buffer cache management for flash memory. In Proceedings of the 9th ACM International Conference on Embedded Software. ACM, 339--348. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Systemtap. 2015. Systemtap. Retrieved from http://sourceware.org/systemtap/.Google ScholarGoogle Scholar
  21. The Open Group. 2004. fsync. Retrieved from http://pubs.opengroup.org/onlinepubs/009695399/functions/fsync.html.Google ScholarGoogle Scholar
  22. Randolph Y. Wang, Thomas E. Anderson, and David A. Patterson. 1999. Virtual log based file systems for a programmable disk. In Proceedings of the 3rd Symposium on Operating Systems Design and Implementation (OSDI’99). USENIX Association, 29--43. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Shengqian Yang, Dacong Yan, and Atanas Rountev. 2013. Testing for poor responsiveness in Android applications. In Proceedings of the 1st International Workshop on the Engineering of Mobile-Enabled Systems (MOBS’13). IEEE, 1--6. Google ScholarGoogle ScholarCross RefCross Ref
  24. Tom Yeh, Tsung-Hsiang Chang, and Robert C. Miller. 2009. Sikuli: Using GUI screenshots for search and automation. In Proceedings of the 22nd Annual ACM Symposium on User Interface Software and Technology. ACM, 183--192. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Chi Zhang, Xiang Yu, Arvind Krishnamurthy, and Randolph Y. Wang. 2002. Configuring and scheduling an eager-writing disk array for a transaction processing workload. In Proceedings of the 1st USENIX Conference on File and Storage Technologies (FAST’02). USENIX Association, Article 24. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Eager Synching: A Selective Logging Strategy for Fast fsync() on Flash-Based Android Devices

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Embedded Computing Systems
            ACM Transactions on Embedded Computing Systems  Volume 16, Issue 2
            Special Issue on LCETES 2015, Special Issue on ACSD 2015 and Special Issue on Embedded Devise Forensics and Security
            May 2017
            705 pages
            ISSN:1539-9087
            EISSN:1558-3465
            DOI:10.1145/3025020
            Issue’s Table of Contents

            Copyright © 2016 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 19 December 2016
            • Accepted: 1 April 2016
            • Revised: 1 January 2016
            • Received: 1 August 2015
            Published in tecs Volume 16, Issue 2

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader