Adapting applications to exploit virtualization management knowledge

Similar documents
Sockets 15H2. Inshik Song

Socket Programming for TCP and UDP

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola

SA30228 / CVE

CLIENT-SIDE PROGRAMMING

AspectC++ A Language Overview

CSC209H Lecture 9. Dan Zingaro. March 11, 2015

Chapter 21 Aspect-Oriented Software Engineering (AOSE)

Group-A Assignment No. 6

Building a Reliable Multicast Service based on Composite Protocols

Implicit BPM Business Process Platform for Transparent Workflow Weaving

On the relationship between weavers and the build system

CSci 4061 Introduction to Operating Systems. Input/Output: High-level

CS242 COMPUTER PROGRAMMING

Language support for AOP

CS 428/528 Computer Networks Lecture 01. Yan Wang

Linux Programming

Network Communication

Emulation 2. G. Lettieri. 15 Oct. 2014

Project 3. Reliable Data Transfer over UDP. NTU CSIE Computer Networks 2011 Spring

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems

COS 318: Operating Systems

(VERSION WITH ANSWERS) CORE EXAMINATION Department of Computer Science New York University September 26, 2008

What Is Operating System? Operating Systems, System Calls, and Buffered I/O. Academic Computers in 1983 and Operating System

NLUUG, Bunnik CloudABI: safe, testable and maintainable software for UNIX Speaker: Ed Schouten,

Section - Computer Science

Lab 1 - Reliable Data Transport Protocol

Systems Programming. 08. Standard I/O Library. Alexander Holupirek

Identification of Differences Between Aspect-Oriented Programs. Marija Katic, PhD Student

Oral. Total. Dated Sign (2) (5) (3) (2)

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

Exception-Less System Calls for Event-Driven Servers

A brief introduction to C programming for Java programmers

Problem System administration tasks on a VM from the outside, e.g., issue administrative commands such as hostname and rmmod. One step ahead tradition

Files. Eric McCreath

Processes communicating. Network Communication. Sockets. Addressing processes 4/15/2013

This tutorial will take you through simple and practical approaches while learning AOP framework provided by Spring.

COS 318: Operating Systems

CSE 333 Section 8 - Client-Side Networking

Interprocess Communication

Chapter 5 C. Virtual machines

RFC 003 Event Service October Computer Science Department October 2001 Request for Comments: 0003 Obsoletes: none.

Introduction to Aspect Oriented Programming and Aspect Matlab. AspectMatlab 1 / 30

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

Aspect-Oriented Programming with C++ and AspectC++

Aspect-oriented Software Development. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 32 Slide 1

Department of Computer Science, Institute for System Architecture, Operating Systems Group. Real-Time Systems '08 / '09. Hardware.

Application Virtualization and Desktop Security

instruction is 6 bytes, might span 2 pages 2 pages to handle from 2 pages to handle to Two major allocation schemes

Process Management! Goals of this Lecture!

W4118: OS Overview. Junfeng Yang

10. I/O System Library

ADQ14-FWATD. User Guide. Author(s): SP Devices Document no.: Classification: Public Revision: PA7 Date:

More on C programming

Tutorial on Socket Programming

Protection and System Calls. Otto J. Anshus

Introduction to Lab 2 and Socket Programming. -Vengatanathan Krishnamoorthi

AJDT: Getting started with Aspect-Oriented Programming in Eclipse

Virtual Memory 1. Virtual Memory

Virtual Memory 1. Virtual Memory

CISC2200 Threads Spring 2015

Introduction to Cloud Computing and Virtualization. Mayank Mishra Sujesha Sudevalayam PhD Students CSE, IIT Bombay

Handling Self Modifying Code Using Software Dynamic Translation

Stream Computing using Brook+

Motivation was to facilitate development of systems software, especially OS development.

SCALA AND ASPECTJ. Approaching Modularizing of Crosscutting. Ramnivas Laddad. Concerns. ramnivas

Operating Systems. IV. Memory Management

Socket Programming TCP UDP

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016

ECE454 Tutorial. June 16, (Material prepared by Evan Jones)

Asynchronous Events on Linux

BlueVisor: A Scalable Real-time Hardware Hypervisor for Many-core Embedded System

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

MSc Integrated Electronics Networks Assignment. Investigation of TCP/IP Sockets and Ports. Gavin Cameron

High Performance Computing

System Call. Preview. System Call. System Call. System Call 9/7/2018

PRINCIPLES OF OPERATING SYSTEMS

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Aspect oriented Software Development. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 32 Slide 1

System-Level Protection Against Cache-Based Side Channel Attacks in the Cloud. Taesoo Kim, Marcus Peinado, Gloria Mainar-Ruiz

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

Improving Host-GPU Communication with Buffering Schemes

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No.

CSE 451: Operating Systems Winter Redundant Arrays of Inexpensive Disks (RAID) and OS structure. Gary Kimura

Context. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement

TPMC500-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. 32 Channel 12 Bit ADC. Version 2.0.x. Issue 2.0.

Programming with TCP/IP. Ram Dantu

Lecture 25: Board Notes: Threads and GPUs

Gateway Design Challenges

Socket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme

Process Management And Synchronization

Processes. CSE 2431: Introduction to Operating Systems Reading: Chap. 3, [OSC]

CS240: Programming in C

Virtualization and memory hierarchy

Optimal Algorithm. Replace page that will not be used for longest period of time Used for measuring how well your algorithm performs

Measuring zseries System Performance. Dr. Chu J. Jong School of Information Technology Illinois State University 06/11/2012

SIERRAWARE SIERRATEE FOR MIPS OMNISHIELD

