# Changeset 1335 for docs/HPCA2012/05-corei3.tex

Ignore:
Timestamp:
Aug 21, 2011, 4:20:30 PM (8 years ago)
Message:

Working on evaluation. Fixed Figure sizes

File:
1 edited

Unmodified
Added
Removed
• ## docs/HPCA2012/05-corei3.tex

 r1302 %some of the numbers are roughly calculated, needs to be recalculated for final version \subsection{Cache behavior} \CITHREE\ has a three level cache hierarchy.  The approximate miss penalty for each cache level is 4, 11, and 36 cycles respectively.  Figure \ref{corei3_L1DM}, Figure \ref{corei3_L2DM} and Figure \ref{corei3_L3TM} show the L1, L2 and L3 data cache misses for each of the parsers.  Although XML parsing is non memory intensive application, cache misses for the Expat and Xerces parsers represent a 0.5 cycle per XML byte cost whereas the performance of the Parabix parsers remains essentially unaffected by data cache misses.  Cache misses not only consume additional CPU cycles but increase application energy consumption.  L1, L2, and L3 cache misses consume approximately 8.3nJ, 19nJ, and 40nJ respectively. As such, given a 1GB XML file as input, Expat and Xerces would consume over 0.6J and 0.9J respectively due to cache misses alone. \CITHREE\ has a three level cache hierarchy.  The approximate miss penalty for each cache level is 4, 11, and 36 cycles respectively. Figure \ref{corei3_L1DM}, Figure \ref{corei3_L2DM} and Figure \ref{corei3_L3TM} show the L1, L2 and L3 data cache misses for each of the parsers.  Although XML parsing is non memory intensive application, cache misses for the Expat and Xerces parsers represent a 0.5 cycle per XML byte cost whereas the performance of the Parabix parsers remains essentially unaffected by data cache misses.  Cache misses not only consume additional CPU cycles but increase application energy consumption.  L1, L2, and L3 cache misses consume approximately 8.3nJ, 19nJ, and 40nJ respectively. As such, given a 1GB XML file as input, Expat and Xerces would consume over 0.6J and 0.9J respectively due to cache misses alone. %With a 1GB input file, Expat would consume more than 0.6J and Xercesn %would consume 0.9J on cache misses alone. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_L1DM.pdf} \end{center} \caption{\CITHREE\ --- L1 Data Cache Misses (y-axis: Cache Misses per kB)} \subfigure[L1 Misses]{ \includegraphics[width=0.32\textwidth]{plots/corei3_L1DM.pdf} \label{corei3_L1DM} \end{figure} \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_L2DM.pdf} \end{center} \caption{\CITHREE\ --- L2 Data Cache Misses (y-axis: Cache Misses per kB)} } \subfigure[L2 Misses]{ \includegraphics[width=0.32\textwidth]{plots/corei3_L2DM.pdf} \label{corei3_L2DM} \end{figure} \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_L3CM.pdf} \end{center} \caption{\CITHREE\ --- L3 Cache Misses (y-axis: Cache Misses per kB)} \label{corei3_L3TM} } \subfigure[L3 Misses]{ \includegraphics[width=0.32\textwidth]{plots/corei3_L3CM.pdf} \label{corei3_L3DM} } \caption{Cache Misses per kB of input data.} \end{figure} \subsection{Branch Mispredictions} Despite improvements in branch prediction, branch misprediction penalties contribute significantly to XML parsing performance. On modern commodity processors the cost of a single branch misprediction is commonly cited as over 10 CPU cycles.  As shown in Figure \ref{corei3_BM}, the cost of branch mispredictions for the Expat parser can be over 7 cycles per XML byte---this cost alone is equal to the average total cost for Parabix2 to process each byte of XML. Despite improvements in branch prediction, branch misprediction penalties contribute significantly to XML parsing performance. On modern commodity processors the cost of a single branch misprediction is commonly cited as over 10 CPU cycles.  As shown in Figure \ref{corei3_BM}, the cost of branch mispredictions for the Expat parser can be over 7 cycles per XML byte---this cost alone is equal to the average total cost for Parabix2 to process each byte of XML. In general, reducing the branch misprediction rate is difficult in text-based XML parsing applications. This is due in part to the variable length nature of the syntactic elements contained within XML documents, a data dependent characterstic, as well as the extensive set of syntax constraints imposed by the XML 1.0 specification. As such, traditional byte-at-a-time XML parsers generate a performance limiting number of branch mispredictions.  As shown in Figure \ref{corei3_BR}, Xerces averages up to 13 branches per XML byte processed on high density markup. In general, reducing the branch misprediction rate is difficult in text-based XML parsing applications. This is due in part to the variable length nature of the syntactic elements contained within XML documents, a data dependent characterstic, as well as the extensive set of syntax constraints imposed by the XML 1.0 specification. As such, traditional byte-at-a-time XML parsers generate a performance limiting number of branch mispredictions.  As shown in Figure \ref{corei3_BR}, Xerces averages up to 13 branches per XML byte processed on high density markup. The performance improvement of Parabix1 in terms of branch mispredictions results from the veritable elimination of conditional branch instructions in scanning. Leveraging the processor built-in {\em bit scan} operation together with parallel bit stream technology Parabix1 can scan up to 64 bytes of source XML with a single {\em bit scan} instruction. In comparison, a byte-at-a-time parser must The performance improvement of Parabix1 in terms of branch mispredictions results from the veritable elimination of conditional branch instructions in scanning. Leveraging the processor built-in {\em bit scan} operation together with parallel bit stream technology Parabix1 can scan up to 64 bytes of source XML with a single {\em bit scan} instruction. In comparison, a byte-at-a-time parser must process a conditional branch instruction per XML byte scanned. As shown in Figure \ref{corei3_BR}, Parabix2 processing is almost branch free. Utilizing a new parallel scanning technique based on bit stream addition, Parabix2 exhibits minimal dependence on source XML markup density. Figure \ref{corei3_BR} displays this lack of data dependence via the constant number of branch mispredictions shown for each of the source XML files. As shown in Figure \ref{corei3_BR}, Parabix2 processing is almost branch free. Utilizing a new parallel scanning technique based on bit stream addition, Parabix2 exhibits minimal dependence on source XML markup density. Figure \ref{corei3_BR} displays this lack of data dependence via the constant number of branch mispredictions shown for each of the source XML files. % Parabix1 minimize the branches by using parallel bit % streams.  Parabix1 still have a few branches for each block of 128 % dependency on the markup density of the workloads. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_BR.pdf} \end{center} \caption{\CITHREE\ --- Branch Instructions (y-axis: Branches per kB)} \label{corei3_BR} \end{figure} \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_BM.pdf} \end{center} \caption{\CITHREE\ --- Branch Mispredictions (y-axis: Branch Mispredictions per kB)} \subfigure[Branch Instructions]{ \includegraphics[width=0.45\textwidth]{plots/corei3_BR.pdf} \label{corei3_BR} } \hfill \subfigure[Branch Misses]{ \includegraphics[width=0.42\textwidth]{plots/corei3_BM.pdf} \label{corei3_BM} } \caption{Branch characteristics on the \CITHREE\ per kB of input data.} \end{figure} \subsection{SIMD Instructions vs. Total Instructions} Parabix achieves performance via parallel bit stream technology. In Parabix XML processing, parallel bit streams are both computed and predominately operated upon using the SIMD instructions of commodity processors.  The ratio of retired SIMD instructions to total instructions provides insight into\ the relative degree to which Parabix achieves parallelism over the byte-at-a-time approach. Parabix achieves performance via parallel bit stream technology. In Parabix XML processing, parallel bit streams are both computed and predominately operated upon using the SIMD instructions of commodity processors.  The ratio of retired SIMD instructions to total instructions provides insight into\ the relative degree to which Parabix achieves parallelism over the byte-at-a-time approach. Using the Intel Pin tool, we gather the dynamic instruction mix for each XML workload, and classify instructions as either vector (SIMD) or non-vector instructions. Figures \ref{corei3_INS_p1} and \ref{corei3_INS_p2} show the percentage of SIMD instructions for Parabix1 and Parabix2 respectively. Using the Intel Pin tool, we gather the dynamic instruction mix for each XML workload, and classify instructions as either vector (SIMD) or non-vector instructions.  Figures \ref{corei3_INS_p1} and \ref{corei3_INS_p2} show the percentage of SIMD instructions for Parabix1 and Parabix2 respectively. %(Expat and Xerce do not use any SIMD instructions) For Parabix1, 18\% to 40\% of the executed instructions are SIMD instructions.  Using Parabix2 is much lower and thus the performance penalty incurred by increasing the markup density is reduced. %Expat and Xerce do not use any SIMD instructions and were not included in this portion of the study. %Expat and Xerce do not use any SIMD instructions and were not %included in this portion of the study. % Parabix gains its performance by using parallel bitstreams, which are % mostly generated and calculated by SIMD instructions.  The ratio of % executed SIMD instructions over total instructions indicates the % Parabix gains its performance by using parallel bitstreams, which % are mostly generated and calculated by SIMD instructions.  The ratio % of executed SIMD instructions over total instructions indicates the % amount of parallel processing we were able to achieve.  We use Intel % pin, a dynamic binary instrumentation tool, to gather instruction mix. % Then we adds up all the vector instructions that have been executed. % Figure \ref{corei3_INS_p1} and Figure \ref{corei3_INS_p2} show the % percentage of SIMD instructions of Parabix1 and Parabix2 (Expat and % Xerce do not use any SIMD instructions).  For Parabix1, 18\% to 40\% % of the executed instructions consists of SIMD instructions.  By using % bistream addition for parallel scanning, Parabix2 uses 60\% to 80\% % SIMD instructions.  Although the ratio decrease as the markup density % increase for both Parabix1 and Parabix2, the decreasing rate of % Parabix2 is much lower and thus the performance degradation caused by % increasing markup density is smaller. % pin, a dynamic binary instrumentation tool, to gather instruction % mix.  Then we adds up all the vector instructions that have been % executed.  Figure \ref{corei3_INS_p1} and Figure \ref{corei3_INS_p2} % show the percentage of SIMD instructions of Parabix1 and Parabix2 % (Expat and Xerce do not use any SIMD instructions).  For Parabix1, % 18\% to 40\% of the executed instructions consists of SIMD % instructions.  By using bistream addition for parallel scanning, % Parabix2 uses 60\% to 80\% SIMD instructions.  Although the ratio % decrease as the markup density increase for both Parabix1 and % Parabix2, the decreasing rate of Parabix2 is much lower and thus the % performance degradation caused by increasing markup density is % smaller. \subsection{CPU Cycles} Figure \ref{corei3_TOT} shows overall parser performance evaluated in terms of CPU cycles per kilobyte.  Parabix1 is 1.5 to 2.5 times faster on document-oriented input and 2 to 3 times faster on data-oriented input than the Expat and Xerces parsers respectively.  Parabix2 is 2.5 to 4 times faster on document-oriented input and 4.5 to 7 times faster on data-oriented input.  Traditional parsers can be dramatically slowed by dense markup, while Parabix2 is generally unaffected.  The results presented are not entirely fair to the Xerces parser since it first transcodes input from UTF-8 to UTF-16 before processing. In Xerces, this transcoding requires several cycles per byte.  However, transcoding using parallel bit streams is significantly faster and requires less than a single cycle per byte.  \cite{Cameron2008}. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_INS_p1.pdf} \end{center} \caption{Parabix1 --- SIMD vs. Non-SIMD Instructions (y-axis: Percent SIMD Instructions} \label{corei3_INS_p1} \subfigure[Performance : \# Cycles/kb]{ \includegraphics[width=0.5\textwidth]{plots/corei3_TOT.pdf} \label{corei3_TOT} } \hfill \subfigure[SIMD Instruction Breakdown. Y Axis :  \% SIMD Instruction/kb]{ \includegraphics[width=0.5\textwidth]{plots/corei3_INS_p2.pdf} \label{corei3_INS_p2} } \end{figure} \subsection{Power and Energy} In response to the growing industry concerns on power consumption and energy efficiency, chip producers work hard to not only improve performance but also achieve high energy efficiency in processors design. We study the power and energy consumption of Parabix in comparison with Expat and Xerces on \CITHREE{}. The average power of \CITHREE\ 530 is about 21 watts.  This Intel model has a good reputation for power efficiency. Figure \ref{corei3_power} shows the average power consumed by each parser.  Parabix2, dominated by SIMD instructions, uses approximately 5\% additional power. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_INS_p2.pdf} \end{center} \caption{Parabix2 --- SIMD vs. Non-SIMD Instructions (y-axis: Percent SIMD Instructions)} \label{corei3_INS_p2} \subfigure[Avg. Power (Watts)]{ \includegraphics[width=0.4\textwidth]{plots/corei3_power.pdf} \label{corei3_power} } \hfill \subfigure[Energy Consumption ($\mu$J per kB)]{ \includegraphics[width=0.4\textwidth]{plots/corei3_energy.pdf} \label{corei3_energy} } \end{figure} \subsection{CPU Cycles} As shown in Figure \ref{corei3_energy}, a comparison of energy efficiency demonstrates a more interesting result. Although Parabix2 requires slightly more power (per instruction), the processing time of Parabix2 is significantly lower, and therefore Parabix2 consumes substantially less energy than the other parsers. Parabix2 consumes 50 to 75 nJ per byte while Expat and Xerces consume 80nJ to 320nJ and 140nJ to 370nJ per byte respectively. Figure \ref{corei3_TOT} shows overall parser performance evaluated in terms of CPU cycles per kilobyte.  Parabix1 is 1.5 to 2.5 times faster on document-oriented input and 2 to 3 times faster on data-oriented input than the Expat and Xerces parsers respectively.  Parabix2 is 2.5 to 4 times faster on document-oriented input and 4.5 to 7 times faster on data-oriented input.  Traditional parsers can be dramatically slowed by dense markup, while Parabix2 is generally unaffected.  The results presented are not entirely fair to the Xerces parser since it first transcodes input from UTF-8 to UTF-16 before processing. In Xerces, this transcoding requires several cycles per byte.  However, transcoding using parallel bit streams is significantly faster and requires less than a single cycle per byte. \cite{Cameron2008}. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_TOT.pdf} \end{center} \caption{\CITHREE\ --- Performance (y-axis: CPU Cycles per kB)} \label{corei3_TOT} \end{figure} \subsection{Power and Energy} In response to the growing industry concerns on power consumption and energy efficiency, chip producers work hard to not only improve performance but also achieve high energy efficiency in processors design. We study the power and energy consumption of Parabix in comparison with Expat and Xerces on \CITHREE{}. The average power of \CITHREE\ 530 is about 21 watts. This Intel model has a good reputation for power efficiency. Figure \ref{corei3_power} shows the average power consumed by each parser. Parabix2, dominated by SIMD instructions, uses approximately 5\% additional power. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_power.pdf} \end{center} \caption{\CITHREE\ --- Average Power Consumption (watts)} \label{corei3_power} \end{figure} As shown in Figure \ref{corei3_energy}, a comparison of energy efficiency demonstrates a more interesting result. Although Parabix2 requires slightly more power (per instruction), the processing time of Parabix2 is significantly lower, and therefore Parabix2 consumes substantially less energy than the other parsers. Parabix2 consumes 50 to 75 nJ per byte while Expat and Xerces consume 80nJ to 320nJ and 140nJ to 370nJ per byte respectively. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{plots/corei3_energy.pdf} \end{center} \caption{\CITHREE\ --- Energy Consumption ($\mu$J per kB)} \label{corei3_energy} \end{figure}
Note: See TracChangeset for help on using the changeset viewer.