SlideShare a Scribd company logo
ARCHITECTING TENANT BASED
QOS IN MULTI-TENANT CLOUD
PLATFORMS
- Arun prasath S
2
3
Table of Contents
Introduction 4
Problem statement 4
Solution overview 5
Goals 5
Typical implementation in production environment 6
Linux Containers 8
Components of LXC 8
Control group (cgroup) 9
Subsystems 10
blkio Subsystem 10
CPU Subsystem 10
Memory Subsystem 10
Python Controller 11
Puppet 12
Docker 13
Other options 13
Summary 14
References 14
4
Introduction
Achieving QOS in a multi-tenant cloud platforms is still a difficult task and many
companies follow different approaches to solve this problem. Here in this document I tried
architecting a simple solution for achieving different QOS for different tenants in a Multi-tenant
cloud environment based on my experiments.
Problem statement
Openstack steps into platform as service by introducing a new component ‘Trove’
Database as Service (DBaaS) offering in its upcoming Icehouse release. But Openstack announced
that Trove will be operating as Single tenant service (Which means, for each Database instance,
a new VM will be created). This is a costly affair for cloud service providers and also resources
may not be used efficiently in this scenario.
Many big cloud service providers like Google and Amazon provides options for the same
DBaaS as a multi-tenant service. In this case, many instances of the DB will run in a single virtual
machine. This reduces the cost of running extra virtual machines.
But it also have few problems like QOS, security and isolation. The QOS factors are CPU,
Memory, IOPS (Input/Output Operations per second) etc.
More than one DB instance will be running in a single machine. In worst case scenarios
one DB Instance may end up eating large amount of resources which greatly affects other DB
Instances. We need to guarantee the QOS as mentioned in the SLA.
Since more than one DB Instance will be running in a single machine, we have some
security considerations. When one customer’s database gets affected it must not affect other
instances.
Also consumers in Single tenant are charged based on their usages like number of IO, total
space, CPU, memory etc. But when it comes to multi-tenant it’s hard to estimate the usage as
more than one DB instance will be running in a single virtual machine.
In another perspective, the existing solution of creating each VM for each customer has a
drawback of running separate operating system for each customer. This separate operating
system is an extra load for the service provider as it need a lot of data space and memory.
5
Solution overview
In my proposed solution, I used Linux containers running inside a virtual machines for
isolation DB Instances. Each database instance will be running inside a Container. Therefore we
can achieve true isolation, resources can be controlled and metering is also quite easy. With
cgroup feature we can control the IOPS of the container and thereby we can offer different
service level (IOPS) for different tenants.
Existing offering (In Openstack Trove) Proposed solution
Goals
 Tenant based QOS
 Multi tenancy
 True resource isolation for DB Instances
 Perfect metering
 Automation
6
Typical implementation in production environment
This is a typical implementation in the production environment. The user requests for a
database instance using the dashboard. Once when the request is initiated, the Python controller
gets the resources specified for a particular flavor in Nova and then consolidates the existing
containers.
If there is space available in the any virtual machines, the container is created there. Or
else a new nova virtual machine is created and then the container is created in that virtual
machine with the user specified parameters (CPU, RAM and IOPS).
7
Each time a virtual machine is created, it is discovered by puppet and the container
software (LXC or Docker) is installed. Each time a container is created, MySQL is installed.
After the creation and provisioning of the containers the users are provided the access to
the database. (IP Address, MySQL username and password).
The above is a modular approach in provisioning server. However for smaller companies
the architecture can be simplified by using pre-built vagrant or golden images.
The following is the brief of all the components mentioned above.
8
Linux Containers
Linux containers provide light weight operating system level virtualization which isolates
processes and resources in a simpler way compared to full-scale virtual machines. LXC works in
the way similar to virtualization but with the difference that it don’t need separate kernel
instance. It allows us to create many number of sand box environment which is completely
isolated from the host and other containers.
Components of LXC
 Namespaces – Used to provide process isolation
 cgroups – Used to control System management and resource control
 SELinux – Ensures isolation between host and the container and also Individual containers
 Libvirt- Tool box to manage containers