Course 6 7 November Adrian Iftene

Transcription:

Adapting applications to exploit virtualization management knowledge DMTF SVM 2013

Outline Motivation Applications running on virtualized infrastructure suffer! 1 Example of suffering, by experiment 2 How to adapt applications behaviour 3 Relation between application and the management system

Impact of virtualization on applications An Inter-VM communication experiment App. component VM and guest OS Hypervisor Physical network co located distributed choked A B A B A B

Impact of virtualization on applications Transmission time for 10 7 bytes UDP payload (sender s view) 10 10 Wallclock time (s) 1 time, co-located VMs time, physically distributed VMs time, physically distributed VMs, choked 0.1 0.1 0 250 500 750 1000 Chunk size (bytes) Performance seems equal; how can this be? 1 Wallclock time (s)

Impact of virtualization on applications Segment drop rate (receiver s view) 10 100 90 Wallclock time (s) 1 time, co-located VMs time, physically distributed VMs time, physically distributed VMs, choked drop, co-located VMs drop, physically distributed VMs drop, physically distributed VMs, choked 0.1 0 250 500 750 1000 0 Chunk size (bytes) Deployment setup can change at any time: how can applications adapt? 80 70 60 50 40 30 20 10 Dropped frames (%)

Impact of virtualization on applications Problem Observation: Deployment changes quickly, but application behaviour does not. Application operates from static-world assumptions. Virtualization masks deployment state from application Detrimental effects in some of the states Scope of the problem (network thoughput is but an example!) locality: communication metrics (throughput, delay, faults,... ) resources: CPU capacity, RAM,... context: security, hardware capabilities,... How to render application software virtualization-aware?

Problem analysis Solution dimensions Source of Information Gossip Point of Decision Discovery External function Management Application Management Hypervisor Self adaptivity Operating system Module replacement Application Binary modification Point of Change Source modification Method of Change Select one point in this solution space!

Problem analysis Source of information, point of decision Choices fine grained, procedure level coarse, capacity level knowledge of the application s needs application guest OS hypervisor management system knowledge of the environment s state local, limited global, (ideally) comprehensive Management system to provide environmental information/guidance Application to decide on it

Problem analysis Point and method of change Choices all applications single function scope, required authorisation exchange of system libraries call interception programmatic modification manual modification effort, required knowledge of application Modification of application code (source or binary) Programmatic, machine-supported modification system administrator application programmer

Modifying applications Code example: output to a UDP socket 1 int write_udp(const char* targetip, unsigned int port, long count) { int transmit_socket = socket(af_inet, 5 SOCK_DGRAM, IPPROTO_UDP); connect(transmit_socket, (struct sockaddr*)&si_other, sizeof(si_other)); 10 int c = 0; while (c++ < count) write(transmit_socket, 13 (void*)chunk, (size_t)sbuf); }

Modifying applications Aspect-oriented programming (AoP) at a glance Normal compilation Glorified string substitution with knowledge of the programming language C/C++ Application code (original) Executable Aspect language Aspect code Aspect Weaver C/C++ Application code (woven) C Compiler / Linker Executable Compilation with aspect weaving Aspect: a cross-cutting concern Aspect language matching/scoping of language constructs (classes, methods,... ) access to program structures manipulation of parameters, return values,... Pointcut expressions: where to modify Advice expression: how to modify Weaving: integration of Aspect code

Modifying applications Example: a buffering aspect (for both sockets and files) 1 aspect Buffering { pointcut openpc() = "%...:: open(...)";........... Intercept the function calls, 3 pointcut socketpc() = "%...:: socket(...)"; that create file handles. 4 advice call(openpc() socketpc()) : around() { 5 tjp->proceed();................................................. Allow the call to execute 6 int myfh = *((int*)tjp->result());..................... and to yield a file handle, 7 writebuf[myfh] = (char*)malloc(bufsize); Associate the file handle with a buffer. 8 } pointcut writepc() = "%...:: write(...)";...... Intercept the write() calls. 10 advice call(writepc()) : around() { int fd = *((int*)tjp->arg(0)); const void* buf = *((const void**)tjp->arg(1)); unsigned int count = *((unsigned int*)tjp->arg(2)); int myfh = _getmyfh(fd); 15 if ((buffill[myfh] + count) < bufsize) {................Write to buffer, if room 16 memcpy(writebuf[myfh] + buffill[myfh], buf, count); buffill[myfh] += count; } else {..................................................... When full, flush buffered data, 20 write(fd, writebuf[myfh], buffill[myfh]); 21 buffill[myfh] = 0; tjp->proceed();......................... and allow the current write() to execute. 23 } *((int*)tjp->result()) = count;..................always return the expected value. 25 } }

Modifying applications Behaviour of original vs. woven code Wallclock time (s) 10 1 0.1 2000 1500 1000 Buffer size (bytes) 500 50 without aspects with aspects 100 150 Chunk size (bytes) 200 250

Outlook Supplying management information to applications Management System filter knowledge about infrastructure adapt Aspect code Application notify subscribe Event Guest OS Service manage Hypervisor observe Physical machine

Outlook Conclusions and Open questions Your software runs on virtualized infrastructure and it suffers! Environment has changed; application code has not. Need to adapt application code, but not manually (too large code base) not centrally (different applications have different needs) not to be self-adaptive (selfish adaptation obviates management goals) Our AoP approach works, however it has limitations Applicability determined by code quality quality metrics? Conflicting aspects balancing? aspect patterns? Management is capable to supply global information, however it may not wish to (public XaaS scenarios) discovery, gossip? which information is relevant to ask? situation/cause/effect? formalism?