Skip to main content
Log in

UCat: heterogeneous memory management for unikernels

  • Research Article
  • Published:
Frontiers of Computer Science Aims and scope Submit manuscript

Abstract

Unikernels provide an efficient and lightweight way to deploy cloud computing services in application-specialized and single-address-space virtual machines (VMs). They can efficiently deploy hundreds of unikernel-based VMs in a single physical server. In such a cloud computing platform, main memory is the primary bottleneck resource for high-density application deployment. Recently, non-volatile memory (NVM) technologies has become increasingly popular in cloud data centers because they can offer extremely large memory capacity at a low expense. However, there still remain many challenges to utilize NVMs for unikernel-based VMs, such as the difficulty of heterogeneous memory allocation and high performance overhead of address translations.

In this paper, we present UCat, a heterogeneous memory management mechanism that support multi-grained memory allocation for unikernels. We propose front-end/back-end cooperative address space mapping to expose the host memory heterogeneity to unikernels. UCat exploits large pages to reduce the cost of two-layer address translation in virtualization environments, and leverages slab allocation to reduce memory waste due to internal memory fragmentation. We implement UCat based on a popular unikernel—OSv and conduct extensive experiments to evaluate its efficiency. Experimental results show that UCat can reduce the memory consumption of unikernels by 50% and TLB miss rate by 41%, and improve the throughput of real-world benchmarks such as memslap and YCSB by up to 18.5% and 14.8%, respectively.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Yuan P F, Guo Y, Zhang L, Chen X Q, Mei H. Building application-specific operating systems: a profile-guided approach. Science China Information Sciences, 2018, 61(9): 092102

    Article  Google Scholar 

  2. Madhavapeddy A, Mortier R, Rotsos C, Scott D, Singh B, Gazagnaire T, Smith S, Hand S, Crowcroft J. Unikernels: library operating systems for the cloud. ACM SIGARCH Computer Architecture News, 2013, 41(1): 461–472

    Article  Google Scholar 

  3. Kivity A, Laor D, Costa G, Enberg P, Har’El N, Marti D, Zolotarov V. Osv—optimizing the operating system for virtual machines. In: Proceedings of USENIX ATC’ 14: 2014 USENIX Annual Technical Conference. 2014, 61–72

  4. Olivier P, Chiba D, Lankes S, Min C, Ravindran B. A binary-compatible unikernel. In: Proceedings of the 15th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. 2019, 59–73

  5. Merkel D. Docker: lightweight Linux containers for consistent development and deployment. Linux Journal, 2014, 2014(239): 2

    Google Scholar 

  6. Martins J, Ahmed M, Raiciu C, Olteanu V, Honda M, Bifulco R, Huici F. Clickos and the art of network function virtualization. In: Proceedings of the 11th USENIX Conference on Networked Systems Design and Implementation. 2014, 459–473

  7. Cozzolino V, Ding A Y, Ott J. FADES: fine-grained edge offloading with unikernels. In: Proceedings of the Workshop on Hot Topics in Container Networking and Networked Systems. 2017, 36–41

  8. Manco F, Lupu C, Schmidt F, Mendes J, Kuenzer S, Sati S, Yasukata K, Raiciu C, Huici F. My VM is lighter (and safer) than your container. In: Proceedings of the 26th Symposium on Operating Systems Principles. 2017, 218–233

  9. Dragoni N, Giallorenzo S, Lafuente A L, Mazzara M, Montesi F, Mustafin R, Safina L. Microservices: yesterday, today, and tomorrow. In: Mazzara M, Meyer B, eds. Present and Ulterior Software Engineering. Cham: Springer, 2017, 195–216

    Chapter  Google Scholar 

  10. Duncan B, Happe A, Bratterud A. Enterprise IoT security and scalability: how unikernels can improve the status Quo. In: Proceedings of the 9th International Conference on Utility and Cloud Computing. 2016, 292–297

  11. Tan B, Liu H K, Rao J, Liao X F, Jin H, Zhang Y. Towards lightweight serverless computing via unikernel as a function. In: Proceedings of the 28th IEEE/ACM International Symposium on Quality of Service. 2020, 1–10

  12. Fingler H, Akshintala A, Rossbach C J. USETL: unikernels for serverless extract transform and load why should you settle for less? In: Proceedings of the 10th ACM SIGOPS Asia-Pacific Workshop on Systems. 2019, 23–30

  13. Zilberberg O, Weiss S, Toledo S. Phase-change memory: an architectural perspective. ACM Computing Surveys, 2013, 45(3): 29

    Article  Google Scholar 

  14. Yang J, Kim J, Hoseinzadeh M, Izraelevitz J, Swanson S. An empirical guide to the behavior and use of scalable persistent memory. In: Proceedings of the 18th USENIX Conference on File and Storage Technologies. 2020, 169–182

  15. Wu S, Zhou F, Gao X, Jin H, Ren J L. Dual-page checkpointing: An architectural approach to efficient data persistence for in-memory applications. ACM Transactions on Architecture and Code Optimization, 2018, 15(4): 57

    Article  Google Scholar 

  16. Chen T T, Liu H K, Liao X F, Jin H. Resource abstraction and data placement for distributed hybrid memory pool. Frontiers of Computer Science, 2021, 15(3): 153103

    Article  Google Scholar 

  17. Cai M, Huang H. A survey of operating system support for persistent memory. Frontiers of Computer Science, 2021, 15(4): 154207

    Article  Google Scholar 

  18. Wang X Y, Liu H K, Liao X F, Chen J, Jin H, Zhang Y, Zheng L, He B S, Jiang S. Supporting superpages and lightweight page migration in hybrid memory systems. ACM Transactions on Architecture and Code Optimization, 2019, 16(2): 11

    Article  Google Scholar 

  19. Barr T W, Cox A L, Rixner S. Translation caching: skip, don’t walk (the page table). ACM SIGARCH Computer Architecture News, 2010, 38(3): 48–59

    Article  Google Scholar 

  20. Basu A, Gandhi J, Chang J C, Hill M D, Swift M M. Efficient virtual memory for big memory servers. In: Proceedings of the 40th Annual International Symposium on Computer Architecture. 2013, 237–248

  21. Du Y, Zhou M, Childers B R, Mossé D, Melhem R. Supporting superpages in non-contiguous physical memory. In: Proceedings of the 21st IEEE International Symposium on High Performance Computer Architecture. 2015, 223–234

  22. Schmidt F. Uniprof: a unikernel stack profiler. In: Proceedings of the SIGCOMM Posters and Demos. 2017, 31–33

  23. Bratterud A, Walla A A, Haugerud H, Engelstad P E, Begnum K. Includeos: a minimal, resource efficient unikernel for cloud services. In: Proceedings of the 7th IEEE International Conference on Cloud Computing Technology and Science. 2015, 250–257

  24. Shen Z M, Sun Z, Sela G E, Bagdasaryan E, Delimitrou C, Van Renesse R, Weatherspoon H. X-containers: breaking down barriers to improve performance and isolation of cloud-native containers. In: Proceedings of the 24th International Conference on Architectural Support for Programming Languages and Operating Systems. 2019, 121–135

  25. Merrifield T, Taheri H R. Performance implications of extended page tables on virtualized x86 processors. In: Proceedings of the 12th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. 2016, 25–35

  26. Bhargava R, Serebrin B, Spadini F, Manne S. Accelerating two-dimensional page walks for virtualized systems. In: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems. 2008, 26–35

  27. Guo F, Kim S, Baskakov Y, Banerjee I. Proactively breaking large pages to improve memory overcommitment performance in VMware ESXi. In: Proceedings of the 11th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. 2015, 39–51

  28. Chodorow K. MongoDB: the Definitive Guide: Powerful and Scalable data Storage. 2nd ed. Sebastopol, California, USA, O’Reilly Media, Inc., 2013

    Google Scholar 

  29. Pham B, Veselý J, Loh G H, Bhattacharjee A. Large pages and lightweight memory management in virtualized environments: Can you have it both ways? In: Proceedings of the 48th International Symposium on Microarchitecture. 2015, 1–12

  30. Kwon Y, Yu H C, Peter S, Rossbach C J, Witchel E. Coordinated and efficient huge page management with ingens. In: Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation. 2016, 705–721

  31. Intel. ndctl. See Github.com/pmem/ndctl, 2020

  32. Intel. ipmctl. See Github.com/intel/ipmctl, Dec. 03, 2020

  33. Fitzpatrick B. Distributed caching with memcached. Linux Journal, 2004, 2004(124): 1–5

    Google Scholar 

  34. Aker B. Memslap—load testing and benchmarking a server. See Docs.libmemcached.org/bin/memslap, 2013

  35. Cooper B F, Silberstein A, Tam E, Ramakrishnan R, Sears R. Benchmarking cloud serving systems with YCSB. In: Proceedings of the 1st ACM Symposium on Cloud Computing. 2010, 143–154

  36. Kantee A. Rump file systems: Kernel code reborn. In: Proceedings of the USENIX Annual Technical Conference. 2009, 1–14

  37. Stengel K, Schmaus F, Kapitza R. EsseOS: haskell-based tailored services for the cloud. In: Proceedings of the 12th International Workshop on Adaptive and Reflective Middleware. 2013, 4: 1–6

    Google Scholar 

  38. Ballesteros F J. Structured I/O streams in Clive: a toolbox approach for wide area network computing. Journal of Internet Services and Applications, 2017, 8(1): 1–16

    Article  MathSciNet  Google Scholar 

  39. Yang D, Liu H K, Jin H, Zhang Y. HMvisor: dynamic hybrid memory management for virtual machines. Science China Information Sciences, 2021, 64(9): 1–16

    Article  Google Scholar 

  40. Kannan S, Gavrilovska A, Gupta V, Schwan K. HeteroOS: OS design for heterogeneous memory management in datacenter. In: Proceedings of the 44th Annual International Symposium on Computer Architecture. 2017, 521–534

  41. Hirofuchi T, Takano R. RAMinate: hypervisor-based virtualization for hybrid main memory systems. In: Proceedings of the 7th ACM Symposium on Cloud Computing. 2016, 112–125

  42. Gupta V, Lee M, Schwan K. HeteroVisor: Exploiting resource heterogeneity to enhance the elasticity of cloud platforms. In: Proceedings of the 11th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. 2015, 79–92

