Although operating system optimization has been studied extensively, previous work mainly focuses on solving performance problems. In the cloud era, many servers only run a single application, making it desirable to provide an application-specific operating system (ASOS) that is most suitable for the application. In contrast to existing approaches that build ASOS by manual redesign and reimplementation, this paper presents Tarax, a compiler-based approach to constructing an ASOS for each application. With profile collected from executing the target application on an instrumented Linux kernel, Tarax recompiles the kernel while applying profile-guided optimizations (PGOs). Although GCC has already implemented the optimization process that can be applied to user applications, it does not work on the Linux kernel directly. We modify the Linux kernel and GCC to support kernel instrumentation and profile collection. We also modify GCC to reduce the size of optimized kernel images. We conduct experiments on six popular server applications: Apache, Nginx, MySQL, PostgreSQL, Redis and Memcached. Experimental results show that application performance improves by 8.8% on average (up to 16%) on the ASOS. We also perform detailed analysis to reveal how the resulting ASOS improves performance, and discuss future directions in ASOS construction.
This is a preview of subscription content, access via your institution.
Buy single article
Instant access to the full article PDF.
Tax calculation will be finalised during checkout.
Mei H, Guo Y. Network-oriented operating systems: status and challenges (in Chinese). Sci Sin Inform, 2013, 43: 303–321
Mei H, Guo Y. Toward ubiquitous operating systems: a software-defined perspective. Computer, 2018, 51: 50–56
Mei H. Understanding “software-defined” from an OS perspective: technical challenges and research issues. Sci China Inf Sci, 2017, 60: 126101
Anderson T E. The Case for Application-Specific Operating Systems. Berkeley: University of California, 1992
Engler D R, Kaashoek M F, O’Toole J J. Exokernel: an operating system architecture for application-level resource management. In: Proceedings of the 15th ACM Symposium on Operating Systems Principles, Copper Mountain, 1995. 251–266
Madhavapeddy A, Mortier R, Rotsos C, et al. Unikernels: library operating systems for the cloud. In: Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems, Houston, 2013. 461–472
Manco F, Lupu C, Schmidt F, et al. My VM is lighter (and safer) than your container. In: Proceedings of the 26th Symposium on Operating Systems Principles, Shanghai, 2017. 218–233
Peter S, Li J L, Zhang I, et al. Arrakis: the operating system is the control plane. ACM Trans Comput Syst, 2015, 33: 11
Belay A, Prekas G, Klimovic A, et al. IX: a protected dataplane operating system for high throughput and low latency. In: Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), Broomfield, 2014
Yuan P F, Guo Y, Chen X Q. Experiences in profile-guided operating system kernel optimization. In: Proceedings of the 5th Asia-Pacific Workshop on Systems, Beijing, 2014
Gupta R, Mehofer E, Zhang Y. Profile Guided Code Optimizations. Boca Raton: CRC Press, 2002
Boyd-Wickizer S, Clements A T, Mao Y, et al. An analysis of Linux scalability to many cores. In: Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation, Vancouver, 2010
Melo A. The new Linux ‘perf’ tools. In: Proceedings of the 17th International Linux System Technology Conference (Linux Kongress), Nuremberg, 2010. 21–24
Chen D H, Vachharajani N, Hundt R, et al. Taming hardware event samples for FDO compilation. In: Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization, Toronto, 2010. 42–52
Chen D H, Li D X, Moseley T. AutoFDO: automatic feedback-directed optimization for warehouse-scale applications. In: Proceedings of the 2016 International Symposium on Code Generation and Optimization, Barcelona, 2016. 12–23
Yuan P F, Guo Y, Chen X Q, et al. Device-specific Linux kernel optimization for android smartphones. In: Proceedings of the 6th IEEE International Conference on Mobile Cloud Computing, Services, and Engineering, Bamberg, 2018. 65–72
Chanet D, Sutter B D, Bus B D, et al. Automated reduction of the memory footprint of the Linux kernel. Trans Embed Comput Syst, 2007, 6: 23
Pu C, Autrey T, Black A, et al. Optimistic incremental specialization: streamlining a commercial operating system. In: Proceedings of the 15th ACM Symposium on Operating Systems Principles, Copper Mountain, 1995. 314–321
Wang X L, Luo T W, Hu J Y, et al. Evaluating the impacts of hugepage on virtual machines. Sci China Inf Sci, 2017, 60: 012103
Lynch W C. Operating system performance. Commun ACM, 1972, 15: 579–585
Chen J B, Bershad B N. The impact of operating system structure on memory system performance. SIGOPS Oper Syst Rev, 1993, 27: 120–133
Lozi J P, Lepers B, Funston J, et al. The linux scheduler: a decade of wasted cores. In: Proceedings of the 11th European Conference on Computer Systems, London, 2016
Lu L, Arpaci-Dusseau A C, Arpaci-Dusseau R H, et al. A study of Linux file system evolution. In: Proceedings of the 11th USENIX Conference on File and Storage Technologies (FAST 13), San Jose, 2013. 31–44
Huang J, Qureshi M K, Schwan K. An evolutionary study of Linux memory management for fun and profit. In: Proceedings of 2016 USENIX Annual Technical Conference (USENIX ATC 16), Denver, 2016. 465–478
Speer S E, Kumar R, Partridge C. Improving UNIX kernel performance using profile based optimization. In: Proceedings of USENIX Winter 1994 Technical Conference, San Francisco, 1994
Schmidt W J, Roediger R R, Mestad C S, et al. Profile-directed restructuring of operating system code. IBM Syst J, 1998, 37: 270–297
Flower R, Luk C K, Muth R, et al. Kernel optimizations and prefetch with the Spike executable optimizer. In: Proceedings of the 4th Workshop on Feedback-Directed and Dynamic Optimization (FDDO-4), Austin, 2001
Chanet D, Cabezas J, Morancho E, et al. Linux kernel compaction through cold code swapping. In: Transactions on High-Performance Embedded Architectures and Compilers II. Berlin: Springer, 2009. 173–200
This work was partly supported by National Key Research and Development Program (Grant No. 2017YFB1001904), and National Natural Science Foundation of China (Grant No. 61772042).
About this article
Cite this article
Yuan, P., Guo, Y., Zhang, L. et al. Building application-specific operating systems: a profile-guided approach. Sci. China Inf. Sci. 61, 092102 (2018). https://doi.org/10.1007/s11432-017-9418-9
- operating system
- Linux kernel
- profile-guided optimization