SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Direct Code Execution:
Revisiting Library OS
Architecture for Reproducible
Network Experiments
Hajime Tazaki (University of Tokyo, Japan),
Frederic Urbani (INRIA, France), Emilio Mancini (INRIA, France),
Mathieu Lacage (Alcmeon, France), Daniel Camara (INRIA, France),
Thierry Turletti (INRIA, France), Walid Dabbous (INRIA, France)
ACM CoNEXT 2013
Our target: experimentation
reproducibility

Ideally one should be able to easily
Verify published results (same scenario)
Test and debug with other scenarios

This requires
functional/timing realism, debuggability

2

Proof the
idea is good
at the same
condition

Try to
replicate

Extends w
an idea
Related work: real time emulation
Container Based Emulation
provides lightweight virtualization
Mininet-HiFi proposed in CoNEXT’12 ensures
fidelity of experiments but :
Timing realism still limited by hardware
resources
No debugging support

3
Related work: virtual time
Time Dilation [NSDI’06]
Clock adjustment between different systems
Constant time dilation factor

x0.5

Slice Time [NSDI’12]
Uses synchronizer to adjust speeds between VMs and
underlying emulated network

TTVM [ATC’05]
Support debugging with bw/fw navigation

4
Related work: network simulators
Pros:
more debuggability
No realtime constraint

Cons:
lack of functional realism

5
Motivation
Simulators Emulators

Improve the
functional realism of
simulators

Functional
Realism

While keeping timing
realism,
debuggability

Timing
Realism

Debuggability

6

Ours

-- ++

+

++ -/+ ++
+

-

+
Motivation
Simulators Emulators

Improve the
functional realism of
simulators

Functional
Realism

While keeping timing
realism,
debuggability

Timing
Realism

Debuggability

6

Ours

-- ++

+

++ -/+ ++
+

-

+
Our approach
Direct Code Execution
node#N

node#1
Applications

Network
stack

Functional Realism
Run real code

POSIX apps, kernel network stacks
Timing Realism

ns-3 integration (virtual clock)
Debuggability

all in userspace
single-process virtualization

7

Applications

Network
stack

DCE

Simulation Core
Process
Host
operating system
Hardware
DCE architecture
Application
(ip, iptables, quagga)

ns-3
applicati
on

POSIX layer

DCE
TCP UDP
Heap

Stack

memory

ICMP
Netfilter

Qdisc

IPSec

struct net_device

SCTP

IPv6

ARP

Netlink
Virtualization Core
layer

DCCP

IPv4
Bridging

Tunneling

bottom halves/rcu/
timer/interrupt

Kernel layer

ns-3 (network simulation core)

8

ns-3
TCP/IP
stack
1) Virtualization core layer
Run multiple nodes on a
single (host) process

Application
(ip, iptables, quagga)

dlmopen(3) etc.

Simulated Process

ns-3
applicati
on

POSIX layer

DCE
TCP UDP

isolation of global symbols
management of stacks/
heaps of simulated
processes

Heap

Stack

memory

ICMP

Qdisc

IPSec

struct net_device

SCTP

IPv6

ARP

Netfilter
Netlink

Virtualization Core
layer

DCCP

IPv4
Bridging

Tunneling

bottom halves/rcu/
timer/interrupt

Kernel layer

Keep ns-3 features
Timing Realism
Debuggability

ns-3 (network simulation core)

9

ns-3
TCP/IP
stack
2) Kernel layer (library operating system)
Functional Realism
Similar to Library OS
shared library (e.g., liblinux.so)
replaceable (e.g., libfreebsd.so)

Mapping via glue code

Application
(ip, iptables, quagga)

POSIX layer

DCE

struct net_device <=>
ns3:NetDevice
synchronize jiffies with
simulated clock

Architecture independent
code

TCP UDP
Heap

Stack

ICMP

DCCP
ARP

Netfilter

memory

Netlink
Virtualization Core
layer

IPv6

Qdisc

IPSec

struct net_device

SCTP
IPv4
Bridging

struct
net_device

jiffies/
gettimeofday()

Tunneling

bottom halves/rcu/
timer/interrupt

Synchronize

Kernel layer

ns3::NetDevice
network simulation core

minimize original code
modifications
10