Download references

Acknowledgements

This work was supported by the National Natural Science Foundation of China (Grant Nos. 62072198, 61732010, 61825202, and 62032008).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Haikun Liu.

Additional information

Chong Tian received his BS degree and MS degree in computer science and technology from Huazhong University of Science and Technology (HUST), China in 2018 and 2021, respectively. His research interests include hybrid memory and virtualization technologies.

Haikun Liu is a professor in the School of Computer Science and Technology, Huazhong University of Science and Technology, China. He received his PhD degree in computer science and technology from HUST, China in 2012. His current research interests include in-memory computing, virtualization technologies, cloud computing, and distributed systems. He is a senior member of CCF and a member of the IEEE.

Xiaofei Liao is a professor in the School of Computer Science and Technology at Huazhong University of Science and Technology (HUST), China. He received his PhD degree in computer science and engineering from HUST, China in 2005. He was awarded Excellent Youth Award from the National Science Foundation of China in 2018 and CCF-IEEE CS Young Computer Scientist Award in 2017. His research interests are in the areas of computer architecture, system software, and big data processing. He is a member of IEEE and the IEEE Computer Society.

Hai Jin is a Chair Professor of computer science and engineering at Huazhong University of Science and Technology (HUST), China. Jin received his PhD in computer engineering from HUST, China in 1994. In 1996, he was awarded a German Academic Exchange Service fellowship to visit the Technical University of Chemnitz in Germany. He worked at The University of Hong Kong, China between 1998 and 2000, and as a visiting scholar at the University of Southern California, USA between 1999 and 2000. He was awarded Excellent Youth Award from the National Science Foundation of China in 2001. He is a Fellow of IEEE, a Fellow of CCF, and a life member of the ACM. He has co-authored more than 20 books and published over 900 research papers. His research interests include computer architecture, parallel and distributed computing, big data processing, data storage, and system security.

Electronic supplementary material

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Tian, C., Liu, H., Liao, X. et al. UCat: heterogeneous memory management for unikernels. Front. Comput. Sci. 17, 171204 (2023). https://doi.org/10.1007/s11704-022-1201-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11704-022-1201-y

Keywords

Navigation