Inter-Process Communication in a Virtualized Environment

Inter-Process Communication in a Virtualized Environment

Linköping University | Department of Computer and Information Science Bachelor thesis, 16 ECTS | Computer and Information Science 2018 | LIU-IDA/LITH-EX-G--18/044--SE Inter-Process Communication in a Virtualized Environment Inter Process Kommunikation inom en virtualiserad Miljö Filip Johansson Christoffer Lindstrom Supervisor : Erik Berglund Examiner : Anders Fröberg External supervisor : Krister Gindahl Linköpings universitet SE–581 83 Linköping +46 13 28 10 00 , www.liu.se Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under 25 år från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns lösningar av teknisk och admin- istrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sam- manhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/. Copyright The publishers will keep this document online on the Internet – or its possible replacement – for a period of 25 years starting from the date of publication barring exceptional circum- stances. The online availability of the document implies permanent permission for anyone to read, to download, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the con- sent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping Uni- versity Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its www home page: http://www.ep.liu.se/. c Filip Johansson Christoffer Lindstrom Thesis: Inter-Process Communication in a Virtualized Environment Filip Johansson Christoffer Lindstrom Linkoping University Linkoping University Linkoping, Sweden Linkoping, Sweden fi[email protected] [email protected] ABSTRACT components will suffer more of the load than others, which Selecting the correct inter-process communication method is will lead to certain components reaching their limit before an important aspect of ensuring effective inter-vm and inter- the remaining components. Currently, the solution is to add container process communication. We will conduct a study of a new node containing all the same components even though IPC methods which might be useful and fits the Qemu/KVM most of them are unnecessary at the time. virtual machine and Docker container environments, and se- To remedy this, Ericsson has decided to move certain compo- lect those that fit our criteria. After implementing our chosen nents to virtual environments and at the same time redesign methods we will benchmark them in a test suite to find the the components so they can be individually and dynamically ones with highest performance in terms of speed. Our results started or stopped, depending on the current load. While this show that, at the most common message sizes, Unix Domain will allow for easy scaling, it may also cause issues with the Sockets work best for containers and Transparent Inter Pro- communication between the components, mainly decreased cess Communication has the best performance between vir- data transfer rate and higher instability. tual machines out of the chosen methods. In order to maintain effective communication between the vir- INTRODUCTION tual components, we utilize a technique called Inter-Process A decade ago the most you did on your mobile-phone was to Communication. make calls and send text messages to your friends. Today, the 4G network is used for everything from making calls and tex- Purpose ting to streaming videos and playing multiplayer games. As The primary goal of this study is to provide a good choice a result, the amount of data a single user needs has increased of Inter-Process Communication for Ericsson, that can be uti- by a huge amount[1]. lized for effective inter-vm and inter-container communica- tion on a Linux host. Smart-phones, tablets and laptops all contribute to an in- creased pressure on the 4G network to handle all the data[1]. Research Approach As figure1 shows, video streaming is the largest consumer of The aim of this thesis is to evaluate different Inter-Process bandwidth by a large margin. All the while, more and more communication (hereafter called IPC) methods. Our research devices are developed with internet connectivity which places question is: a higher burden on a network that is not always designed for all of these devices. Which among our chosen IPC methods is the most effective, in regards to message rate and latency, when compared to Figure 1. Mobile traffic forecast from Ericsson Mobility Report 2017 TCP across: • Docker containers • Qemu/KVM virtual machines We will accomplish this by first conducting a study of what kind of IPC methods could be useful. Ericsson has provided a messaging framework called XCM with certain specifications that our methods must follow. The selected methods will be reduced down to the three best, where at least one method will be usable by a container and another by a virtual machine. We will then implement the methods in XCM and benchmark them in a test suite. Limitations Ericsson requested that we only look at IPC methods that Motivation suits Docker containers and virtual machines virtualized by A 4G node consists of a number of different components to Qemu/KVM. handle the connections. Depending on the traffic type some 1 THEORY Figure 2. Virtual Machine vs. Container Structure In this section we will present all the necessary information that you will need in order to understand the work we have done. Virtualization Virtualization technology has been around for a long time and it means to simulate a virtual environment with a certain hard- ware and software on your machine[2]. It could be that you want to use a specific application that does not run on your operating system and therefore you need a virtual machine or container to run it. Docker A popular method for isolating processes or setting up envi- ronments are containers, which is quite commonly used as an alternative to virtual machines. There are different versions of container tools but Dockers is the one that is most well known. whereas the Docker Engine is the process which builds and runs Docker images. Docker1 is a popular, open-source tool for automating the de- ployment of, mainly Linux, applications inside a container. There can be many advantages to using a virtual machine By utilizing namespaces, Docker is able to hide the rest of compared to running everything on a host machine, like bet- the operating system from the running application, effectively ter security and more efficient use of hardware resources[6]. isolating the container from the host and other containers. However, processes on different virtual machines that do not With the help of the control groups API provided by Docker exist on the same host will have a harder time communicating we can also limit the number of resources used by a con- with each other since they need to go over the network which tainer[3]. will incur overhead. Communication between processes on the same host on the other hand can also use the methods that Qemu/KVM induce overhead but it is inefficient[7]. This is why choos- To virtualize our environment we use Qemu2, a machine em- ing the correct inter-process communication method for your ulator and KVM3, a virtualization infrastructure. Qemu’s pri- system is important. mary usage is to run a different operating system on top of another operating system such as Linux on Windows or to Inter-Process Communication debug the system since it is easy to stop and inspect the vir- IPC is the collective name for methods which processes use tual machine as well as save and restore its state[4]. KVM to manage their shared data. Data is either communicated by itself does not provide a virtual machine but instead exposes using memory sharing, where processes have a shared mem- a KVM device node which can be used to create a virtual ory space they can utilize, or message passing. In message machine, allocate memory to it and run virtual CPUs[5]. passing there are two important concepts, blocking and non- Together they can be used to emulate virtual machines on a blocking message. A blocking message is where the process Linux operating system with a speed close to a physical ma- that sends the message will be blocked until it receives a re- chine which of course is the ideal. We want the separation and sponse and non-blocking is where the sender doesn’t need to efficient hardware utilization of a virtual machine but with the wait for a response to be able to continue to work[8]. same operating speeds as a normal host machine. The IPC methods4 vary greatly depending on the system re- Virtual Machines and Containers quirements. For example, Shared Memory cannot be used Like figure2 shows, while a virtual machine effectively to communicate between processes across two different hosts makes slices of the hardware to run a new operating system but is usually considered the fastest for local communication.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us