Simulated
Clock
3) POSIX layer
Functional Realism
POSIX reimplementation
1. pass-through host library
call

Application
(ip, iptables, quagga)

ns-3
applicati
on

POSIX layer

DCE
TCP UDP
Heap

e.g., strcpy(3) => (reuse)

Stack

memory

ICMP

Virtualization Core
layer

Qdisc

IPSec

struct net_device

SCTP

IPv6

ARP

Netfilter
Netlink

2. reimplementation, if a
function call involves kernel
resource (i.e., system calls)

DCCP

IPv4
Bridging

Tunneling

bottom halves/rcu/
timer/interrupt

Kernel layer

redirect to our kernel module

ns-3 (network simulation core)

e.g., socket(2) => dce_socket()
11

ns-3
TCP/IP
stack
Use cases
Use cases

Reproducibility of an experiment
(functional realism)
How easy is it to debug a distributed
protocol ? (debuggability)

13
Reproducibility
LTE
iperf
(client)

Replicating the MPTCP
NSDI’12 experiment from
the literature

with
DCE + ns-3 (LTE/Wi-Fi)
Linux MPTCP (same s/w)
iperf

LTE
Pgw

iperf
(server)

Rx

Tx
Wi-Fi
AP

4
3.5
Average goodput (Mbps)

Goodput measurement
of TCP (3G), TCP (WiFi), MPTCP (both)

eNode
B

MPTCP
TCP over Wi-Fi
TCP over 3G

3
2.5
2
1.5
1
0.5
0
0.05

0.1
0.2
0.5
Receive/Send buffer size (Mbytes)

MPTCP used over real 3G and WiFi
14
Fu
Reproducibility (cont.d)
n
Fu

Average goodput (Mbps)

3.5

MPTCP
TCP over Wi-Fi
TCP over 3G

3
2.5
2
1.5
1

4
3.5
Average goodput (Mbps)

4

3

MPTCP
TCP over Wi-Fi
TCP over LTE

ct
l l y ion
Re al R
pr
ea
od lis
uc m
ibl
e

2.5
2
1.5
1

0.5

0.5

0

0

0.05

0.1
0.2
0.5
Receive/Send buffer size (Mbytes)

0.05
0.1
0.2
0.5
Receive/Send buffer size (Mbytes)

Replicate (w/ DCE)

Original (NSDI’12)

Differences
1) no significant goodput improvement with buffer size when DCE in single TCP
2) Max goodput range: 2.2 - 2.9Mbps (DCE) 2.0 - 3.2Mbps (NSDI)
15
Debuggability
Memory error detection
among distributed
nodes
in a single process

using Valgrind

http://valgrind.org/

==5864== Memcheck, a memory error detector
==5864== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et
al.
==5864== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for
copyright info
==5864== Command: ../build/bin/ns3test-dce-vdl --verbose
==5864==
==5864== Conditional jump or move depends on uninitialised
value(s)
==5864== at 0x7D5AE32: tcp_parse_options (tcp_input.c:3782)

==5864== by 0x7D65DCB: tcp_check_req (tcp_minisocks.c:532)
==5864== by 0x7D63B09: tcp_v4_hnd_req (tcp_ipv4.c:1496)
==5864== by 0x7D63CB4: tcp_v4_do_rcv (tcp_ipv4.c:1576)
==5864== by 0x7D6439C: tcp_v4_rcv (tcp_ipv4.c:1696)
==5864== by 0x7D447CC: ip_local_deliver_finish (ip_input.c:226)
==5864== by 0x7D442E4: ip_rcv_finish (dst.h:318)
==5864== by 0x7D2313F: process_backlog (dev.c:3368)
==5864== by 0x7D23455: net_rx_action (dev.c:3526)
==5864== by 0x7CF2477: do_softirq (softirq.c:65)
==5864== by 0x7CF2544: softirq_task_function (softirq.c:21)
==5864== by 0x4FA2BE1: ns3::TaskManager::Trampoline(void*) (taskmanager.cc:261)
==5864== Uninitialised value was created by a stack allocation
==5864== at 0x7D65B30: tcp_check_req (tcp_minisocks.c:522)

==5864==

16
Debuggability
Home Agent
AP1