Since QOS is our primary objective, we are going to focus more on control groups.
9
Control group (cgroup)
Control group is a kernel feature to limit the resources like CPU, System memory and
network bandwidth among the user-defined groups of tasks.
For example, we can limit a MySQL instance from using all memory. In the same way we
can guarantee that the MySQL instance gets the specified resource.
In this architecture, I am using cgroup feature on Linux containers to isolate DB Instances
and guarantee the minimum QOS for the customer.
Limits for a particular container is defined in the containers configuration file. Hence we
can allocate different resources for different containers based on customer requirements.
In our scenario the containers will be running as process and the processes inside the
containers will be running as the sub process.
10
Subsystems
Subsystems are kernel modules that are aware of cgroups. They are resource controllers
that allocate varying level of system resources to different cgroups. The following are the
subsystems of cgroup.
blkio Subsystem
The Block I/O subsystem controls and monitors access to I/O on block devices by tasks in
cgroups. It offers features like proportional weight division and I/O throttling (Upper limit).
Common parameters:
blkio.throttle.read_iops_device - specifies the upper limit on the number of read operations a
device can perform
blkio.throttle.read_bps_device - specifies the upper limit on the number of read operations a
device can perform
blkio.throttle.write_bps_device - specifies the upper limit on the number of write operations a
device can perform
CPU Subsystem
The cpu subsystem schedules CPU access to cgroups.
Common parameters:
cpu.shares - contains an integer value that specifies a relative share of CPU time available to the
tasks in a cgroup
cpu.rt_period_us - specifies a period of time in microseconds (µs, represented here as "us") for
how regularly a cgroup's access to CPU resource should be reallocated
Memory Subsystem
The memory subsystem generates automatic reports on memory resources used by the tasks in
a cgroup, and sets limits on memory use by those tasks
Common parameters:
memory.usage_in_bytes - reports the total current memory usage by processes in the cgroup (in
bytes)
memory.max_usage_in_bytes - reports the maximum memory used by processes in the cgroup
(in bytes)
memory.limit_in_bytes - sets the maximum amount of user memory
There are also various other subsystems like cpuacct, cpuset, devices, freezer etc. Those can be
used in our scenario for enhanced configurations.
11
Python Controller
In a fresh Openstack environment when a user requests an instance, a new VM is created.
But in our case we need to provision containers. Hence we need to modify the normal Openstack
work flow.
One popular way to do this is via REST based API. Since I am a python guy, I am doing this
via Python APIs provided by Openstack.
All details of the containers created by the users is saved in the local MySQL database. In
this scenario, the user is shown a dashboard or a form for database provisioning. When the user
requests the instance, this python controller takes control. It gets the flavor details we used to
build nova VM by enquiring Openstack. Then it consolidates the containers provisioned by using
the local database. If it could not find any space, then a new nova VM is created using API calls
and then the process continues. If existing VM has necessary resource to provision a container,
then the container is created in that existing VM.
The following is a sample python code for creating an Instance.
Initially we can set the resource level options for any particular flavor.
nova-manage flavor set_key --name m1.small --key quota:disk_read_bytes_sec
--value 10240000
nova-manage flavor set_key --name m1.small --key quota:disk_write_bytes_sec
--value 10240000
12
Puppet
Openstack can provide any number of machines based on demand. But to get all those
machines into production (Installing required softwares like LXC or Docker in our scenario), we
need some automation. There are various automation tools for change and configuration
management. In this scenario I used puppet.
Puppet can manage our servers. In a puppet environment, we describe the necessary
machine state in a declarative code. Puppet clients connects to the server and ensures that they
are in the state described by the manifest file in server.
In our scenario we will be defining manifests for installing LXC or Docker. Once after the
necessary container is installed we bring the container under control of puppet for software
(MySQL) installation.
Puppet manifest for MySQL is available in Github.
13
Docker
Docker is an open source developer-friendly abstraction layer on the top of Linux
containers (LXC). Docker gives a simple and meaningful layer to play with containers in a cloud
environment. By using Docker we can actually build containers, use it and make changes based
on our need, push our used containers to the Docker repository and pull any time and any
number of time for further usage. This means a lot in a PAAS market.
In a high level terminology, Docker can automate the deployment of applications as highly
portable, self-sufficient containers which are independent of hardware, language, framework,
packaging system and hosting provider.
Docker also provides drivers for Openstack which embeds with Nova and provides ability
to work with containers along with nova virtual machines. Since most Openstack production
environment need to instantiate various different operating systems, we can have a work around
and achieve our need. In this scenario we are going to run a Docker or LXC on the top of a virtual
machine.
Docker, along with puppet or chef can be very useful for the Platform as a Service
providers. They are very useful in automated provisioning of platforms required for developers,
in a very convenient and sophisticated way. Thus making operations team work much easier.
Other options
The above method is one way of creating multi-tenant cloud environment. But there are
many number of ways to achieve it using various other options.
Rackspace uses OpenVZ to build their cloud platforms. They uses OpenVZ to contain
their customers database and for resource isolation. OpenVZ has many advantages over LXC.
Resource allocation is made simple in OpenVZ. (i.e. Guaranteed RAM and Burstable RAM are
specified using simple commands ). Live migrations are quite easy in OpenVZ when compared
to LXC.
Oracle follows an interesting architecture in its DBaaS offering. They created a
customized ‘Container Database’. All the customer databases are in Pluggable database (PDB)
format and they can be plugged to the container database and can work on.
14
Summary
Thus the tenant based QOS feature is achieved in a multi-tenant cloud platform. I haven’t
mentioned about some other features and drawbacks like migration, scale up, high availability
etc. All those drawbacks can be rectified by having some workaround in the architecture.
References
1) Linux Plumbers Conference 2013, Rackspace session
2) http://www.kernel.org/doc/Documentation/cgroups
3) http://docs.openstack.org/developer/trove/
4) https://help.ubuntu.com/lts/serverguide/lxc.html
5) http://wwwkemper.informatik.tu-uenchen.de/research/publications/conferences/sigmod2008-
mtd.pdf
6) http://blog.docker.io/2013/10/gathering-lxc-docker-containers-metrics/
7) http://www.vldb.org/pvldb/vol7/p37-das.pdf

