removed ifpps as std tool
[ana-net.git] / doc / papers / ancs2011 / epics.tex
blobb9bc251a94fb393eea81935360b545236bded90b
1 % This is "sig-alternate.tex" V1.9 April 2009
2 % This file should be compiled with V2.4 of "sig-alternate.cls" April 2009
4 % This example file demonstrates the use of the 'sig-alternate.cls'
5 % V2.4 LaTeX2e document class file. It is for those submitting
6 % articles to ACM Conference Proceedings WHO DO NOT WISH TO
7 % STRICTLY ADHERE TO THE SIGS (PUBS-BOARD-ENDORSED) STYLE.
8 % The 'sig-alternate.cls' file will produce a similar-looking,
9 % albeit, 'tighter' paper resulting in, invariably, fewer pages.
11 % ----------------------------------------------------------------------------------------------------------------
12 % This .tex file (and associated .cls V2.4) produces:
13 % 1) The Permission Statement
14 % 2) The Conference (location) Info information
15 % 3) The Copyright Line with ACM data
16 % 4) NO page numbers
18 % as against the acm_proc_article-sp.cls file which
19 % DOES NOT produce 1) thru' 3) above.
21 % Using 'sig-alternate.cls' you have control, however, from within
22 % the source .tex file, over both the CopyrightYear
23 % (defaulted to 200X) and the ACM Copyright Data
24 % (defaulted to X-XXXXX-XX-X/XX/XX).
25 % e.g.
26 % \CopyrightYear{2007} will cause 2007 to appear in the copyright line.
27 % \crdata{0-12345-67-8/90/12} will cause 0-12345-67-8/90/12 to appear in the copyright line.
29 % ---------------------------------------------------------------------------------------------------------------
30 % This .tex source is an example which *does* use
31 % the .bib file (from which the .bbl file % is produced).
32 % REMEMBER HOWEVER: After having produced the .bbl file,
33 % and prior to final submission, you *NEED* to 'insert'
34 % your .bbl file into your source .tex file so as to provide
35 % ONE 'self-contained' source file.
37 % ================= IF YOU HAVE QUESTIONS =======================
38 % Questions regarding the SIGS styles, SIGS policies and
39 % procedures, Conferences etc. should be sent to
40 % Adrienne Griscti (griscti@acm.org)
42 % Technical questions _only_ to
43 % Gerald Murray (murray@hq.acm.org)
44 % ===============================================================
46 % For tracking purposes - this is V1.9 - April 2009
48 \documentclass{sig-alternate}
49 \usepackage{paralist}
50 \usepackage{color}
51 \newcommand{\wolfgang}[1]{\textcolor{blue}{\emph{WM: #1}}}
52 \newcommand{\ariane}[1]{\textcolor{green}{\emph{AK: #1}}}
54 \usepackage{url}
55 \begin{document}
57 % --- Author Metadata here ---
58 \conferenceinfo{ANCS}{2011 Brooklyn, New York, USA}
59 %\CopyrightYear{2007} % Allows default copyright year (20XX) to be over-ridden - IF NEED BE.
60 %\crdata{0-12345-67-8/90/01} % Allows default copyright data (0-89791-88-6/97/05) to be over-ridden - IF NEED BE.
61 % --- End of Author Metadata ---
63 \title{Efficient Implementation of Dynamic Protocol Stacks in Linux}
64 % in Linux\wolfgang{title is ok, but could be more trendy ... I'll think about it}}
67 % You need the command \numberofauthors to handle the 'placement
68 % and alignment' of the authors beneath the title.
70 % For aesthetic reasons, we recommend 'three authors at a time'
71 % i.e. three 'name/affiliation blocks' be placed beneath the title.
73 % NOTE: You are NOT restricted in how many 'rows' of
74 % "name/affiliations" may appear. We just ask that you restrict
75 % the number of 'columns' to three.
77 % Because of the available 'opening page real-estate'
78 % we ask you to refrain from putting more than six authors
79 % (two rows with three columns) beneath the article title.
80 % More than six makes the first-page appear very cluttered indeed.
82 % Use the \alignauthor commands to handle the names
83 % and affiliations for an 'aesthetic maximum' of six authors.
84 % Add names, affiliations, addresses for
85 % the seventh etc. author(s) as the argument for the
86 % \additionalauthors command.
87 % These 'additional authors' will be output/set for you
88 % without further effort on your part as the last section in
89 % the body of your article BEFORE References or any Appendices.
91 \numberofauthors{3} % in this sample file, there are a *total*
92 % of EIGHT authors. SIX appear on the 'first-page' (for formatting
93 % reasons) and the remaining two appear in the \additionalauthors section.
95 \author{
96 % You can go ahead and credit any number of authors here,
97 % e.g. one 'row of three' or two rows (consisting of one row of three
98 % and a second row of one, two or three).
100 % The command \alignauthor (no curly braces needed) should
101 % precede each author name, affiliation/snail-mail address and
102 % e-mail address. Additionally, tag each line of
103 % affiliation/address with \affaddr, and tag the
104 % e-mail address with \email.
106 % 1st. author
107 \alignauthor
108 Ariane Keller\\
109 \affaddr{ETH Zurich, Switzerland}\\
110 \email{ariane.keller@tik.ee.ethz.ch}
111 % 2nd. author
112 \alignauthor
113 Daniel Borkmann\\
114 \affaddr{ETH Zurich, Switzerland}\\
115 \affaddr{HTWK Leipzig, Germany}\\
116 \email{dborkma@tik.ee.ethz.ch}
117 % 3rd. author
118 \alignauthor
119 Wolfgang M{\"u}hlbauer\\
120 \affaddr{ETH Zurich, Switzerland}\\
121 \email{muehlbauer@tik.ee.ethz.ch}
122 %\and % use '\and' if you need 'another row' of author names
124 % There's nothing stopping you putting the seventh, eighth, etc.
125 % author on the opening page (as the 'third row') but we ask,
126 % for aesthetic reasons that you place these 'additional authors'
127 % in the \additional authors block, viz.
128 \date{30 July 2011}
129 % Just remember to make sure that the TOTAL number of authors
130 % is the number that will appear on the first page PLUS the
131 % number that will appear in the \additionalauthors section.
133 \maketitle
134 \begin{abstract}
136 %\wolfgang{I tried to think about an abstract, see next paragraph. Feel free to change ... It's a little bit long, but first sentence can be dropped, etc. Maybe, it's also useful for the intro}
137 %Beyond doubt, the Internet has grown out of its infancy. Yet,
138 Network programming is widely understood as programming strictly defined socket
139 interfaces. Only some frameworks (e.g., ANA, Click, Active Networking) have made a step
140 towards \emph{real} network programming by decomposing networking functionality
141 into small modular blocks that can be assembled in a flexible manner. In this
142 paper, we tackle the challenge of accommodating 3 partially conflicting
143 objectives: (i) high flexibility for network programmers and network
144 application designers, (ii) re-configuration of the network stack at runtime,
145 and (iii) high packet forwarding rates. First experiences with a prototype
146 implementation suggest little performance overhead compared to the standard
147 Linux protocol stack.
148 \end{abstract}
150 % A category with the (minimum) three required fields
151 %\category{H.4}{Information Systems Applications}{Miscellaneous}
152 %A category including the fourth, optional field follows...
153 %\category{D.2.8}{Software Engineering}{Metrics}[complexity measures, performance measures]
155 %\terms{Theory}
157 %\keywords{ACM proceedings, \LaTeX, text tagging}
159 \section{Introduction}
161 Beyond doubt, the Internet has grown out of its infancy. A huge variety of networked applications and a diverse range of protocols are available, ranging from protocols for the communication over fibre, cat5 or over the air to protocols supporting specific applications such as p2p, web or voIP. However, the architecture is not designed to also allow for an easy integration of new protocols between these two layers. We argue that an architecture that would not limit innovation to the outer layers would give the Internet another boost.
162 \ariane{should also motivate runtime here.}
164 Some research with this goal was already done in active networking \cite{ANSurvey2}, with the Click modular router \cite{click} or with openflow \cite{openflow}. However, none of the available implementations fulfils the following three partially conflicting objectives.
165 %The fast speed of the growth of the Internet and the huge effect on everyday life could lead to the thought that it is perfectly designed and nothing should be changed on the underlying architecture. However, researcher are working continuously on new protocols that improve the communication performance for different communication scenarios. Be it in the area of routing, transport or completely new network architectures. The evaluation of such protocols has shown to be difficult as simulations are not realistic enough and as it is difficult to change anything in standard operating systems protocol stacks. To overcome this difficulty some environments dedicated for testing were built, for example Click \cite{click} and openflow \cite{openflow} in the routing area or NetFPGA \cite{netFPGA} for the evaluation of hardware implementations. None of these platforms is specifically designed for evaluating protocols on the end nodes and none of these platforms are designed for an adaptation of the protocol stack at run time. In this paper we present the architecture of a framework that is designed for the following three goals.
166 \begin{compactenum}
167 %\item Provide a platform in which it is easy to test new protocols on end nodes. In order to simplify testing further it should not require any specialized hardware.
168 \item Simple integration and testing of new protocols on end nodes on all layers of the protocol stack.
169 \item Runtime reconfiguration of the protocol stack in order to allow for even bigger flexibility.
170 \item High performance packet forwarding rate.
171 %\item Provide a platform that imposes as little overhead as possible. This is required that the evaluation of new protocols delivers meaningful results.
172 %\item Provide a platform which allows us to continuously optimize the protocol stack. This is especially useful in mobile scenarios where network characteristics such as delay or packet loss change frequently. Being able to use a protocol optimized for the given network characteristics might improve the connection quality drastically.
173 \end{compactenum}
175 Therefore we propose another architecture that was designed with those three goals in mind.
176 The architecture is based on the ideas of the \textit{Autonomic Network Architecture (ANA)}. \cite{ANAJournal}. In ANA network functionality is divided into functional blocks that can be combined as required. Each functional block implements a protocol such as \textit{ip, udp, encryption, content centric routing, etc.} ANA does not impose any protocols to be used other than Ethernet, rather it provides a framework that allows for the flexible composition and recomposition of functional blocks to a protocol stack. This allows for the experimentation with protocol stacks that are not known by todays standard operating system and it allows for the optimization of the protocol stack at runtime without communication tear down or application support.
177 The existing implementation of ANA shows the feasibility of such a flexible architecture but it suffers sever performance issues.
178 In this paper we present the \textit{Lightweight Autonomic Network Architecture (LANA)}. It allows for a similar functionality than ANA but demonstrates that flexibility does not have to come at the cost of reduced performance.
182 \section{LANA}
185 %\wolfgang{quickly say first why you propose another architecture; e.g., Click configuration if an kernel cannot be changed at runtime or not happy with Ana's performance; it should be come clear that we try to accommodate conflicting objectives, see my abstract}
186 %LANA provides a framework for setting up protocol stacks not known by todays standard operating systems. Within LANA it is also possible to change the protocol stack at runtime, without communication teardown or application support. These properties build the basis for a networking system that provides protocol stacks that are better targeted to a networking situation than the well known TCP/IP protocol stack.
188 %LANA provides a framework for setting up protocol stacks not known by
189 %todays standard operating systems. Within LANA it is also possible to
190 %change the protocol stack at runtime, without communication teardown or
191 %application support. These properties build the basis for a networking
192 %system that provides protocol stacks that are better targeted to a
193 %networking situation than the well known TCP/IP protocol stack.
195 Generally, the LANA network system is built similarly to the network system of the Linux kernel.
196 Applications can send and transmit packets via the BSD socket interface and the actual packet processing is done in a \textit{packet processing engine (PPE)} in the kernel space.
197 The hardware and device drivers interfaces are hidden from the PPE behind a \textit{virtual link interface}. This allows for a simple integration of different underlaying networking technologies such as Ethernet, Bluetooth or InfiniBand. Additionally, virtual link interface devices are represented as usual kernel networking devices and can be managed with standard tools such as \texttt{ifconfig} or \texttt{ethtool}.
199 Each functional block is implemented as a Linux kernel module. It offers a \textit{receive function} that is registered with the PPE upon module insertion.
200 A functional block can either drop a packet, forward a packet to either ingress or egress direction or duplicate a packet. After having processed the packet it returns the identifier of the next functional block that should process this packet. In addition functional blocks belonging to the virtual link interface will queue the packets in the network drivers transmit queue and functional blocks communicating with BSD sockets will queue the packets in the sockets receive queue.
202 The PPE is responsible for calling one functional block after the other and for queuing packets that need to be processed.
204 %Data is transmitted between the functional blocks by function calls and is
205 %therefore not being copied between functional blocks.
206 % A network packet is
207 %processed by the LANAs packet processing engine, which calls receive handlers
208 %of functional blocks that are bound to each other in the processing path. Data is then
209 %either forwarded to the subsequent functional block or discarded. A certain
210 %path can be traversed in ingress or egress direction, thus functional
211 %blocks can also flip the packets direction within the packet processing engine.
212 %Moreover, the packet processing engine has per-CPU backlog queues so that
213 %functional blocks which spawn new network packets can enqueue the like for
214 %processing.
216 %There are two special functional blocks - those of the virtual link interfaces
217 %communicating with a network driver and those communicating with BSD sockets.
218 %These functional blocks push network packets either in the drivers transmit
219 %queue or in the sockets receive queue.
221 \begin{figure}
222 \centering
223 \includegraphics[width=0.47\textwidth]{figures/architecture.pdf}
224 %\epsfig{file=fly.eps}
225 \caption{LANA architecture}
226 \label{fig:architecture}
227 \end{figure}
229 %\begin{figure}
230 %\centering
231 %\includegraphics[width=0.4\textwidth]{figures/stack.pdf}
232 %\caption{Lana protocol stack showing in which contex which functionality is implemented}
233 %\label{fig:stack}
234 %\end{figure}
236 \subsection{Configuration Interface}
237 The protocol stack can be configured from user space with the help of a
238 command line tool. The most important commands are summarized below.
239 \begin{compactitem}
240 \item \texttt{add}, \texttt{rm}: Adds (removes) a functional block from the
241 list of available functional blocks in the kernel.
242 \item \texttt{set}: sets specific properties of a functional block with a
243 \texttt{key=value} semantic
244 \item \texttt{bind}, \texttt{unbind}: Binds (unbinds) a functional block
245 to another in order to be able to send messages to it.
246 \item \texttt{replace}: Replaces one functional block with another
247 functional block. The connections between the blocks are maintained.
248 Private data can either be transferred to the new block or dropped.
249 \item \texttt{subscribe}, \texttt{unsubscribe}: Subscribes (Unsubscribes) one
250 functional block to receive event messages from another functional block.
251 % (An implicit subscribtion (unsubscribtion) is done on bind (unbind).)
252 \end{compactitem}
253 Within the Linux kernel the notification chain framework is used to propagate those configuration messages to the individual functional blocks. This framework is also used to distribute other, internal, configuration messages.
255 \subsection{Improving the Performance}
256 We have evaluated different possibilities for the integration of the PPE with the
257 Linux kernel. We summarize our insights to provide guidance for researchers that have to do fundamental changes on the Linux protocol stack.
259 We compared the maximum packet reception rate of the Linux kernel while not doing any packet processing with our architecture. Here packets are forwarded between three functional blocks that do only packet forwarding.
261 %Our goal was to be able to process as many \textit{minimum sized Ethernet frames}
262 %as the Linux kernel is able to process. In order to compare the performance of
263 %the Linux Kernel and the performance of our engine we have bypassed all packets
264 %from the Linux Kernel protocol stack into the LANA stack via a
265 %\texttt{netdev\_rx\_handler} in bottom half context as soon as they arrived.
267 %In our system the packets were processed by the \texttt{fb\_eth} functional
268 %block followed by two \texttt{fb\_dummy} functional blocks that were simply
269 %forwarding the packets. We can distinguish the following three approaches:
270 \begin{compactitem}
271 \item One high priority LANA thread per CPU achieves approx. half the performance of the default stack. The performance degradation is due to 'starvation' of the software interrupt handler (ksoftirqd). Changing the priority of the LANA thread only slightly increases the throughput (since the ksoftirqd is a low-priority thread).
272 \item Explicit preemption and scheduling control achieves approx. two third of the performance of the default stack. The performance is still reduced by scheduling overhead.
273 \item Execution of the PPE in ksoftirqd context. This approach achieves
274 approximately $95\%$ of the performance of the Linux kernel.
275 \end{compactitem}
277 The corresponding numbers are listed in Table \ref{tab:performance}.
278 \begin{table}[htb]
279 \begin{tabular}{ l r }
280 Mechanism & Performance\\
281 \hline
282 Dedicated kernel thread (high priority) & 700.000\\
283 Dedicated kernel thread (normal priority) & 750.000\\
284 Dedicated kernel thread (controlled scheduling) & 900.000\\
285 Execution in ksoftirqd & 1.300.000\\
286 Linux kernel networking stack & 1.380.000\\
287 \end{tabular}
288 \caption{Performance evaluation in pps with 64 Byte packets.
289 % The evaluation was done with the kernel packet generator \texttt{pktgen} on two directly
290 %connected machines with
291 (Intel Core 2 Quad Q6600 with 2.40GHz, 4GB RAM, Intel 82566DC-2 NIC, Linux 3.0rc1)}
292 \label{tab:performance}
293 \end{table}
295 \subsection{Software Available}
296 The current sofware is available under the GNU General Public License from
297 \cite{lana}. In addition to the framework it also includes four functional
298 blocks: Ethernet, Berkeley Packet Filter, Tee (duplication of packets), Packet
299 Counter and Forward (an empty block that just forwards the packets to
300 another block). The framework does not need any patching of the Linux kernel
301 but it requires a new Linux 3.X kernel.
303 \section{Conclusions and Future Work}
304 We have shown that it is possible to implement a flexible protocol stack that has a similar performance than the default protocol stack in the Linux kernel. The flexibility allows for the easy inclusion of new, still to be developed protocols and for the change of the protocol stack at runtime. Both might lead to a protocol stack that is better suited for a given networking situation than the well known TCP/IP protocol stack.
305 %to include for example compression or encryption as the networking conditions change.
307 In the short-term we will compare the performance of our system with the performance of other systems (e.g., default Linux stack, Click router, etc.).
308 In the mid-term we will work on mechanisms that automatically configures protocol stacks based on the applications as well as the networks needs.
309 %Applications will characterize which properties a communication channel should have and monitoring elements will provide information about the network. A controller will be responsible for negotiating a protocol stack with a peer and for setting up the protocol stack on the local node.
310 The end goal will be to have a networked system that requires less configuration as compared to todays networks and that is able to adapt itself to changing network conditions.
314 %In the midterm we will develop a mechanism that automatically sets up a protocol stack for an Application whereby the Application can specify some characteristics the communication channel should have, but not exactly how this has to be achieved. For example the application could require a "reliable communication channel" and a controller would choose between different protocols that provide reliability (e.g., one for wired communication, one for wireless communication, one for wireless, multi-hop communication). The setup of the protocol stack will have to be negotiated between the source and destination node.
316 %\end{document} % This is where a 'short' article might terminate
318 %ACKNOWLEDGMENTS are optional
319 \section{Acknowledgments}
320 The research leading to these results has received funding from the European Union Seventh Framework Programme under grant agreement $n^o 257906$.
322 % The following two commands are all you need in the
323 % initial runs of your .tex file to
324 % produce the bibliography for the citations in your paper.
325 \bibliographystyle{abbrv}
326 \bibliography{epics} % sigproc.bib is the name of the Bibliography in this case
327 % You must have a proper ".bib" file
328 % and remember to run:
329 % latex bibtex latex latex
330 % to resolve all references
332 % ACM needs 'a single self-contained file'!
334 %APPENDICES are optional
335 %\balancecolumns
336 \end{document}