Inspect codes during
experiments
among distributed
nodes
in a single process

using gdb
conditional breakpoint
with node id (in a
simulated network)
fully reproducible (to
easily catch a bug)

correspondent
node

ping6
AP2

Wi-Fi

Wi-Fi
handoff

mobile node

(gdb) b mip6_mh_filter if dce_debug_nodeid()==0
Breakpoint 1 at 0x7ffff287c569: file net/ipv6/mip6.c, line 88
<continue>
(gdb) bt 4
#0  mip6_mh_filter
(sk=0x7ffff7f69e10, skb=0x7ffff7cde8b0)
at net/ipv6/mip6.c:109
#1  0x00007ffff2831418 in ipv6_raw_deliver
(skb=0x7ffff7cde8b0, nexthdr=135)
at net/ipv6/raw.c:199
#2  0x00007ffff2831697 in raw6_local_deliver
(skb=0x7ffff7cde8b0, nexthdr=135)
at net/ipv6/raw.c:232
#3  0x00007ffff27e6068 in ip6_input_finish
(skb=0x7ffff7cde8b0)
at net/ipv6/ip6_input.c:197
17
Continuous Integration (CI)
Automated testing
among multiple nodes
code coverage
regression tests
w/ deterministic clock

Jenkins CI
Linux kernel testing
Userspace applications
18
Simulat Emulato
ors
rs

Conclusions

DCE

Functional
Realism

-- ++ +

Timing
Realism

++ -/+ ++

Debuggab
ility

DCE allows

+

-

Increased realism (functional/timing)
Full reproducibility (through
determinism)
Debuggability of protocol
implementations

Enable reproducible network experiments
19

+
Thank you
http://bit.ly/ns-3-dce
https://github.com/direct-code-execution
Backup Slides

21
Direct Code Execution
Insert real network code in simulators
Easy replication
Functional Realism (real code)
Timing Realism (time dilation)
Reproducibility (full control)
Scalability (slower execution, accurate
results)
Debuggability (single process)
22
How to use DCE ?
#!/usr/bin/python

Prepare binaries

from ns.dce import *
from ns.core import *

liblinux.so (from linux
tree+patch)
iperf (built with PIE
binnary)

nodes = NodeContainer()
nodes.Create (100)
dce = DceManagerHelper()
dce.SetNetworkStack ("liblinux.so");
dce.Install (nodes);
app = DceApplicationHelper()
app.SetBinary ("iperf")
app.Install (nodes)

Write a simulation script

Simulator.Stop (Seconds(1000.0))
Simulator.Run ()
26
Limitations of DCE
virtual clock vs real world
cannot interact with
can use wall-clock, but loose
reproducibility

low code generality
requires API-specific glue code (POSIX/
kernel)
27
Micro-benchmarks
DCE vs Mininet-HiFi
Settings
Xeon 2.8 GHz/8 GB
RAM
UDP socket program
Linear topology

1470 bytes/100Mbps
udp-perf
(client)

0

1) speed of packet
processing
2) scalability needed to
ensure realistic results
28

1

.......

udp-perf
(server)

n-1

n
udp-perf
(client)

0

1

16000
Mininet-HiFi
DCE

14000
12000
10000
8000
6000
4000
2000
0
0

4

8

16 24 48 64

.......
Number of sent/received packets (n)

Received packets per wall clock seconds (pps)

Micro-benchmarks
udp-perf
(server)

n

n-1

450000
400000
350000

Packet
Loss

300000
250000
200000
150000

Sent
Mininet Recv
DCE Recv

100000
50000
0
0

Number of Hops

4

8 16 24 32 48 56 64
Number of Hops

DCE achieves timing realism
29
Flexibility
Code coverage
as a metric of flexibility

Lines

Funcs

Branches

mptcp_ctrl.c

76.3%

86.7%

59.9%

mptcp_input.c

66.9%

85.0%

57.9%

mptcp_ipv4.c

68.0%

93.3%

43.8%

mptcp_ipv6.c

57.4%

85.0%

45.2%

mptcp_ofo_queue.c

91.2%

100.0%

89.2%

mptcp_output.c

71.2%

91.9%

58.6%

mptcp_pm.c

54.2%

71.4%

40.5%

Total

68.0%

85.9%

54.8%