More Related Content

What's hot

CloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫るCloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫る
samemoon
 
Tutorial ceph-2
Tutorial ceph-2Tutorial ceph-2
Tutorial ceph-2
Tommy Lee
 
Docker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme Petazzoni
Docker, Inc.
 
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating SystemOSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
NETWAYS
 
LXF #102 - Linux Virtual Server
LXF #102 - Linux Virtual Server LXF #102 - Linux Virtual Server
LXF #102 - Linux Virtual Server guest69bec2
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Eueung Mulyana
 
OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra Summit
Don Marti
 
Changelog e athena
Changelog e athenaChangelog e athena
Changelog e athenasrwawa12
 
Unix Automation using centralized configuration management tool
Unix Automation using centralized configuration management toolUnix Automation using centralized configuration management tool
Unix Automation using centralized configuration management toolTorrid Networks Private Limited
 
On MongoDB backup
On MongoDB backupOn MongoDB backup
On MongoDB backup
William Yeh
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Richard Lister
 
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Jérôme Petazzoni
 
Kubernetes #2 monitoring
Kubernetes #2   monitoring Kubernetes #2   monitoring
Kubernetes #2 monitoring
Terry Cho
 
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
NETWAYS
 
Zookeeper In Simple Words
Zookeeper In Simple WordsZookeeper In Simple Words
Zookeeper In Simple Words
Fuqiang Wang
 

What's hot (19)

CloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫るCloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫る
 
Tutorial ceph-2
Tutorial ceph-2Tutorial ceph-2
Tutorial ceph-2
 
chubby_osdi06
chubby_osdi06chubby_osdi06
chubby_osdi06
 
Docker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme Petazzoni
 
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating SystemOSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
OSDC 2015: Bernd Mathiske | Why the Datacenter Needs an Operating System
 
LXF #102 - Linux Virtual Server
LXF #102 - Linux Virtual Server LXF #102 - Linux Virtual Server
LXF #102 - Linux Virtual Server
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra Summit
 
Changelog e athena
Changelog e athenaChangelog e athena
Changelog e athena
 
Project Final Report
Project Final ReportProject Final Report
Project Final Report
 
