+ All Categories
Home > Documents > Resource Management in Software Programmable Router OS David Yau System Software and Architecture...

Resource Management in Software Programmable Router OS David Yau System Software and Architecture...

Date post: 18-Jan-2018
Category:
Upload: clementine-phelps
View: 216 times
Download: 0 times
Share this document with a friend
Description:
Existing Networks client router: simple forwarding ISP server
38
Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University http://ssal.cs.purdue.edu http://www.cs.purdue.edu/people/yau
Transcript
Page 1: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource Management in Software Programmable Router OS

David Yau System Software and Architecture LabDepartment of Computer SciencesPurdue Universityhttp://ssal.cs.purdue.eduhttp://www.cs.purdue.edu/people/yau

Page 2: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

MotivationsMore sophisticated network contents

application-specific transportMore demanding network usersValue-added services

intelligent congestion control/packet repair security (copyright, intrusion detection) packet combining without losing information ...

Page 3: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Existing Networks

client

router: simpleforwarding

ISP server

Page 4: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Value-added Services Networks

client

router: processing +forwarding

Code server

Encryption

Intelligentcongestion control

ISP

Page 5: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

ChallengesHeterogeneous users

needs, priorities, purchased sharesUntrusted programs

greedy, buggy, malicious, …Diverse resources

space-shared, time-sharedDiverse resource bindings

multi-processes, multi-threads, multiplexed threads

Page 6: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

The CROSS ApproachVirtualized router resources

virtual machines installed by service providers

Resource allocation objects as first-class citizens in kernel

Flexible/scalable packet classification resource binding, per-flow processing

Efficiency, modularity, configurability

Page 7: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource VirtualizationHierarchical scheduling

virtual machines with different APIs user allocations on demand

Target resource types CPU time network bandwidth memory pool capacity (virtual memory) disk bandwidth

Page 8: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource AbstractionKernel resource allocation objects to

account for resource useIndependent/orthogonal objects

relative to resource consumersFlexible bindings to resource consumers

shared binding dynamic binding (with run-time information) configurable parameters

Page 9: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource Allocations

CPUscheduler

Diskscheduler

Networkscheduler

Memoryscheduler

Resourceallocation

bindSharedbinding

request

selectLogical multiplexing function

Page 10: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource Allocation APICreate/delete

named by object system-wide keyBind/unbind

affect calling thread/process key to fine-grained resource management

Control change scheduling parameters, owner, …

User-level access through pseudo-device

Page 11: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Packet ForwardingThree possibilities

active program dispatchtrusted (kernel thread), untrusted (user

process) Per-flow processing

subscribed by dispatched router programssecurity processing, application-level routing

Cut-through fast pathminimal delay

Page 12: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Packet forwarding decision

Based on packet header informationPacket classification

scalable to many dimensions scalable to many classification rules flexible

support multiple and least-cost matches

Page 13: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Cross Forwarding Paths

Resourceallocationmanager

Functiondispatcher

Cut-through

subscribe

dispatch

Active packet

send

Per-flowprocessing

Outputnetworkqueues

Inputqueues

Page 14: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource Binding DecisionActive packet starts router programProgram must run with resource

allocation which allocation? retrieved as part of packet classification request to create new allocation request to use existing allocation with

given key

Page 15: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

System IntegrationLeverage against Solaris gateway OS

support for existing application immediate access to software development

platformImplication

need to work with existing Solaris abstractions

threads/processes, stream buffers, page frames, buffer header structures, ...

Page 16: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

CPU SchedulerHierarchical partitioning using fair

service curves [MMCN 2001]Decoupled delay and rate allocation

good for low delay and low rate applicationsSolution to priority inversion

lock contention and client/server interactionPerformance

rate/delay guarantees, proportional sharing, minimized unfariness

Page 17: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Service Curve

Time since thread wakes up

CPUtimepromised Linear curve =

rate0.3

Convex curve

0.2

0.5

Concave curve

0.5

0.2

C

DD’

Page 18: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

CPU Sharing Hierarchy

CPU

VMfoo

VMbar

VMdoe

Userallocation

B

Userallocation

A

bind

thread

process

Page 19: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Memory SchedulerGuaranteed share per allocation

minimum number of page frames that allocation can map simultaneously