Settings
mptcp_v0.86
DCE-ed test programs
(<1LoC)

Configuration of test
programs

simple 2 paths (ipv4 iperf)
dual-stack 2 paths (v6only,
v4/v6)
10 different packet loss rates

30
POSIX API Coverage
500
375
250
125
0
2009-09-04

2010-03-10

2011-05-20

31

2012-01-05

2013-04-09

Más contenido relacionado

La actualidad más candente

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
Kernel TLV
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
Jiannan Ouyang, PhD
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016]
IO Visor Project
 
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUsShoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Jiannan Ouyang, PhD
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
micchie
 

La actualidad más candente (20)

Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01
 
Network stack personality in Android phone - netdev 2.2
Network stack personality in Android phone - netdev 2.2Network stack personality in Android phone - netdev 2.2
Network stack personality in Android phone - netdev 2.2
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016]
 
Linux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use CasesLinux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use Cases
 
DPDK KNI interface
DPDK KNI interfaceDPDK KNI interface
DPDK KNI interface
 
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUsShoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
 
Netmap presentation
Netmap presentationNetmap presentation
Netmap presentation
 
Fun with FUSE
Fun with FUSEFun with FUSE
Fun with FUSE
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notification
 
Staging driver sins
Staging driver sinsStaging driver sins
Staging driver sins
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 

Destacado

Systemtap
SystemtapSystemtap
Systemtap
Feng Yu
 
DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit) DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit)
ymtech
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
Xiaozhe Wang
 
Motion Sensors + Audio Visual Performance
Motion Sensors + Audio Visual PerformanceMotion Sensors + Audio Visual Performance
Motion Sensors + Audio Visual Performance
SkyRonDotOrg
 

Destacado (20)

Ethernet and TCP optimizations
Ethernet and TCP optimizationsEthernet and TCP optimizations
Ethernet and TCP optimizations
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Kernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologiesKernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologies
 
Systemtap
SystemtapSystemtap
Systemtap
 
XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung
XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, SamsungXPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung
XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Basic socket programming
Basic socket programmingBasic socket programming
Basic socket programming
 
Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniques
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device Drivers
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit) DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit)
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracing
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
 