Unix Automation using centralized configuration management tool
Unix Automation using centralized configuration management toolUnix Automation using centralized configuration management tool
Unix Automation using centralized configuration management tool
 
On MongoDB backup
On MongoDB backupOn MongoDB backup
On MongoDB backup
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
 
Kubernetes #2 monitoring
Kubernetes #2   monitoring Kubernetes #2   monitoring
Kubernetes #2 monitoring
 
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
 
Zookeeper In Simple Words
Zookeeper In Simple WordsZookeeper In Simple Words
Zookeeper In Simple Words
 

Similar to ARCHITECTING TENANT BASED QOS IN MULTI-TENANT CLOUD PLATFORMS

Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
ssuser9b44c7
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
Joonathan Mägi
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Paris Apostolopoulos
 
prodops.io k8s presentation
prodops.io k8s presentationprodops.io k8s presentation
prodops.io k8s presentation
Prodops.io
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
Ajeet Singh
 
A Survey of Performance Comparison between Virtual Machines and Containers
A Survey of Performance Comparison between Virtual Machines and ContainersA Survey of Performance Comparison between Virtual Machines and Containers
A Survey of Performance Comparison between Virtual Machines and Containers
prashant desai
 
Kubernetes: My BFF
Kubernetes: My BFFKubernetes: My BFF
Kubernetes: My BFF
Jonathan Yu, P.Eng.
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
Amazon Web Services
 
Openstack_administration
Openstack_administrationOpenstack_administration
Openstack_administrationAshish Sharma
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
DaniloQueirozMota
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
Ted Jung
 
Kubernetes
KubernetesKubernetes
Kubernetes
Lhouceine OUHAMZA
 
Unleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platformUnleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platform
Lakmal Warusawithana
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
Gokhan Boranalp
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
Vaibhav Sharma
 
Gdg izmir kubernetes
Gdg izmir kubernetesGdg izmir kubernetes
Gdg izmir kubernetes
Gokhan Boranalp
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Miloš Zubal
 
What is POD and Kubernetes details Like as
What is POD and Kubernetes details Like asWhat is POD and Kubernetes details Like as
What is POD and Kubernetes details Like as
MdTarequlIslam17
 
Survey of open source cloud architectures
Survey of open source cloud architecturesSurvey of open source cloud architectures
Survey of open source cloud architecturesabhinav vedanbhatla
 
Effective VM Scheduling Strategy for Heterogeneous Cloud Environment
Effective VM Scheduling Strategy for Heterogeneous Cloud EnvironmentEffective VM Scheduling Strategy for Heterogeneous Cloud Environment
Effective VM Scheduling Strategy for Heterogeneous Cloud Environment
International Journal of Science and Research (IJSR)
 

Similar to ARCHITECTING TENANT BASED QOS IN MULTI-TENANT CLOUD PLATFORMS (20)

Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
prodops.io k8s presentation
prodops.io k8s presentationprodops.io k8s presentation
prodops.io k8s presentation
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
A Survey of Performance Comparison between Virtual Machines and Containers
A Survey of Performance Comparison between Virtual Machines and ContainersA Survey of Performance Comparison between Virtual Machines and Containers
A Survey of Performance Comparison between Virtual Machines and Containers
 
Kubernetes: My BFF
Kubernetes: My BFFKubernetes: My BFF
Kubernetes: My BFF
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
Openstack_administration
Openstack_administrationOpenstack_administration
Openstack_administration
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Unleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platformUnleashing k8 s to reduce complexities of an entire middleware platform
Unleashing k8 s to reduce complexities of an entire middleware platform
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
Gdg izmir kubernetes
Gdg izmir kubernetesGdg izmir kubernetes
Gdg izmir kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
What is POD and Kubernetes details Like as
What is POD and Kubernetes details Like asWhat is POD and Kubernetes details Like as
What is POD and Kubernetes details Like as
 
Survey of open source cloud architectures
Survey of open source cloud architecturesSurvey of open source cloud architectures
Survey of open source cloud architectures
 
