Nested Virtualization and Linux Performance

Published: 28 March 2018
on channel: Women In Linux
218
4

Questions to ask yourself

What is kernel ?
What is kernel module ?
What is a process
How to use strace, ltrace, ftrace ?
How to find a character device vs a block device?
Difference in the different filesystems?
ext2, ext3, ext4, xfs
What is virtual memory vs physical memory ?


Content Found from various sources online
Memory is divided into 2 parts UserSpace and Kernel Space
User space is that set of memory locations in which user processes (i.e., everything other than the kernel) run. A process is an executing instance of a program. One of the roles of the kernel is to manage individual user processes within this space and to prevent them from interfering with each other.

Kernel space can be accessed by user processes only through the use of system calls. System calls are requests in a Unix-like operating system by an active process for a service performed by the kernel, such as input/output (I/O) or process creation. An active process is a process that is currently progressing in the CPU, as contrasted with a process that is waiting for its next turn in the CPU. I/O is any program, operation or device that transfers data to or from a CPU and to or from a peripheral device (such as disk drives, keyboards, mice and printers).

Userspace is where application live
Kernel Space: Kernel space is where the kernel (i.e., the core of the operating system) executes (i.e., runs) and provides its services
Storage Subsystem is VFS, XFS, and Block devices (this is first place to I/O optimization)

VFS = Virtual File System

This is the go between to the real memory of an filesystem.
This contains xfs, btrfs

Buffer Cache is the area in memory where i/o requests can be buffered. Most important part the caches read and write requests

The I/O Scheduler the driver is talks to the physical device. Determines how your OS will talk to devices.

Drivers contain kernel modules

Data is written in blocks in /dev
Page Cache is used to optimize performance
With Hdd drives the elevator algorithm is being used.

There three I/O schedulers.
How to find it:
cat /sys/block/sda/queue/scheduler

They can be changed at reboot by passing the elevator= command
In realtime you pass /sys/block/sda/queue/scheduler

Three Scedulers

NOOP- fifo first requests that come in are handle first (SANS and HyperVisors)

Deadline (executed in batches defined in the fifo_batch parameter)
higher values = enhanced throughput
lower value = low latencies
read/write expire do fine minimum wait or time
read requests get priority

CFQ- this is useful if many processes are operating on the disk at the same time.
Use ionic to the group blkio controllers to set priorities in this scheduler

Commands:
vmstat: virtual and physical memory statistics, system-wide
 mpstat: per-CPU usage
 iostat: per-disk I/O usage, reported from the block device interface
 netstat or SS: network interface statistics, TCP/IP stack statistics, and some per-connection statistics
 sar: various statistics; can also archive them for historical reporting

Tracing
this is closer to the application and kernel and provides information about your systems and what it is doing

Common tracing tools

• strace tracing system
• ltrace tracing library calls
• ftrace function tracing in the linux kernel

System calls and library calls are similar in that they are provided to application by the environment. The difference between the two is that system calls are implemented in kernel, whereas library calls are implemented in user space

run this command: Strace ls
run this command: Strace -c ls

Difference from Type 1 and Type 2 Virtualization
http://searchservervirtualization.tec...

examples of type 1 - vmware, rhev, hyper v, xen
examples of type 2 - vmware workstation, vmware fusion, virtual box , oracle vm

Nested Virtualization

https://thenewstack.io/azure-ahead-ne...

https://www.functionize.com/

https://docs.microsoft.com/en-us/virt...

https://docs.microsoft.com/en-us/virt...

https://cloud.google.com/compute/docs...

https://en.wikipedia.org/wiki/Virtual...

https://en.wikipedia.org/wiki/Virtual...

https://wiki.xenproject.org/wiki/Nest...

https://access.redhat.com/documentati...


Watch video Nested Virtualization and Linux Performance online without registration, duration hours minute second in high quality. This video was added by user Women In Linux 28 March 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 21 once and liked it people.