source: docs/HPCA2012/01-intro.tex @ 1404

Last change on this file since 1404 was 1404, checked in by ashriram, 8 years ago
File size: 10.0 KB
2Classical Dennard voltage scaling enabled us to keep all of transistors
3afforded by Moore's law active. Dennard scaling reached its limits in
42005 and this has resulted in a rethink of the way general-purpose
5processors are built: frequencies have remained stagnant
6over the last 5 years with the capability to boost a core's frequency
7only if other cores on the chip are shut off. Chip makers strive to
8achieve energy efficient computing by operating at more optimal core
9frequencies and aim to increase performance with a larger number of
10cores. Unfortunately, given the limited levels of parallelism that can
11be found in applications~\cite{blake-isca-2010}, it is not certain how
12many cores can be productively used in scaling our
13chips~\cite{esmaeilzadeh-isca-2011}. This is because exploiting
14parallelism across multiple cores tends to require heavy weight
15threads that are difficult to manage and synchronize.
17The desire to improve the overall efficiency of computing is pushing
18designers to explore customized hardware~\cite{venkatesh-asplos-2010,
19  hameed-isca-2010} that accelerate specific parts of an application
20while reducing the overheads present in general-purpose
21processors. They seek to exploit the transistor bounty to provision
22many different accelerators and keep only the accelerators needed for
23an application active while switching off others on the chip to save
24power consumption. While promising, given the fast evolution of
25languages and software, its hard to define a set of fixed-function
26hardware for commodity processors. Furthermore, the toolchain to
27create such customized hardware is itself a hard research
28challenge. We believe that software, applications, and runtime models
29themselves can be refactored to significantly improve the overall
30computing efficiency of commodity processors.
32In this paper we tackle the infamous ``thirteenth dwarf''
33(parsers/finite state machines) that is considered to be the hardest
34application class to parallelize~\cite{Asanovic:EECS-2006-183}. We
35present Parabix, a novel execution framework and software run-time
36environment that can be used to dramatically improve the efficiency of
37text processing and parsing on commodity processors.  Parabix
38transposes byte-oriented character data into parallel bit streams and
39then exploits the SIMD extensions on commodity processors (SSE/AVX on
40x86, Neon on ARM) to process hundreds of character positions in an
41input stream simultaneously.  To achieve transposition, Parabix
42exploits sophisticated SIMD instructions that enable data elements to
43be packed and unpacked from registers in a regular manner which
44improves the overall cache access behavior of the application
45resulting in significantly fewer misses and better utilization.
46Parabix also dramatically reduces branches in parsing code resulting
47in a more efficient pipeline and substantially improves register/cache
48utilization which minimizes energy wasted on data transfers.
50We apply Parabix technology to the problem of XML parsing.  XML is a
51standard of the web consortium that provides a common framework for
52encoding and communicating data.  XML provides critical data storage
53for applications ranging from Office Open XML in Microsoft Office to
54NDFD XML of the NOAA National Weather Service, from KML in Google
55Earth to Castor XML in the Martian Rovers.  XML parsing efficiency is
56important for multiple application areas; in server workloads the key
57focus in on overall transactions per second, while in applications in
58network switches and cell phones, latency and energy are of paramount
59importance.  Traditional software-based XML parsers have many
60inefficiencies including considerable branch misprediction penalties
61due to complex input-dependent branching structures as well as poor
62use of memory bandwidth and data caches due to byte-at-a-time
63processing and multiple buffering.  XML ASIC chips have been around
64for over 6 years, but typically lag behind CPUs in technology due to
65cost constraints. Our focus is how much we can improve performance of
66the XML parser on commodity processors with Parabix technology.
68In the end, as summarized by
69Figure~\ref{perf-energy} our Parabix-based XML parser improves the
70performance %by ?$\times$
71and energy efficiency %by ?$\times$
72several-fold compared
73to widely-used software parsers, approaching the
75performance of ASIC XML
77\footnote{The actual energy consumption of the XML
78  ASIC chips is not published by the companies.}
80Overall we make the following contributions in this paper.
821) We outline the Parabix architecture, tool chain and run-time
83environment and describe how it may be used to produce efficient
84XML parser implementations on a variety of commodity processors.
85While studied in the context of XML parsing, the Parabix framework
86can be widely applied to many problems in text processing and
892) We compare Parabix XML parsers against conventional parsers and
90assess the improvement in overall performance and energy efficiency on
91each platform.  We are the first to compare and contrast SSE/AVX
92extensions across multiple generation of Intel processors and show
93that there are performance challenges when using newer generation SIMD
94extensions. We compare the ARM Neon extensions against the x86 SIMD
95extensions and comment on the latency of SIMD operations across these
983) Finally, building on the SIMD parallelism of Parabix technology,
99we multithread the Parabix XML parser to to enable the different
100stages in the parser to exploit SIMD units across all the cores.
101This further improves performance while maintaining the energy consumption
102constant with the sequential version.
106Figure~\ref{perf-energy} is an energy-performance scatter plot showing
107the results obtained.
110With all this XML processing, a substantial literature has arisen
111addressing XML processing performance in general and the performance
112of XML parsers in particular.  Nicola and John specifically identified
113XML parsing as a threat to database performance and outlined a number
114of potential directions for potential performance improvements
115\cite{NicolaJohn03}.  The nature of XML APIs was found to have a
116significant affect on performance with event-based SAX (Simple API for
117XML) parsers avoiding the tree construction costs of the more flexible
118DOM (Document Object Model) parsers \cite{Perkins05}.  The commercial
119importance of XML parsing spurred developments of hardware-based
120approaches including the development of a custom XML chip
121\cite{Leventhal2009} as well as FPGA-based implementations
122\cite{DaiNiZhu2010}.  However promising these approaches may be for
123particular niche applications, it is likely that the bulk of the
124world's XML processing workload will be carried out on commodity
125processors using software-based solutions.
127To accelerate XML parsing performance in software, most recent
128work has focused on parallelization.  The use of multicore
129parallelism for chip multiprocessors has attracted
130the attention of several groups \cite{ZhangPanChiu09, ParaDOM2009, LiWangLiuLi2009},
131while SIMD (Single Instruction Multiple Data) parallelism
132has been of interest to Intel in designing new SIMD instructions\cite{XMLSSE42}
133, as well as to the developers of parallel bit stream technology
135Each of these approaches has shown considerable performance
136benefits over traditional sequential parsing techniques that follow the
137byte-at-a-time model.
146\caption{XML Parser Technology Energy vs. Performance}
150The remainder of this paper is organized as follows.
151Section~\ref{section:background} presents background material on XML
152parsing and provides insight into the inefficiency of traditional
153parsers on mainstream processors.  Section~\ref{section:parabix}
154describes the Parabix architecture, tool chain and run-time
155environment.  Section~\ref{section:parser} describes the application
156of the Parabix framework to the construction of an XML parser
157enforcing all the well-formedness rules of the XML specification.
158Section~\ref{section:baseline} presents a detailed performance
159analysis of Parabix on a \CITHREE\ system using hardware performance
160counters and compares it against conventional parsers.
161Section~\ref{section:scalability} compares the performance and energy
162efficiency of 128 bit SIMD extensions across three generations of
163intel processors and includes a comparison with the ARM Cortex-A8
164processor.  Section~\ref{section:avx} examines the Intel's new 256-bit
165AVX technology and comments on the benefits and challenges compared to
166the 128-bit SSE instructions.  Finally,
167Section~\ref{section:multithread} looks at the multithreading of the
168Parabix XML parser which seeks to exploit the SIMD units scattered
169across multiple cores.
174%One area in which both servers and mobile devices devote considerable
175%computational effort into is in the processing of Extensible Markup
176%Language (XML) documents.  It was predicted that corporate servers
177%would see a ``growth in XML traffic\ldots from 15\% [of overall
178%network traffic] in 2004 to just under 48\% by 2008''
179%\cite{coyle2005}.  Further, ``from the point of view of server
180%efficiency[,] XML\ldots is the closest thing there is to a ubiquitous
181%computing workload'' \cite{leventhal2009}.  In other words, XML is the
182%quickly becoming the backbone of most server/server and client/server
183%%information exchanges.  Similarly, there is growing interest in the
184%use of mobile web services for personalization, context-awareness, and
185%content-adaptation of mobile web sites---most of which rely on XML
186%\cite{canali2009}.  Whether the end user realizes it or not, XML is
187%part of their daily life.
189%Why are XML parsers important ?
190%Talk about XML parsers and what they do in general.
191%Brief few lines about byte-at-time ?
192%What's new with Parabix style approach ?
193%Introduce Parabix1 and Parabix2 ?
194%Present overall quantiative improvements compared to other parsers.
Note: See TracBrowser for help on using the repository browser.