Effective VM Scheduling Strategy for Heterogeneous Cloud Environment
Effective VM Scheduling Strategy for Heterogeneous Cloud EnvironmentEffective VM Scheduling Strategy for Heterogeneous Cloud Environment
Effective VM Scheduling Strategy for Heterogeneous Cloud Environment
 

More from Arun prasath

Managing Microservices traffic using Istio
Managing Microservices traffic using IstioManaging Microservices traffic using Istio
Managing Microservices traffic using Istio
Arun prasath
 
Istio
Istio Istio
Istio
Arun prasath
 
Elk with Openstack
Elk with OpenstackElk with Openstack
Elk with Openstack
Arun prasath
 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack Heat
Arun prasath
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
Arun prasath
 
HP CloudSystem Matrix
HP CloudSystem MatrixHP CloudSystem Matrix
HP CloudSystem Matrix
Arun prasath
 
Highly confidential security system - sole survivors - SRS
Highly confidential security system  - sole survivors - SRSHighly confidential security system  - sole survivors - SRS
Highly confidential security system - sole survivors - SRS
Arun prasath
 
Toll application - .NET and Android - SRS
Toll application - .NET and Android - SRSToll application - .NET and Android - SRS
Toll application - .NET and Android - SRS
Arun prasath
 
Toll app - Android project
Toll app - Android projectToll app - Android project
Toll app - Android project
Arun prasath
 

More from Arun prasath (9)

Managing Microservices traffic using Istio
Managing Microservices traffic using IstioManaging Microservices traffic using Istio
Managing Microservices traffic using Istio
 
Istio
Istio Istio
Istio
 
Elk with Openstack
Elk with OpenstackElk with Openstack
Elk with Openstack
 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack Heat
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
HP CloudSystem Matrix
HP CloudSystem MatrixHP CloudSystem Matrix
HP CloudSystem Matrix
 
Highly confidential security system - sole survivors - SRS
Highly confidential security system  - sole survivors - SRSHighly confidential security system  - sole survivors - SRS
Highly confidential security system - sole survivors - SRS
 
Toll application - .NET and Android - SRS
Toll application - .NET and Android - SRSToll application - .NET and Android - SRS
Toll application - .NET and Android - SRS
 
Toll app - Android project
Toll app - Android projectToll app - Android project
Toll app - Android project
 

Recently uploaded

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 

Recently uploaded (20)

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 