Guaranteed-share scanner algorithm consider pages for replacement in

decreasing over-allocation order second chance to referenced pages

allow reserved but unused pages to be utilized

Page 20: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Memory Allocation

Page 21: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Disk SchedulerProvide proportional sharing

conflict with efficiency goal to minimize seek time overhead

notion of eligibility to balance between the two goals, using tolerance parameter

Integrated with file systems problem: applications do not access disk

directly!

Page 22: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

File System Disk AccessResource allocations bound to resource

consumers (I.e., threads/processes)Threads/processes execute

read/write/mmap system calls disk accesses avoided unless file system

page faultsPage faults occur in interrupt context!Solution: Association Map on vnode/offset

Page 23: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Association Map

Page fault

Associationmap Disk server

Resource principal

Upper-halffile calls:read/write/mmap

Vnode/offsetto allocationmapping

Lookupallocation

Vnode/offset

USER

KERNEL

Page 24: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

System ImplementationExtension to Solaris 2.5.1Deployed on UltraSPARC/Pentium

network Ethernet, Fast Ethernet, Myrinet

Modular subsystems with well-defined interfaces

Simple command interfaces to launch legacy applications

Page 25: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Basic CostsResource Allocation control

create delete bind/unbind

Function dispatch thread: about 145 microseconds, low variance process: 0.77 to 1.1 ms, application-dependent

Page 26: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Resource Allocation Costs (microseconds)Operation kernel user

Bind 4.8 9.0

Unbind 2.4 6.6

Create +delete

15.4 19.6

Page 27: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Packet ClassificationFive dimension

exact, prefix, range, wildcardDatabase size up to 256 K rulesAverage lookup cost of 7.8

microseconds 1.1 Gb/s for 1000 byte packets

Add/delete 10.8/14.9 microseconds 67,000 updates per second

Page 28: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Packet Classifier Performance

Page 29: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

CPU/network SchedulingNetwork respond application

driven by received packets do some CPU computation, send some

network data outTotal delay budget of 3.5 seconds

CPU one second, network 2.5 seconds CPU two seconds, network 1.5 seconds

Allow both rate and delay compositions

Page 30: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Rate CompositionUdpburst CPUrate

Greedy CPUrate

Achievedbandwidth(Mb/s)

5% 95% 3.610% 90% 7.815% 85% 9.820% 80% 9.8

Page 31: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Delay Composition (microseconds)Run Mean

CPUdelay

S. d.CPUdelay

Meannetdelay

S. d.netdelay

Meantotaldelay

S. d.totaldelay

1 1.06 0.007 2.31 0.136 3.39 0.144

2 2.00 0.096 1.48 0.136 3.49 0.172

Page 32: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Disk SchedulingProgram: search through an input file

sequentially for some patternTwo groups of 10 processes each

group one: reading 65,588 kbytes, with allocation of rate 10

group two: reading 55,789 kbytes, with allocation of rate 20

Equal CPU allocations, disk placement not controlled

Page 33: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Proportional Disk Sharing

Page 34: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Memory SchedulingFootprint application

repeatedly touch a set of n distinct pages

Result summary [JSAC 2001] isolation properties utilization of over-reserved pages reclaim of reserved pages

Page 35: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Related WorkRouter Plugins (Washington U)

extensibility, quick resource binding through gates

Extensible Router (Princeton) kernel built from scratch, path abstractionabstraction

Bowman (Georgia Tech/U Kentucky)Bowman (Georgia Tech/U Kentucky) Posix user-level implementation for Posix user-level implementation for

portabilityportability

Page 36: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

Related Work (cont’d)Active node with ANTS (MIT)

externally certified program capsulesFlexible end-system scheduling

Resource Containers (Rice) Software Performance Units (Stanford) Reservation Domains (AT&T)

Page 37: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

ConclusionsResource management important for

software-programmable routersPresented system prototype as solution

step packet classification router program dispatch unified and orthogonal resource abstraction schedulers for major resource types

Page 38: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University.

PointersSystem Software and Architecture Lab

http://ssal.cs.purdue.edu [JSAC 2001] Resource Management in Software-

Programmable Router OS [MMCN 2001] Performance Evaluation of CPU

Isolation Mechanisms in a Multimedia OS KernelMyself

[email protected] www.cs.purdue.edu/people/yau


Recommended