Test 1 Flashcards
What are the Pros and Cons of Full Virtualization?
Full Virtualization
Pros:
No source code modification required
Easy to implement
Feasible for all CPU architectures
Cons:
Latency from OS/HW emulation
Hard to provide real-time guarantees
What are the pros and cons of paravirtualization?
Paravirtualization
Pros:
Better performance compared to full virtualization
25-75% less RAM usage
2-20% less disk I/O
10% less network I/O
7% less CPU usage for privileged instructions
Cons:
Requires OS modification
Poor portability
Not compatible with off-the-shelf or legacy OS versions
What is a rack?
A large amount of servers mounted and connected together
What is a cluster?
A collection of server racks
How are things stored in data centers?
Through a combination of SSDs and HDDs
What is the main use case of SSD?
Accessing data
What is the main use case of HDD?
Storing data for long term use
What is Directed Attached Storage?
Storage directly connected to the server
What are Network Storages?
Storage connected to a cluster level switch
What are some attributes of Directed Attached Storage?
Backup (at least three) is managed by a distributed file system, low cost but low reliability
What are some attributes of Network Storage?
Contains redundancy and replication mechanisms
What is the goal of data center software?
To maximize the locality of communication and data relative to the rack
Where are data centers located?
Close to internet backbone optical fibers
Areas with cheap and reliable electricity
Areas with low property tax rates
Areas with high stability in the country
What is CAPEX?
Capitial Expenditure which includes the building, power, cooling infrastructure, and initial IT equipment
What is OPEX?
Operational Expenditure which includes, buying replacement equipment, electricity, and salaries
What takes up the most of a Data Centers power?
CPUs, DRAM, Disks, and Networking
Why does power consumption in Data Centers matter?
It costs alot of money
What percentage of global energy is used by data centers?
1%
How to quantify Energy Efficiency?
PUE Power Usage Effectiveness
1+Non IT Equipment Power/ IT Equipment Power
Which is better a higher PUE or lower PUE
Lower PUE 1 is ideal
What is held in the HW layer of Google Data Centers?
Servers, Storage, Networks, Accelerators, Physical Infrastructures
What is held in the Virtualization layer of Google Data Centers?
Bios, MGMT Controller, Drivers, Kernel
What is held in the Resource MGMT layer of Google Data Centers?
BORG Master, BORGLET, Chunkserver
What is held in the Cluster Infrastructure layer of Google Data Centers?
Mapreduce, Spanner, Colossus, Remote Procedure, Auto Scaling
What is held in the app framework layer of Google Data Centers?
Serving Infra, Data Analysis, User Experience, Front End Infra
What is held in the Monitoring Infrastructure?
Service Level Dashboards
Performance Debugging tools
Platform level health monitoring
What is in the App Framework?
Application Frameworks
Application Level Software
What are the two classes of Data Center Workloads?
Service Workloads
In-house Workloads
What are Service workloads?
Work loads meant to deal with user concerns directly
What are In House Workloads?
Workloads meant to deal with concerns related to in house production
Why are there two classes of workloads in Data Centers?
To over provision in the case of a traffic spike
What are the three different types of DC workloads?
1st party workloads
1st party workloads offered to 3rd party customers
3rd party workloads
What is VM migration?
Moving a VM from one host to another
What are the five benefits of Virtualization?
Run multiple/different OSes on a single machine
Consolidate underutilized servers to reduce CAPEX and OPEX
Simplified management
Improved availability
Enforced Security
What are some VM migration use cases?
Load balancing
Maintenance
Fault tolerance and Failover
What is Load balancing?
Moving a VM to a less busy host
What is Maintenance in the context of VM migration Use Cases?
Moving a VM from one host to another before the first hosts shut down
What is the most common cause of Data center failure?
Upgrades, but more generally maintenance
What is Fault Tolerance and Failover in the context of VM migration use cases?
Recovery VM from host failure, restart VMs on different hosts
What are the two types of VM migrations?
Cold Migrations and Hot Migrations
What is Cold Migration?
When you shut down the first VM on host 1 and then restart on host 2
What are the phases of Live Migration?
Phase One Take a VM snapshot and then save VM state
Phase Two Start a new VM with snap shot and duplicate VM state
Phase Three Copy final state of source VM, turn off source VM, Update the last copy of VM state
Phase Four Add to service network
Does live migration have service downtime?
Yes (1 to 2 seconds)
What is total migration time?
Duration between time when migration is initiated and time when the migrated VM is resumed
What is down time?
The time that the VM is out of service due to migration
What is the most difficult technical challenge in VM migration?
How to synchronize memory contents
What are the two Live Migration Techniques?
Pre-copy
Post-Copy
What are the benefits of Post-Copy?
Shorter migration time
Migration time is close to stop and copy
What are the downsides to Post-Copy?
Overhead after migration
What are the benefits of Pre-copy?
Minimal downtime
What are the downsides to Pre-copy?
Migration time and if the host dies during migration dont know what to do
What are the four types of virualization?
Full Virtualization
Paravirtualization
Os-Level Virtualization
Application Level Virtualization
What are the Pros of OS-Level Virulization?
Lightweight
Good Isolation
What are the Cons of OS-Level Virulization?
Technically doesn’t have OS
Generally runs “the same OS” as the host machine
What is the benefits of Resource Isolation?
Isolation prevents processes or applications from hurting each other
Isolation makes sure that processes get exact amount of resources they request
Can a container in a namespace access and see another container in another namespace?
No
What are the six linux namespaces?
PID
NET
MNT
PIC
User
What is PID namespace
A namespace that allows PID to only see processes in the same PID namespace
What happens when PID 1 namespace goes away?
The whole namespace is killed
Can a given process have multiple PIDs?
Yes
What is NET namespace?
A namespace that isolates the networking functionalities and related resources?
What attributes does the NET namespace have?
Network Interface
IP Addresses
Routing Tables
Iptables rules
What is the MNT namespace?
A namespace for mount points
What is the IPC namespace?
The IPC namespace isolates the inter-process communication resources
What is the UTS namespace?
Provides a distinct hostname/domain name separated from the host system/os
What is the User namespace?
The user namespace provides a unique user and group ID for each container
What does clone() command do?
Creates a new process and a new namespace
What does unshare() command do?
Attaches the calling process to a new namespace
What does the setns() command do?
Allows the calling process to join and existing namespace
What is the process the summary namespace do?
A process isolation mechanism
What are cgroups?
A Linux kernel feature that limits, accounts for and isolates the resource usage of a collection of processes
What is the difference between cgroups and namespaces?
cgroups limits what and how much processes or containers can use
namespaces limits what processes/containers can see
What are subsystems?
Computer resources like the CPU, Memory, Disk IO, network
What is the command to check and existing cpu group?
-ls -al /sys/fs/cgroup/cpu/
What is the command to create a cpu cgroup and check if it is created
- sudo cgcreate -a ubuntu -g cpu:CSCI4795cgroups
- ls -al /sys/fs/cgroup/cpu/
What is the command to set the CPU limit
- sudo cgset -r cpu.cfs_quota_us=20000 CSCI4795cgroups
- sudo cgexec -g cpu:CSCI4795cgroups stress -c
What does LXC stand for?
Linux Container
What is a LXC?
A combination of namespaces and cgroups
Inside of a LXC what does it look like?
A VM
Outside a LXC what does it look like?
A normal process running on a machine
What main benefit of LXC?
They are lightweight
How to run a LXC?
sudo apt install lxc-utils
sudo apt install lxc lxctl lxc-templates
What command to run to create a new container?
lxc-create
What command to start a new container?
lxc-start
What command to attach a new console?
lxc-console
What command to stop a new container?
lxc-stop
What command to delete a new container?
lxc-delete
What is Docker?
A software platform that allows you to build test and delpoy applications
What is libcontainer?
A cross-system abstraction layer aimed to support isolation technology
What architecture does docker use?
A client server architecture where the docker client talks to a Docker Daemon which builds, runs and distributes docker containers
What is the Docker client?
The primary way that the user interact with the docker daemon
What is the docker daemon?
Manages docker objects and communicates with other daemons to manage Docker serverices
What is Docker hub?
Stores the Docker images, can be a public and a private registry
What is a Docker Image?
A collection of files and some meta data
What is the relationship between a docker image and a docker container?
A docker containeris a running state of an image
What is the pros and cons of immutable infrastructure?
Pros: Less management effort for service/servers
Horizontal scalability
Cons: Small quick fixes require a full redeploy
What is the basic command framework to do a docker run?
docker run [OPTIONS] IMAGE [COMMAND] [ARG…]
What does this command do?
docker image
Displays all images currently installed on your machine
What does this command do?
docker pull
Pulls an image from the registry
What does this command do?
docker rmi {$image id}
Remove one or more images
What does this command do?
docker logs $(CONTAINER_ID)
fetch the logs of a container
What are microservices?
A software development technique, that structures an application as a collection of loosely coupled services
What is Service Oriented Architecture?
Speed of delivery
Scalability
Cloud and DevOps
What are the Characteristics of a Monolithic Application?
Large codebase plus large database
Put every function/logic into a single host
Many components, no clear ownership
Long deployment/delivery cycle
What is Stateful? (TCP)
Node A knows which step has been reached in Node B
What is Stateless? (UDP)
Node A remebers its state, sends it to Node B when necessary, Nodes are processing each request independently
What are the design principles in microservies?
Modular and independent
Hiding Implementation details
Automation
What are some benefits for microservices?
Polyglot architecture
Evolutionary design and replaceable architecture
Selective Scalability
Small
What are some disadvantages for microservices?
High overall complexity
Operational overhead
Service Discovery
Chattiness
Slow
Different languages
What is Container Orchestration?
Performing
Scheduling, resource management, service management for large scale microservices
What is container scheduling?
Container deployment, placement and collocation
Horizontal scaling, job scheduling and request placement
What is Resource management?
Mostly related to cgroup management, (memory, cpu, disk volumes, network ports, net work IPs)
What is Service Management?
Load balancing
Service Discovery
Configuration management
Logging, monitoring, and health management
What is a monolithic app?
A SW architecture, all components/functions of a program are tightly coupled, often into a single deployable unit
What is Docker Swarm?
A docker orchestration tool
What are the three concepts associated with a docker swarm?
Node
Service
Task
What does a manager node do?
Manages a swarm cluster
Swarm commands can only be executed on manager nodes
Manager nodes can be worker nodes
What does a worker node do?
Host containers
Run service tasks
For a fault tolerant cluster what is the recommended amount of nodes for a swarm?
Seven
A n manager cluster tolerates the loss of at most what?
(N-1)/2 managers
What is Raft?
A consensus mechanism to choose a leader for a docker swarm
What does the leader election do?
When the leader crashes a new leader will be elected
What does the leader do in reference to log replication?
It accepts commands from clients and append it to logs
What does the leader do for safety?
To keep logs consistence on servers with up to date logs can be come leaders
Manager nodes must have what?
Static IP addresses
Very reliable connectivity to each other
Be reachable by all other manager nodes
Know their IP addresses, so that the can tell other manger nodes how to reach them
What happens if a quorum is lost?
The user/operator must manually add new managers
What is service in a docker swarm?
The basic deployment unit in a swarm cluster
What is a task in a docker swarm?
A docker container on work nodes
What is a replicated service?
Running a container for a service
What is a global service?
One task on every node