ARCHITECTING TENANT BASED QOS IN MULTI-TENANT CLOUD PLATFORMS

  • 1. ARCHITECTING TENANT BASED QOS IN MULTI-TENANT CLOUD PLATFORMS - Arun prasath S
  • 2. 2
  • 3. 3 Table of Contents Introduction 4 Problem statement 4 Solution overview 5 Goals 5 Typical implementation in production environment 6 Linux Containers 8 Components of LXC 8 Control group (cgroup) 9 Subsystems 10 blkio Subsystem 10 CPU Subsystem 10 Memory Subsystem 10 Python Controller 11 Puppet 12 Docker 13 Other options 13 Summary 14 References 14
  • 4. 4 Introduction Achieving QOS in a multi-tenant cloud platforms is still a difficult task and many companies follow different approaches to solve this problem. Here in this document I tried architecting a simple solution for achieving different QOS for different tenants in a Multi-tenant cloud environment based on my experiments. Problem statement Openstack steps into platform as service by introducing a new component ‘Trove’ Database as Service (DBaaS) offering in its upcoming Icehouse release. But Openstack announced that Trove will be operating as Single tenant service (Which means, for each Database instance, a new VM will be created). This is a costly affair for cloud service providers and also resources may not be used efficiently in this scenario. Many big cloud service providers like Google and Amazon provides options for the same DBaaS as a multi-tenant service. In this case, many instances of the DB will run in a single virtual machine. This reduces the cost of running extra virtual machines. But it also have few problems like QOS, security and isolation. The QOS factors are CPU, Memory, IOPS (Input/Output Operations per second) etc. More than one DB instance will be running in a single machine. In worst case scenarios one DB Instance may end up eating large amount of resources which greatly affects other DB Instances. We need to guarantee the QOS as mentioned in the SLA. Since more than one DB Instance will be running in a single machine, we have some security considerations. When one customer’s database gets affected it must not affect other instances. Also consumers in Single tenant are charged based on their usages like number of IO, total space, CPU, memory etc. But when it comes to multi-tenant it’s hard to estimate the usage as more than one DB instance will be running in a single virtual machine. In another perspective, the existing solution of creating each VM for each customer has a drawback of running separate operating system for each customer. This separate operating system is an extra load for the service provider as it need a lot of data space and memory.
  • 5. 5 Solution overview In my proposed solution, I used Linux containers running inside a virtual machines for isolation DB Instances. Each database instance will be running inside a Container. Therefore we can achieve true isolation, resources can be controlled and metering is also quite easy. With cgroup feature we can control the IOPS of the container and thereby we can offer different service level (IOPS) for different tenants. Existing offering (In Openstack Trove) Proposed solution Goals  Tenant based QOS  Multi tenancy  True resource isolation for DB Instances  Perfect metering  Automation
  • 6. 6 Typical implementation in production environment This is a typical implementation in the production environment. The user requests for a database instance using the dashboard. Once when the request is initiated, the Python controller gets the resources specified for a particular flavor in Nova and then consolidates the existing containers. If there is space available in the any virtual machines, the container is created there. Or else a new nova virtual machine is created and then the container is created in that virtual machine with the user specified parameters (CPU, RAM and IOPS).
  • 7. 7 Each time a virtual machine is created, it is discovered by puppet and the container software (LXC or Docker) is installed. Each time a container is created, MySQL is installed. After the creation and provisioning of the containers the users are provided the access to the database. (IP Address, MySQL username and password). The above is a modular approach in provisioning server. However for smaller companies the architecture can be simplified by using pre-built vagrant or golden images. The following is the brief of all the components mentioned above.
  • 8. 8 Linux Containers Linux containers provide light weight operating system level virtualization which isolates processes and resources in a simpler way compared to full-scale virtual machines. LXC works in the way similar to virtualization but with the difference that it don’t need separate kernel instance. It allows us to create many number of sand box environment which is completely isolated from the host and other containers. Components of LXC  Namespaces – Used to provide process isolation  cgroups – Used to control System management and resource control  SELinux – Ensures isolation between host and the container and also Individual containers  Libvirt- Tool box to manage containers Since QOS is our primary objective, we are going to focus more on control groups.
  • 9. 9 Control group (cgroup) Control group is a kernel feature to limit the resources like CPU, System memory and network bandwidth among the user-defined groups of tasks. For example, we can limit a MySQL instance from using all memory. In the same way we can guarantee that the MySQL instance gets the specified resource. In this architecture, I am using cgroup feature on Linux containers to isolate DB Instances and guarantee the minimum QOS for the customer. Limits for a particular container is defined in the containers configuration file. Hence we can allocate different resources for different containers based on customer requirements. In our scenario the containers will be running as process and the processes inside the containers will be running as the sub process.
  • 10. 10 Subsystems Subsystems are kernel modules that are aware of cgroups. They are resource controllers that allocate varying level of system resources to different cgroups. The following are the subsystems of cgroup. blkio Subsystem The Block I/O subsystem controls and monitors access to I/O on block devices by tasks in cgroups. It offers features like proportional weight division and I/O throttling (Upper limit). Common parameters: blkio.throttle.read_iops_device - specifies the upper limit on the number of read operations a device can perform blkio.throttle.read_bps_device - specifies the upper limit on the number of read operations a device can perform blkio.throttle.write_bps_device - specifies the upper limit on the number of write operations a device can perform CPU Subsystem The cpu subsystem schedules CPU access to cgroups. Common parameters: cpu.shares - contains an integer value that specifies a relative share of CPU time available to the tasks in a cgroup cpu.rt_period_us - specifies a period of time in microseconds (µs, represented here as "us") for how regularly a cgroup's access to CPU resource should be reallocated Memory Subsystem The memory subsystem generates automatic reports on memory resources used by the tasks in a cgroup, and sets limits on memory use by those tasks Common parameters: memory.usage_in_bytes - reports the total current memory usage by processes in the cgroup (in bytes) memory.max_usage_in_bytes - reports the maximum memory used by processes in the cgroup (in bytes) memory.limit_in_bytes - sets the maximum amount of user memory There are also various other subsystems like cpuacct, cpuset, devices, freezer etc. Those can be used in our scenario for enhanced configurations.
  • 11. 11 Python Controller In a fresh Openstack environment when a user requests an instance, a new VM is created. But in our case we need to provision containers. Hence we need to modify the normal Openstack work flow. One popular way to do this is via REST based API. Since I am a python guy, I am doing this via Python APIs provided by Openstack. All details of the containers created by the users is saved in the local MySQL database. In this scenario, the user is shown a dashboard or a form for database provisioning. When the user requests the instance, this python controller takes control. It gets the flavor details we used to build nova VM by enquiring Openstack. Then it consolidates the containers provisioned by using the local database. If it could not find any space, then a new nova VM is created using API calls and then the process continues. If existing VM has necessary resource to provision a container, then the container is created in that existing VM. The following is a sample python code for creating an Instance. Initially we can set the resource level options for any particular flavor. nova-manage flavor set_key --name m1.small --key quota:disk_read_bytes_sec --value 10240000 nova-manage flavor set_key --name m1.small --key quota:disk_write_bytes_sec --value 10240000
  • 12. 12 Puppet Openstack can provide any number of machines based on demand. But to get all those machines into production (Installing required softwares like LXC or Docker in our scenario), we need some automation. There are various automation tools for change and configuration management. In this scenario I used puppet. Puppet can manage our servers. In a puppet environment, we describe the necessary machine state in a declarative code. Puppet clients connects to the server and ensures that they are in the state described by the manifest file in server. In our scenario we will be defining manifests for installing LXC or Docker. Once after the necessary container is installed we bring the container under control of puppet for software (MySQL) installation. Puppet manifest for MySQL is available in Github.
  • 13. 13 Docker Docker is an open source developer-friendly abstraction layer on the top of Linux containers (LXC). Docker gives a simple and meaningful layer to play with containers in a cloud environment. By using Docker we can actually build containers, use it and make changes based on our need, push our used containers to the Docker repository and pull any time and any number of time for further usage. This means a lot in a PAAS market. In a high level terminology, Docker can automate the deployment of applications as highly portable, self-sufficient containers which are independent of hardware, language, framework, packaging system and hosting provider. Docker also provides drivers for Openstack which embeds with Nova and provides ability to work with containers along with nova virtual machines. Since most Openstack production environment need to instantiate various different operating systems, we can have a work around and achieve our need. In this scenario we are going to run a Docker or LXC on the top of a virtual machine. Docker, along with puppet or chef can be very useful for the Platform as a Service providers. They are very useful in automated provisioning of platforms required for developers, in a very convenient and sophisticated way. Thus making operations team work much easier. Other options The above method is one way of creating multi-tenant cloud environment. But there are many number of ways to achieve it using various other options. Rackspace uses OpenVZ to build their cloud platforms. They uses OpenVZ to contain their customers database and for resource isolation. OpenVZ has many advantages over LXC. Resource allocation is made simple in OpenVZ. (i.e. Guaranteed RAM and Burstable RAM are specified using simple commands ). Live migrations are quite easy in OpenVZ when compared to LXC. Oracle follows an interesting architecture in its DBaaS offering. They created a customized ‘Container Database’. All the customer databases are in Pluggable database (PDB) format and they can be plugged to the container database and can work on.
  • 14. 14 Summary Thus the tenant based QOS feature is achieved in a multi-tenant cloud platform. I haven’t mentioned about some other features and drawbacks like migration, scale up, high availability etc. All those drawbacks can be rectified by having some workaround in the architecture. References 1) Linux Plumbers Conference 2013, Rackspace session 2) http://www.kernel.org/doc/Documentation/cgroups 3) http://docs.openstack.org/developer/trove/ 4) https://help.ubuntu.com/lts/serverguide/lxc.html 5) http://wwwkemper.informatik.tu-uenchen.de/research/publications/conferences/sigmod2008- mtd.pdf 6) http://blog.docker.io/2013/10/gathering-lxc-docker-containers-metrics/ 7) http://www.vldb.org/pvldb/vol7/p37-das.pdf