[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래[1A6]Docker로 보는 서버 운영의 미래
[1A6]Docker로 보는 서버 운영의 미래
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
 
Motion Sensors + Audio Visual Performance
Motion Sensors + Audio Visual PerformanceMotion Sensors + Audio Visual Performance
Motion Sensors + Audio Visual Performance
 
Järvinen: Koululaisten suunhoito-oppaat moniammatillisena yhteistyönä
Järvinen: Koululaisten suunhoito-oppaat moniammatillisena yhteistyönäJärvinen: Koululaisten suunhoito-oppaat moniammatillisena yhteistyönä
Järvinen: Koululaisten suunhoito-oppaat moniammatillisena yhteistyönä
 
Notam 30 07-15
Notam 30 07-15Notam 30 07-15
Notam 30 07-15
 

Similar a Direct Code Execution @ CoNEXT 2013

Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 

Similar a Direct Code Execution @ CoNEXT 2013 (20)

The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
 
Accelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACCAccelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACC
 
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemDCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
 
Machine-learning based performance heuristics for Runtime CPU/GPU Selection i...
Machine-learning based performance heuristics for Runtime CPU/GPU Selection i...Machine-learning based performance heuristics for Runtime CPU/GPU Selection i...
Machine-learning based performance heuristics for Runtime CPU/GPU Selection i...
 
Porting and optimizing UniFrac for GPUs
Porting and optimizing UniFrac for GPUsPorting and optimizing UniFrac for GPUs
Porting and optimizing UniFrac for GPUs
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
 
Hs java open_party
Hs java open_partyHs java open_party
Hs java open_party
 
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
 
Python twisted
Python twistedPython twisted
Python twisted
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Afanasov14flynet slides
Afanasov14flynet slidesAfanasov14flynet slides
Afanasov14flynet slides
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
 
Joblib: Lightweight pipelining for parallel jobs (v2)
Joblib:  Lightweight pipelining for parallel jobs (v2)Joblib:  Lightweight pipelining for parallel jobs (v2)
Joblib: Lightweight pipelining for parallel jobs (v2)
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
 
TiReX: Tiled Regular eXpression matching architecture
TiReX: Tiled Regular eXpression matching architectureTiReX: Tiled Regular eXpression matching architecture
TiReX: Tiled Regular eXpression matching architecture
 
Deep learning with kafka
Deep learning with kafkaDeep learning with kafka
Deep learning with kafka
 
Parallelism in a NumPy-based program
Parallelism in a NumPy-based programParallelism in a NumPy-based program
Parallelism in a NumPy-based program
 
Defense_Presentation
Defense_PresentationDefense_Presentation
Defense_Presentation
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Direct Code Execution @ CoNEXT 2013

  • 1. Direct Code Execution: Revisiting Library OS Architecture for Reproducible Network Experiments Hajime Tazaki (University of Tokyo, Japan), Frederic Urbani (INRIA, France), Emilio Mancini (INRIA, France), Mathieu Lacage (Alcmeon, France), Daniel Camara (INRIA, France), Thierry Turletti (INRIA, France), Walid Dabbous (INRIA, France) ACM CoNEXT 2013
  • 2. Our target: experimentation reproducibility Ideally one should be able to easily Verify published results (same scenario) Test and debug with other scenarios This requires functional/timing realism, debuggability 2 Proof the idea is good at the same condition Try to replicate Extends w an idea
  • 3. Related work: real time emulation Container Based Emulation provides lightweight virtualization Mininet-HiFi proposed in CoNEXT’12 ensures fidelity of experiments but : Timing realism still limited by hardware resources No debugging support 3
  • 4. Related work: virtual time Time Dilation [NSDI’06] Clock adjustment between different systems Constant time dilation factor x0.5 Slice Time [NSDI’12] Uses synchronizer to adjust speeds between VMs and underlying emulated network TTVM [ATC’05] Support debugging with bw/fw navigation 4
  • 5. Related work: network simulators Pros: more debuggability No realtime constraint Cons: lack of functional realism 5
  • 6. Motivation Simulators Emulators Improve the functional realism of simulators Functional Realism While keeping timing realism, debuggability Timing Realism Debuggability 6 Ours -- ++ + ++ -/+ ++ + - +
  • 7. Motivation Simulators Emulators Improve the functional realism of simulators Functional Realism While keeping timing realism, debuggability Timing Realism Debuggability 6 Ours -- ++ + ++ -/+ ++ + - +
  • 8. Our approach Direct Code Execution node#N node#1 Applications Network stack Functional Realism Run real code POSIX apps, kernel network stacks Timing Realism ns-3 integration (virtual clock) Debuggability all in userspace single-process virtualization 7 Applications Network stack DCE Simulation Core Process Host operating system Hardware
  • 9. DCE architecture Application (ip, iptables, quagga) ns-3 applicati on POSIX layer DCE TCP UDP Heap Stack memory ICMP Netfilter Qdisc IPSec struct net_device SCTP IPv6 ARP Netlink Virtualization Core layer DCCP IPv4 Bridging Tunneling bottom halves/rcu/ timer/interrupt Kernel layer ns-3 (network simulation core) 8 ns-3 TCP/IP stack
  • 10. 1) Virtualization core layer Run multiple nodes on a single (host) process Application (ip, iptables, quagga) dlmopen(3) etc. Simulated Process ns-3 applicati on POSIX layer DCE TCP UDP isolation of global symbols management of stacks/ heaps of simulated processes Heap Stack memory ICMP Qdisc IPSec struct net_device SCTP IPv6 ARP Netfilter Netlink Virtualization Core layer DCCP IPv4 Bridging Tunneling bottom halves/rcu/ timer/interrupt Kernel layer Keep ns-3 features Timing Realism Debuggability ns-3 (network simulation core) 9 ns-3 TCP/IP stack
  • 11. 2) Kernel layer (library operating system) Functional Realism Similar to Library OS shared library (e.g., liblinux.so) replaceable (e.g., libfreebsd.so) Mapping via glue code Application (ip, iptables, quagga) POSIX layer DCE struct net_device <=> ns3:NetDevice synchronize jiffies with simulated clock Architecture independent code TCP UDP Heap Stack ICMP DCCP ARP Netfilter memory Netlink Virtualization Core layer IPv6 Qdisc IPSec struct net_device SCTP IPv4 Bridging struct net_device jiffies/ gettimeofday() Tunneling bottom halves/rcu/ timer/interrupt Synchronize Kernel layer ns3::NetDevice network simulation core minimize original code modifications 10 Simulated Clock
  • 12. 3) POSIX layer Functional Realism POSIX reimplementation 1. pass-through host library call Application (ip, iptables, quagga) ns-3 applicati on POSIX layer DCE TCP UDP Heap e.g., strcpy(3) => (reuse) Stack memory ICMP Virtualization Core layer Qdisc IPSec struct net_device SCTP IPv6 ARP Netfilter Netlink 2. reimplementation, if a function call involves kernel resource (i.e., system calls) DCCP IPv4 Bridging Tunneling bottom halves/rcu/ timer/interrupt Kernel layer redirect to our kernel module ns-3 (network simulation core) e.g., socket(2) => dce_socket() 11 ns-3 TCP/IP stack
  • 14. Use cases Reproducibility of an experiment (functional realism) How easy is it to debug a distributed protocol ? (debuggability) 13
  • 15. Reproducibility LTE iperf (client) Replicating the MPTCP NSDI’12 experiment from the literature with DCE + ns-3 (LTE/Wi-Fi) Linux MPTCP (same s/w) iperf LTE Pgw iperf (server) Rx Tx Wi-Fi AP 4 3.5 Average goodput (Mbps) Goodput measurement of TCP (3G), TCP (WiFi), MPTCP (both) eNode B MPTCP TCP over Wi-Fi TCP over 3G 3 2.5 2 1.5 1 0.5 0 0.05 0.1 0.2 0.5 Receive/Send buffer size (Mbytes) MPTCP used over real 3G and WiFi 14
  • 16. Fu Reproducibility (cont.d) n Fu Average goodput (Mbps) 3.5 MPTCP TCP over Wi-Fi TCP over 3G 3 2.5 2 1.5 1 4 3.5 Average goodput (Mbps) 4 3 MPTCP TCP over Wi-Fi TCP over LTE ct l l y ion Re al R pr ea od lis uc m ibl e 2.5 2 1.5 1 0.5 0.5 0 0 0.05 0.1 0.2 0.5 Receive/Send buffer size (Mbytes) 0.05 0.1 0.2 0.5 Receive/Send buffer size (Mbytes) Replicate (w/ DCE) Original (NSDI’12) Differences 1) no significant goodput improvement with buffer size when DCE in single TCP 2) Max goodput range: 2.2 - 2.9Mbps (DCE) 2.0 - 3.2Mbps (NSDI) 15
  • 17. Debuggability Memory error detection among distributed nodes in a single process using Valgrind http://valgrind.org/ ==5864== Memcheck, a memory error detector ==5864== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==5864== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info ==5864== Command: ../build/bin/ns3test-dce-vdl --verbose ==5864== ==5864== Conditional jump or move depends on uninitialised value(s) ==5864== at 0x7D5AE32: tcp_parse_options (tcp_input.c:3782) ==5864== by 0x7D65DCB: tcp_check_req (tcp_minisocks.c:532) ==5864== by 0x7D63B09: tcp_v4_hnd_req (tcp_ipv4.c:1496) ==5864== by 0x7D63CB4: tcp_v4_do_rcv (tcp_ipv4.c:1576) ==5864== by 0x7D6439C: tcp_v4_rcv (tcp_ipv4.c:1696) ==5864== by 0x7D447CC: ip_local_deliver_finish (ip_input.c:226) ==5864== by 0x7D442E4: ip_rcv_finish (dst.h:318) ==5864== by 0x7D2313F: process_backlog (dev.c:3368) ==5864== by 0x7D23455: net_rx_action (dev.c:3526) ==5864== by 0x7CF2477: do_softirq (softirq.c:65) ==5864== by 0x7CF2544: softirq_task_function (softirq.c:21) ==5864== by 0x4FA2BE1: ns3::TaskManager::Trampoline(void*) (taskmanager.cc:261) ==5864== Uninitialised value was created by a stack allocation ==5864== at 0x7D65B30: tcp_check_req (tcp_minisocks.c:522) ==5864== 16
  • 18. Debuggability Home Agent AP1 Inspect codes during experiments among distributed nodes in a single process using gdb conditional breakpoint with node id (in a simulated network) fully reproducible (to easily catch a bug) correspondent node ping6 AP2 Wi-Fi Wi-Fi handoff mobile node (gdb) b mip6_mh_filter if dce_debug_nodeid()==0 Breakpoint 1 at 0x7ffff287c569: file net/ipv6/mip6.c, line 88 <continue> (gdb) bt 4 #0  mip6_mh_filter (sk=0x7ffff7f69e10, skb=0x7ffff7cde8b0) at net/ipv6/mip6.c:109 #1  0x00007ffff2831418 in ipv6_raw_deliver (skb=0x7ffff7cde8b0, nexthdr=135) at net/ipv6/raw.c:199 #2  0x00007ffff2831697 in raw6_local_deliver (skb=0x7ffff7cde8b0, nexthdr=135) at net/ipv6/raw.c:232 #3  0x00007ffff27e6068 in ip6_input_finish (skb=0x7ffff7cde8b0) at net/ipv6/ip6_input.c:197 17
  • 19. Continuous Integration (CI) Automated testing among multiple nodes code coverage regression tests w/ deterministic clock Jenkins CI Linux kernel testing Userspace applications 18
  • 20. Simulat Emulato ors rs Conclusions DCE Functional Realism -- ++ + Timing Realism ++ -/+ ++ Debuggab ility DCE allows + - Increased realism (functional/timing) Full reproducibility (through determinism) Debuggability of protocol implementations Enable reproducible network experiments 19 +
  • 23. Direct Code Execution Insert real network code in simulators Easy replication Functional Realism (real code) Timing Realism (time dilation) Reproducibility (full control) Scalability (slower execution, accurate results) Debuggability (single process) 22
  • 24. How to use DCE ? #!/usr/bin/python Prepare binaries from ns.dce import * from ns.core import * liblinux.so (from linux tree+patch) iperf (built with PIE binnary) nodes = NodeContainer() nodes.Create (100) dce = DceManagerHelper() dce.SetNetworkStack ("liblinux.so"); dce.Install (nodes); app = DceApplicationHelper() app.SetBinary ("iperf") app.Install (nodes) Write a simulation script Simulator.Stop (Seconds(1000.0)) Simulator.Run () 26
  • 25. Limitations of DCE virtual clock vs real world cannot interact with can use wall-clock, but loose reproducibility low code generality requires API-specific glue code (POSIX/ kernel) 27
  • 26. Micro-benchmarks DCE vs Mininet-HiFi Settings Xeon 2.8 GHz/8 GB RAM UDP socket program Linear topology 1470 bytes/100Mbps udp-perf (client) 0 1) speed of packet processing 2) scalability needed to ensure realistic results 28 1 ....... udp-perf (server) n-1 n
  • 27. udp-perf (client) 0 1 16000 Mininet-HiFi DCE 14000 12000 10000 8000 6000 4000 2000 0 0 4 8 16 24 48 64 ....... Number of sent/received packets (n) Received packets per wall clock seconds (pps) Micro-benchmarks udp-perf (server) n n-1 450000 400000 350000 Packet Loss 300000 250000 200000 150000 Sent Mininet Recv DCE Recv 100000 50000 0 0 Number of Hops 4 8 16 24 32 48 56 64 Number of Hops DCE achieves timing realism 29
  • 28. Flexibility Code coverage as a metric of flexibility Lines Funcs Branches mptcp_ctrl.c 76.3% 86.7% 59.9% mptcp_input.c 66.9% 85.0% 57.9% mptcp_ipv4.c 68.0% 93.3% 43.8% mptcp_ipv6.c 57.4% 85.0% 45.2% mptcp_ofo_queue.c 91.2% 100.0% 89.2% mptcp_output.c 71.2% 91.9% 58.6% mptcp_pm.c 54.2% 71.4% 40.5% Total 68.0% 85.9% 54.8% Settings mptcp_v0.86 DCE-ed test programs (<1LoC) Configuration of test programs simple 2 paths (ipv4 iperf) dual-stack 2 paths (v6only, v4/v6) 10 different packet loss rates 30