resource management in software programmable router os david yau system software and architecture...
DESCRIPTION
Existing Networks client router: simple forwarding ISP serverTRANSCRIPT
![Page 1: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/1.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/2.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/3.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/4.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/5.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/6.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/7.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/8.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/9.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/10.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/11.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/12.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/13.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/14.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/15.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/16.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/17.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/18.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/19.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/20.jpg)
Memory Allocation
![Page 21: Resource Management in Software Programmable Router OS David Yau System Software and Architecture Lab Department of Computer Sciences Purdue University](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/21.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/22.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/23.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/24.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/25.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/26.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/27.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/28.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/29.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/30.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/31.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/32.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/33.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/34.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/35.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/36.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/37.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022062413/5a4d1b7b7f8b9ab0599b90a9/html5/thumbnails/38.jpg)
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