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

Last change on this file since 1405 was 1405, checked in by ashriram, 8 years ago

xml chip ref

File size: 10.1 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 transform character-oriented data into
42bit streams Parabix exploits sophisticated SIMD instructions that
43enable data elements to be packed into registers. This improves the
44overall cache behavior of the application resulting in significantly
45fewer misses and better utilization.  Parabix also dramatically
46reduces branches in the parsing routines resulting in a more efficient
47pipeline and substantially improves register utilization which
48minimizes 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.  Conventional 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 caches and memory bandwidth due to byte-at-a-time
63processing.  XML ASIC chips have been around since early 2003, but typically lag behind CPUs in technology due to
64cost constraints~\cite{xmlchip}. They also focus mainly on speeding up the parser
65computation itself and are limited by the poor memory behavior
66Our focus is how much we can improve performance of
67the XML parser on commodity processors with Parabix technology.
70Figure~\ref{perf-energy} showcases the overall efficiency of our
71framework. The Parabix-XML parser improves the
72performance %by ?$\times$
73and energy efficiency %by ?$\times$
74several-fold compared
75to widely-used software parsers, approaching the
77performance of ASIC XML
79\footnote{The actual energy consumption of the XML
80  ASIC chips is not published by the companies.}
82Overall we make the following contributions in this paper.
841) We outline the Parabix architecture, tool chain and run-time
85environment and describe how it may be used to produce efficient
86XML parser implementations on a variety of commodity processors.
87While studied in the context of XML parsing, the Parabix framework
88can be widely applied to many problems in text processing and
912) We compare Parabix XML parsers against conventional parsers and
92assess the improvement in overall performance and energy efficiency on
93each platform.  We are the first to compare and contrast SSE/AVX
94extensions across multiple generation of Intel processors and show
95that there are performance challenges when using newer generation SIMD
96extensions. We compare the ARM Neon extensions against the x86 SIMD
97extensions and comment on the latency of SIMD operations across these
1003) Finally, building on the SIMD parallelism of Parabix technology,
101we multithread the Parabix XML parser to to enable the different
102stages in the parser to exploit SIMD units across all the cores.
103This further improves performance while maintaining the energy consumption
104constant with the sequential version.
108Figure~\ref{perf-energy} is an energy-performance scatter plot showing
109the results obtained.
112With all this XML processing, a substantial literature has arisen
113addressing XML processing performance in general and the performance
114of XML parsers in particular.  Nicola and John specifically identified
115XML parsing as a threat to database performance and outlined a number
116of potential directions for potential performance improvements
117\cite{NicolaJohn03}.  The nature of XML APIs was found to have a
118significant affect on performance with event-based SAX (Simple API for
119XML) parsers avoiding the tree construction costs of the more flexible
120DOM (Document Object Model) parsers \cite{Perkins05}.  The commercial
121importance of XML parsing spurred developments of hardware-based
122approaches including the development of a custom XML chip
123\cite{Leventhal2009} as well as FPGA-based implementations
124\cite{DaiNiZhu2010}.  However promising these approaches may be for
125particular niche applications, it is likely that the bulk of the
126world's XML processing workload will be carried out on commodity
127processors using software-based solutions.
129To accelerate XML parsing performance in software, most recent
130work has focused on parallelization.  The use of multicore
131parallelism for chip multiprocessors has attracted
132the attention of several groups \cite{ZhangPanChiu09, ParaDOM2009, LiWangLiuLi2009},
133while SIMD (Single Instruction Multiple Data) parallelism
134has been of interest to Intel in designing new SIMD instructions\cite{XMLSSE42}
135, as well as to the developers of parallel bit stream technology
137Each of these approaches has shown considerable performance
138benefits over traditional sequential parsing techniques that follow the
139byte-at-a-time model.
148\caption{XML Parser Technology Energy vs. Performance}
152The remainder of this paper is organized as follows.
153Section~\ref{section:background} presents background material on XML
154parsing and provides insight into the inefficiency of traditional
155parsers on mainstream processors.  Section~\ref{section:parabix}
156describes the Parabix architecture, tool chain and run-time
157environment.  Section~\ref{section:parser} describes the application
158of the Parabix framework to the construction of an XML parser
159enforcing all the well-formedness rules of the XML specification.
160Section~\ref{section:baseline} presents a detailed performance
161analysis of Parabix on a \CITHREE\ system using hardware performance
162counters and compares it against conventional parsers.
163Section~\ref{section:scalability} compares the performance and energy
164efficiency of 128 bit SIMD extensions across three generations of
165intel processors and includes a comparison with the ARM Cortex-A8
166processor.  Section~\ref{section:avx} examines the Intel's new 256-bit
167AVX technology and comments on the benefits and challenges compared to
168the 128-bit SSE instructions.  Finally,
169Section~\ref{section:multithread} looks at the multithreading of the
170Parabix XML parser which seeks to exploit the SIMD units scattered
171across multiple cores.
176%One area in which both servers and mobile devices devote considerable
177%computational effort into is in the processing of Extensible Markup
178%Language (XML) documents.  It was predicted that corporate servers
179%would see a ``growth in XML traffic\ldots from 15\% [of overall
180%network traffic] in 2004 to just under 48\% by 2008''
181%\cite{coyle2005}.  Further, ``from the point of view of server
182%efficiency[,] XML\ldots is the closest thing there is to a ubiquitous
183%computing workload'' \cite{leventhal2009}.  In other words, XML is the
184%quickly becoming the backbone of most server/server and client/server
185%%information exchanges.  Similarly, there is growing interest in the
186%use of mobile web services for personalization, context-awareness, and
187%content-adaptation of mobile web sites---most of which rely on XML
188%\cite{canali2009}.  Whether the end user realizes it or not, XML is
189%part of their daily life.
191%Why are XML parsers important ?
192%Talk about XML parsers and what they do in general.
193%Brief few lines about byte-at-time ?
194%What's new with Parabix style approach ?
195%Introduce Parabix1 and Parabix2 ?
196%Present overall quantiative improvements compared to other parsers.
Note: See TracBrowser for help on using the repository browser.