\chapter{Performance}

\noindent
====================

Writing Points:
\begin{itemize}
\item
Machine Specification
\item
Allocators and their details
\item
Benchmarks and their details
\item
Results
\end{itemize}

\noindent
====================

\section{Machine Specification}

The performance experiments were run on three different multicore systems to determine if there is consistency across platforms:
\begin{itemize}
\item
AMD EPYC 7662, 64-core socket $\times$ 2, 2.0 GHz
\item
Huawei ARM TaiShan 2280 V2 Kunpeng 920, 24-core socket $\times$ 4, 2.6 GHz
\item
Intel Xeon Gold 5220R, 48-core socket $\times$ 2, 2.20GHz
\end{itemize}


\section{Existing Memory Allocators}
With dynamic allocation being an important feature of C, there are many stand-alone memory allocators that have been designed for different purposes. For this thesis, we chose 7 of the most popular and widely used memory allocators.

\paragraph{dlmalloc}
dlmalloc (FIX ME: cite allocator) is a thread-safe allocator that is single threaded and single heap. dlmalloc maintains free-lists of different sizes to store freed dynamic memory. (FIX ME: cite wasik)

\paragraph{hoard}
Hoard (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and using a heap layer framework. It has per-thread heaps that have thread-local free-lists, and a global shared heap. (FIX ME: cite wasik)

\paragraph{jemalloc}
jemalloc (FIX ME: cite allocator) is a thread-safe allocator that uses multiple arenas. Each thread is assigned an arena. Each arena has chunks that contain contagious memory regions of same size. An arena has multiple chunks that contain regions of multiple sizes.

\paragraph{ptmalloc}
ptmalloc (FIX ME: cite allocator) is a modification of dlmalloc. It is a thread-safe multi-threaded memory allocator that uses multiple heaps. ptmalloc heap has similar design to dlmalloc's heap.

\paragraph{rpmalloc}
rpmalloc (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and uses per-thread heap. Each heap has multiple size-classes and each size-class contains memory regions of the relevant size.

\paragraph{tbb malloc}
tbb malloc (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and uses private heap for each thread. Each private-heap has multiple bins of different sizes. Each bin contains free regions of the same size.

\paragraph{tc malloc}
tcmalloc (FIX ME: cite allocator) is a thread-safe allocator. It uses per-thread cache to store free objects that prevents contention on shared resources in multi-threaded application. A central free-list is used to refill per-thread cache when it gets empty.


\section{Memory Allocators}
For these experiments, we used 7 memory allocators excluding our standalone memory allocator uHeapLmmm.

\begin{tabularx}{0.8\textwidth} {
	| >{\raggedright\arraybackslash}X
	| >{\centering\arraybackslash}X
	| >{\raggedleft\arraybackslash}X |
}
\hline
Memory Allocator & Version     & Configurations \\
\hline
dl               &             &  \\
\hline
hoard            &             &  \\
\hline
je               &             &  \\
\hline
pt3              &             &  \\
\hline
rp               &             &  \\
\hline
tbb              &             &  \\
\hline
tc               &             &  \\
\end{tabularx}

%(FIX ME: complete table)

\section{Experiment Environment}
We conducted these experiments ... (FIX ME: what machine and which specifications to add).

We used our micro becnhmark suite (FIX ME: cite mbench) to evaluate other memory allocators (FIX ME: cite above memory allocators) and our uHeapLmmm.

\section{Results}

\subsection{Memory Benchmark}
FIX ME: add experiment, knobs, graphs, and description

\subsection{Speed Benchmark}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Speed Time}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Speed Workload}
FIX ME: add experiment, knobs, graphs, and description

\subsection{Cache Scratch}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Cache Scratch Time}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Cache Scratch Layout}
FIX ME: add experiment, knobs, graphs, and description

\subsection{Cache Thrash}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Cache Thrash Time}
FIX ME: add experiment, knobs, graphs, and description

\subsubsection{Cache Thrash Layout}
FIX ME: add experiment, knobs, graphs, and description
