Virtual Memory Management Using Memory Ballooning
Virtual Memory Management Using Memory Ballooning
Abstract—Management of memory in an efficient manner is industry to single user can access these services as per their
one of the very important topics these days in Cloud need.
environment. Optimized memory management techniques
play the important role to handle the large amount data and Virtualization is a foundation technology platform
processes in cloud environment. The smart memory fostering cloud computing. Virtualization is the other term to
management techniques should be integrated in cloud cloud computing. The abstraction of compute resources are
computing to do to memory optimization. The load balancing like memory, CPU, network, database is provided through
issues and the problem of latency can be resolved with the virtualization. Virtualization is a most important part of cloud
memory optimization. The efficiency of data optimization in computing which helps any organization to optimize
cloud depends upon the resource allocation based on user infrastructure and ultimately cost. It provides the ease to
demand. This is the key factor of resource optimization. As access of physical resources by hiding their physical
the allocation of resources are done as per the user demand characteristics to other system or end users. The virtualizations
then in most of the case resources are underutilized and are of different types called server virtualization also called as
remain idle. It causes the unused resources across the cloud hardware virtualization and other virtualizations are network
platform. To get rid on this problem there is need to have virtualization, desktop and storage [9].
continues resource monitoring and check system which will VIRTUAL MEMORY MANAGEMENT & NEED
monitor the idle resources across the cloud. The various
virtual memory optimization techniques are available. The Virtual memory is an integral part of modern computer
cloud hypervisors uses the different memory optimization architecture. In all general purpose operating system virtual
techniques which follows different principal. To handle memory plays the important role to manage process data. All
memory optimization. The Ballooning is one of the important the hardware resources support the virtual memory
memory management technique in which memory of ideal management in modern operating system. Address translation
virtual machine is used for the virtual machines which needs between virtual address space and physical address is done by
more memory to run the application. operating system and it supported by virtual memory by
creating uniform virtual address space for application
Keywords—Virtual Memory, Memory Ballooning, Virtual programs. The virtual memory management is inbuilt feature
machine of operating system. It uses various methods to manage virtual
memory. Main memory is very small in size so to compensate
I. INTRODUCTION shortage of main memory can be done with the help of
secondary storage. The data can be transferred temporally on
The term cloud can be called as large pool of resources. high speed disk area. Virtual address space which is temporary
The cloud computing is the technique through which all those storage space is increased using active memory in RAM and
virtualized resources are easily accessible to cloud users. The inactive memory in computer hard disk drives to form
resources can be hardware, software, development platforms contiguous addresses that hold both the application and its
or services. These resources are scalable and on demand data.
available to end user [1]. The scalability and flexibility are the
important features of cloud. The total cost of infrastructure can Management of memory in an efficient manner is one of
be reduced due to these features of cloud. This area becomes the very important topics these days in Cloud environment.
the top most research area and researchers are working on Optimized memory management techniques play the
cloud security, cloud load balancing and memory important role to handle the large amount data and processes
management. Cloud has capability to provision resources in cloud environment. The smart memory management
dynamically amongst end users. So that resources can be techniques should be integrated in cloud computing to do to
scaled as per the demand of cloud users. The cloud computing memory optimization. The load balancing issues and the
provides various services like infrastructure as service, problem of latency can be resolved with the memory
platform as service and software as service. Right from big optimization. The efficiency of data optimization in cloud
depends upon the resource allocation based on user demand.
This is the key factor of resource optimization [7]. As the hypervisor works on overcommitment techniques i-e
allocation of resources are done as per the user demand then in providing more virtual memory than are available on physical
most of the case resources are underutilized and remain idle. It machines. Transparent page sharing is one of the best memory
causes the huge drainage of resources across the cloud optimization techniques which collapse different memory
platform. To get rid on this problem there is need have pages, with same contents into single page and freeing the
continues resource monitoring and check system which will other similar pages. It ultimately saves the resources and
monitor the idle resources across the cloud. The best example minimizes the overall cost of task of data centers [18].
in this domain is the Amazon’s Elastic Compute Cloud (EC2)
which is one of the befitting examples of the practical This paper introduces several novel ESX Server
implementations of the Cloud [8]. Cloud environment is mechanisms and policies for managing memory. There are
dynamic and volatile in nature so static memory allocation various memory management techniques available like
techniques are not always useful. The memory Ballooning, Demand Paging, Transparent page sharing,
overcommitment is given by cloud hypervisor to launch more content based page sharing etc. The ballooning technique is
virtual machines. The hypervisor ESX is the one of the one of the useful techniques in dynamic memory management.
example of hypervisor which commits more memory than Virtual machine has provided with some memory at the
starting. Sometime it needs more memory to compete the task.
available. Therefore there is strong need of dynamic memory
allocation techniques in cloud based environment. It can demand the more memory from other guest virtual
machine. There is a hypervisor role to provide the extra
The various virtual memory management techniques are memory from guest machine. There is advancement in the
studied in this research work. The methodology used by the technique that guest virtual machine can reclaims memory
techniques is different. Virtual swap management mechanism from a VM. The ballooning is the idle memory management
is useful and effective memory management architecture. technique to solve the problem of memory requirement.
Virtual swap management mechanism (VSMM) provides the
most appropriate solution for the dynamic environment where Some research papers also address another technique
there is not static pre-allocation of the memory [9].ESX by called transparent page sharing which minimizes the duplicate
VMware memory management techniques, the virtual pages in memory. The page can be shared by virtual machines
machines are allowed to use more memory than the memory if they are in need of similar pages on the host machine. The
available on its physical machines. The ESX performs the Copy on Write is marked on the page if any updating is done
transfer’s memory from idle virtual machine to virtual in it. It also reduces the I/O copying overheads which is the
machines that need more memory [10].The transparent page burden on large memory system. A higher-level dynamic
Sharing allows sharing similar pages instead of keeping reallocation policy coordinates these diverse techniques to
separate copy of similar pages. With the page sharing efficiently support virtual machine workloads that overcommit
technique the hypervisor available we can reclaim the memory [19,20].
redundant copies and only keep one copy at the same time. The Live migration of virtual machines is important
This page can be shared by multiple virtual machines in the concept implemented for cloud load balancing. The migration
host physical memory [11]. The Database Optimization of VM is done across distinct physical hosts provides a
technique manages huge amount of data so as to get useful significant new benefit for administrators of data centers and
information for the users. This is the new research area of clusters. Those approaches employed memory pre-copy
cloud computing environment [13]. The Ballooning is one of algorithm to synchronize the migrating VM states, which
the important memory management technique in which make VM live migration cost much network traffic and
memory of ideal virtual machine is used for the virtual application downtime, especially for memory-intensive
machines which needs more memory to run the application workloads. This paper describes the design and
[14]. implementation of a novel approach CR/TR-Motion that
adopts check pointing/recovery and trace/replay technology to
provide fast, transparent VM migration. With execution trace
II. RELATED WORK logged on the source host, a synchronization algorithm is
performed to orchestrate the running source and target VM
This paper reviewed the various virtual memory access until they get a consistent state [21, 22]. Many work is done
techniques like Smart paging, Ballooning and Hypervisor on virtual machine migration, load balancing in cloud
swapping for virtual machines in cloud environments[15,16]. environment. The various virtual memory streaming
Smart paging cannot reclaim memory from host or other techniques are also implemented. This paper mainly focus on
virtual machine. It reduces the performance of VM. In memory ballooning technique using OpenStack open source
ballooning memory is reclaimed from other virtual machine cloud environment. The idle virtual machines are recognized
and provided to other guest VM. Hypervisor swapping and unused memory is utilized for poweron virtual machines.
technique provides the physical memory to VM from swap
space [17].Virtualization brought multiple virtual machines
together on one physical machine. Higher number of virtual
III. MEMORY BALLOONING
machines on single physical machine leads to more resources
and memory optimization. This research work implemented A typical cloud infrastructure consists of various virtual
on VMwareR ESXR server hypervisor which provides machine instances running in their own memory space. Every
consolidation of virtual machines on physical machine. This virtual machine is provided with certain amount of memory at
the time of launching the instance. While running the VM Step 3 :- If Required memory of power on VM >
instance along with their applications, a situation may arise Allocated memory Then:
when the VM memory gets exhausted and need more memory
to execute the running processes. In such situation the memory Step 4 :-Get memory from idle VM if Allocated
ballooning comes a handy way to allocate a temporary memory of idle machine > 1GB
memory from the idle virtual machine or power off machines. Step 5 :- Memory balloon inflated to power on VM
The taking off memory from the idle machine is known as
deflating balloon and VM that receives memory is known Step 6 : -Task completed by power on VM
inflating the balloon. After the demanding VM's processes are Step 7 :- If Required memory of power on VM <
completed the temporary memory provided to the VM is allocated memory Then:
released and given back to provider VM. This process of
memory inflating and deflating gives a better performance and Step 8 :- Balloon deflated and memory returned to
efficiency in the streaming memory management is the cloud provider VM
environment. The system architecture for memory ballooning Step 9 :- Exit.
is shown in fig.1.
Virtual Machine VM1 is in poweron state needs
memory , If available memory is not sufficient then
RAM pressure increases
Virtual Machine VM2 is in idle state and can provide
the underutilized memory.
The Balloon driver on VM2 inflates and this memory
is now available to the VM1
The memory will be available to VM1 to run
processes
Once allocated memory greater than required
memory VM1 returns memory to provider VM1
receiver VM. The receiver VM continues to complete its Fig. 3. Experimental result of Virtual Machines without Memory Ballooning
remaining tasks and at the end it releases its temporary Ubuntu image is kept in poweron state and remaining two in
memory which is added back to the provider VM's memory. shutdown state. If required memory by poweron VM is less
This entire process of inflating and deflating memory between than allocated memory then no need of ballooning but if
the receiver VM and the provider VM is visually shown on the required memory is greater than allocated memory then
screen using a dashboard table. ballooning starts. Two VM in shutdown state provides the
The memory ballooning is implemented using a memory to poweron VM. The Fig. 3 & fig. 4 shows the status
simulation where a random number is generated from lower of three VM before and after memory ballooning .
limit 5 to upper limit 7. The receiver virtual machine named VM Allocated VM State Current Memory
Ubuntu having 4 GB of allocated is put in a running stage.
Using a timer thread of 3 seconds, a random number between Name Memory Size Status
5 to 7 is generated and if the receiver virtual machine needs Cirros 3 GB Shutdown 1 GB
more memory than its allocated memory of 4 GB, the provider
virtual machines named Cirros and my-image provide their Ubuntu 4 GB Poweron 6 GB
memory to the provider VM. If the required memory by a My-image 2 GB Shutdown 2 GB
provider is 1 GB or 2 GB, the memory of Cirros, having 3 GB
of allocated memory deflates its memory to the Ubuntu VM.
Similarly, if the memory required by the receiver VM is 3 then
the Cirros VM deflates 2 GB of its memory and my-image
VM deflates 1 GB memory, thereby combining 3 GB memory
is inflated in the provider VM. While deflating the memories
of the provider VM a care has been taken that at least 1 GB
memory remains in the provider VMs. The process of inflating
and deflating is repeating continuously and the data generated
from the process is stored in the database table called logger
table. This table is then used for predicting the memory
requirements by the provider VM in the future using data
mining techniques.
the help of memory ballooning technique. In this paper we IaaS Clouds”, IEEE Transactions on Cloud Computing Vol. pp. ,
used OpenStack cloud platform to launch virtual machines. Issue: 99 25 September 2015.
Poweron machines and shutdown machines are identified. [14 Zhiqiang Ma , Zhonghua Sheng , Lin Gu , “DVM: A Big Virtual
When memory pressure of poweron machines increases it Machine for Cloud Computing” , IEEE Transactions on Computers
Vol.63 , Issue: 9 ,pp. :2245 – 2258 ,2015.
demands for more memory. In this situation memory is
provided from shutdown or idle virtual machine through [15] Pranjali P. Deshmukh , S. Y. Amdani , “Survey of memory
ballooning technique. When the allocated memory of poweron streaming techniques for virtual machine in cloud environment”,
published at International Conference on Energy, Communication,
machine is less than required memory , memory acquired by Data Analytics and Soft Computing (ICECDS)
memory ballooning is returned back to provider VM. DOI: 10.1109/ICECDS.2017. 3896311 - IEEE 2, 2017.
REFERENCES [16] Pranjali P. Deshmukh ,S. Y. Amdani, “Virtual Memory
Optimization in Cloud Computing”, International Conference on
[1] Li, X., Chen, R., Zhang, B., & Li, C. , “A Dynamic Memory Research in Intelligent and Computing Engineering (RICE), DOI:
Allocation approach Based on Balloon Technology on 10.1109/RICE. 2018.8509067 , IEEE 2018.
Virtualization Platform“, Journal of Physics: Conference Series,
1169, 2019. [17] Hui Zhao Qinghua Zheng , Weizhan Zhang ,Yuxuan Chen
[2] Allison Randal , “The Ideal Versus the Real: Revisiting the History “Virtual machine placement based on the VM performance models
of Virtual Machines and Containers “, arXiv:1904.12226v1 [cs.NI] in cloud” , IEEE 34th International Performance Computing and
27 Apr 2019 . Communications Conference ( IPCCC) , pp. 14-16,2015.
[3] Antony Xavier Bronson, S.P. Rajagopalan ,V. Sai Shanmuga [18] Trieu C. Chieu, Ajay Mohindra, Alexei A. Karve , Alla Segal,
Raja, “ A Dynamic Memory Allocation Strategy for Virtual “Dynamic Scaling of Web Applications in a Virtualized Cloud
Machines in Cloud Platform”, International Journal of Pure and Computing Environment”, IEEE International Conference on e-
Applied Mathematics Vol: 119, No. 15 , pp. 1423-1440 2018. Business Engineering 2009.
[4] Mishra, D., & Kulkarni, P.,” A survey of memory management [19] A B M Moniruzzaman, Kawser Wazed Nafi, Syed Akther Hossain,
techniques in virtualized systems”, Computer Science Review, “Virtual Memory Streaming Technique for Virtual Machines
2018 ,els 29, 5673. doi:10.1016/j.cosrev.2018.06.002 journal (VMs) for Rapid Scaling and High Performance in Cloud
homepage: www.elsevier.com /loc ate/cosrev. Environment” ,3rd International Conference on informatics ,
Electronics & Vision IEEE 2014.
[5] Xu, M., Tian, W., & Buyya, R. , “ A survey on load balancing
algorithms for virtual machines placement in cloud computing ” , [20] Franco Travostinoa, Paul Daspitb, Leon Gommansc, Chetan Joga,
Concurrency and Computation: Practice and Experience, 29(12), Cees de Laatc, Joe Mambrettid, Inder Mongaa, Bas van
e4123 2017. Oudenaardec, Satish Raghunatha , Phil Yonghui Wange ,
"Seamless live migration of virtual machines over the
[6] P.V.S.S. Gangadhar, Dr. M. Venkateswara Rao, Dr. Ashok MAN/WAN." , Future Generation Computer Systems 22.8
Kumar Hota, Dr. V. Venkateswara Rao, “ Distributed Memory Elsevier 901–907, 2006.
and CPU Management in Cloud Computing Environment ” ,
International Journal of Applied Engineering Research ISSN 0973- [21] A. B. M. Moniruzzaman , “Analysis of Memory Ballooning
4562 Vol. 12, No. 24 , pp. 15972-15978 ,2017. Technique for Dynamic Memory Management of Virtual
Machines (VMs)”, International Journal of Grid Distribution
[7] Sareh Fotuhi Piraghaj, Rodrigo N. Calheiros, Jeffrey Chan, Amir Computing Vol.7, No.6 , pp. 81-90, 2004.
Vahid Dastjerdi and Rajkumar Buyya, “Virtual Machine
Customization and Task Mapping Architecture for Efficient [22] Pranjali P. Deshmukh , S.Y. Amdani ,“Virtual Memory
Allocation of Cloud Data Center Resources” ,Computer and Management of Openstack Cloud using APIs” ,IEEE 5th
Communications Networks and Systems The Computer Journal, International Conference for Convergence in Technology (Scopus
Vol. 59 Issue 2, 2016. Index) IEEE Bombay Section at Pune, India,2019
[8] Amelie Chi Zhou, Bingsheng He, and Cheng Liu. “Monetary Cost
Optimizations for Hosting Workflow-as-a-Service in IaaS Clouds”,
IEEE Transactions on cloud computing, Vol. 4, No. 1, January-
March 2016.
[9] Uttam Mandal , Pulak Chowdhury ,Massimo Tornatore , Charles
U. Martel , “Bandwidth Provisioning for Virtual Machine
Migration in Cloud: Strategy and Application” , IEEE Transaction
on cloud computing , Vol: pp. 1, Issue: 99 ,2016.
[10] Debasree Basu, Indusai G, J.Vijayashree, J.Jayashree ,Ronnie D.
Caytiles and N.Ch.S.N Iyengar , “Analysis and Issues in Cloud
Operating System” , International Journal of Grid and Distributed
Computing Vol. 9, No. 11 , pp.179-186, 2016.
[11] Daniel Grzonka, “The Analysis of OpenStack Cloud Computing
Platform: Features and Performance”, in Journal of
Telecommunications and Information Technology ,Vol. 3, pp.52-
57, 2015 .
[12] Jian Guo Fangming Liu , John C. S. Lui , Hai Jin , “Fair Network
Bandwidth Allocation in IaaS Datacenters via a Cooperative Game
Approach” IEEE/ACM Transactions on Networking Vol. 24,
Issue: 2 ,2015.
[13] Lei Wei Chuan Heng Foh , Bingsheng He , Jianfei Cai , “Towards
Efficient Resource Allocation for Heterogeneous Workloads in