Changeset ba897d21
- Timestamp:
- Apr 19, 2022, 2:53:40 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 2e9b59b
- Parents:
- bf8b77e
- Location:
- doc/theses/mubeen_zulfiqar_MMath
- Files:
-
- 203 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mubeen_zulfiqar_MMath/allocator.tex
rbf8b77e rba897d21 14 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 15 16 \section{Design choices for uHeap} 16 \section{Design choices for uHeap}\label{sec:allocatorSec} 17 17 uHeap's design was reviewed and changed to fulfill new requirements (FIX ME: cite allocator philosophy). For this purpose, following two designs of uHeapLmm were proposed: 18 18 … … 121 121 \centering 122 122 \includegraphics[width=0.65\textwidth]{figures/NewHeapStructure.eps} 123 \caption{ HeapStructure}123 \caption{uHeap Structure} 124 124 \label{fig:heapStructureFig} 125 125 \end{figure} … … 164 164 \end{algorithm} 165 165 166 Algorithm~\ref{alg:heapObjectFreeOwn} shows how a free request is fulfilled if object ownership is turned on. Algorithm~\ref{alg:heapObjectFreeNoOwn} shows how the same free request is fulfilled without object ownership. 167 168 \begin{algorithm} 169 \caption{Dynamic object free at address A with object ownership}\label{alg:heapObjectFreeOwn} 170 \begin{algorithmic}[1] 171 \If {$\textit{A was mmap-ed}$} 172 \State $\text{return A's dynamic memory to system using system call munmap}$ 173 \Else 174 \State $\text{B} \gets \textit{O's owner}$ 175 \If {$\textit{B is thread-local heap's bucket}$} 176 \State $\text{push A to B's free-list}$ 177 \Else 178 \State $\text{push A to B's away-list}$ 179 \EndIf 180 \EndIf 181 \end{algorithmic} 182 \end{algorithm} 183 184 \begin{algorithm} 185 \caption{Dynamic object free at address A without object ownership}\label{alg:heapObjectFreeNoOwn} 186 \begin{algorithmic}[1] 187 \If {$\textit{A was mmap-ed}$} 188 \State $\text{return A's dynamic memory to system using system call munmap}$ 189 \Else 190 \State $\text{B} \gets \textit{O's owner}$ 191 \If {$\textit{B is thread-local heap's bucket}$} 192 \State $\text{push A to B's free-list}$ 193 \Else 194 \State $\text{C} \gets \textit{thread local heap's bucket with same size as B}$ 195 \State $\text{push A to C's free-list}$ 196 \EndIf 197 \EndIf 198 \end{algorithmic} 199 \end{algorithm} 200 166 201 167 202 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
doc/theses/mubeen_zulfiqar_MMath/background.tex
rbf8b77e rba897d21 757 757 Implementing lock-free operations for more complex data-structures (queue~\cite{Valois94}/deque~\cite{Sundell08}) is more complex. 758 758 Michael~\cite{Michael04} and Gidenstam \etal \cite{Gidenstam05} have created lock-free variations of the Hoard allocator. 759 760 761 \subsubsection{Speed Workload} 762 The worload method uses the opposite approach. It calls the allocator's routines for a specific amount of time and measures how much work was done during that time. Then, similar to the time method, it divides the time by the workload done during that time and calculates the average time taken by the allocator's routine. 763 *** FIX ME: Insert a figure of above benchmark with description 764 765 \paragraph{Knobs} 766 *** FIX ME: Insert Knobs -
doc/theses/mubeen_zulfiqar_MMath/benchmarks.tex
rbf8b77e rba897d21 1 1 \chapter{Benchmarks} 2 2 3 \noindent 4 ==================== 5 6 Writing Points: 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Micro Benchmark Suite 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8 9 The aim of micro benchmark suite is to create a set of programs that can evaluate a memory allocator based on the 10 performance matrices described in (FIX ME: local cite). These programs can be taken as a standard to benchmark an 11 allocator's basic goals. These programs give details of an allocator's memory overhead and speed under a certain 12 allocation pattern. The speed of the allocator is benchmarked in different ways. Similarly, false sharing happening in 13 an allocator is also measured in multiple ways. These benchmarks evalute the allocator under a certain allocation 14 pattern which is configurable and can be changed using a few knobs to benchmark observe an allocator's performance 15 under a desired allocation pattern. 16 17 Micro Benchmark Suite benchmarks an allocator's performance by allocating dynamic objects and, then, measuring specifc 18 matrices. The benchmark suite evaluates an allocator with a certain allocation pattern. Bnechmarks have different knobs 19 that can be used to change allocation pattern and evaluate an allocator under desired conditions. These can be set by 20 giving commandline arguments to the benchmark on execution. 21 22 \section{Current Benchmarks} There are multiple benchmarks that are built individually and evaluate different aspects of 23 a memory allocator. But, there is not a set of benchamrks that can be used to evaluate multiple aspects of memory 24 allocators. 25 26 \subsection{threadtest}(FIX ME: cite benchmark and hoard) Each thread repeatedly allocates and then deallocates 100,000 27 objects. Runtime of the benchmark evaluates its efficiency. 28 29 \subsection{shbench}(FIX ME: cite benchmark and hoard) Each thread allocates and randomly frees a number of random-sized 30 objects. It is a stress test that also uses runtime to determine efficiency of the allocator. 31 32 \subsection{larson}(FIX ME: cite benchmark and hoard) Larson simulates a server environment. Multiple threads are 33 created where each thread allocator and free a number of objects within a size range. Some objects are passed from 34 threads to the child threads to free. It caluculates memory operations per second as an indicator of memory 35 allocator's performance. 36 37 \section{Memory Benchmark} Memory benchmark measures memory overhead of an allocator. It allocates a number of dynamic 38 objects. Then, by reading /self/proc/maps, gets the total memory that the allocator has reuested from the OS. It 39 calculates the memory head by taking the difference between the memory the allocator has requested from the OS and the 40 memory that program has allocated. 41 42 \begin{figure} 43 \centering 44 \includegraphics[width=1\textwidth]{figures/bench-memory.eps} 45 \caption{Benchmark Memory Overhead} 46 \label{fig:benchMemoryFig} 47 \end{figure} 48 49 Figure \ref{fig:benchMemoryFig} gives a flow of the memory benchmark. It creates a producer-consumer scenerio with K producers 50 and each producer has M consumers. Producer has a separate buffer for each consumer. Producer allocates N objects of 51 random sizes following the given distrubution for each consumer. Consumer frees those objects. After every memory 52 operation, program memory usage is recorded throughout the runtime. This data then can be used to visualize the memory 53 usage and consumption of the prigram. 54 55 Different knobs can be adjusted to set certain thread model.\\ 56 -threadA : sets number of alloc threads (producers) for mem benchmark\\ 57 -consumeS: sets production and conumption round size\\ 58 -threadF : sets number of free threads (consumers) for mem benchmark 59 60 Object allocation size can be changed using the knobs:\\ 61 -maxS : sets max object size\\ 62 -minS : sets min object size\\ 63 -stepS : sets object size increment\\ 64 -distroS : sets object size distribution\\ 65 -objN : sets number of objects per thread\\ 66 67 \section{Speed Benchmark} Speed benchmark measures the runtime speed of an allocator (FIX ME: cite allocator routines). 68 Speed benchmark measures runtime speed of individual memory allocation routines. It also considers different 69 allocation chains to measures the performance of the allocator by combining multiple allocation routines in a chain. 70 It uses following chains and measures allocator runtime speed against them: 7 71 \begin{itemize} 8 \item 9 Performance matrices of memory allocation. 10 \item 11 Aim of micro benchmark suite. 12 13 ----- SHOULD WE GIVE IMPLEMENTATION DETAILS HERE? ----- 14 15 \PAB{For the benchmarks, yes.} 16 \item 17 A complete list of benchmarks in micro benchmark suite. 18 \item 19 One detailed section for each benchmark in micro benchmark suite including: 20 21 \begin{itemize} 22 \item 23 The introduction of the benchmark. 24 \item 25 Figure. 26 \item 27 Results with popular memory allocators. 72 \item malloc 0 73 \item free NULL 74 \item malloc 75 \item realloc 76 \item free 77 \item calloc 78 \item malloc-free 79 \item realloc-free 80 \item calloc-free 81 \item malloc-realloc 82 \item calloc-realloc 83 \item malloc-realloc-free 84 \item calloc-realloc-free 85 \item malloc-realloc-free-calloc 28 86 \end{itemize} 29 87 30 \item 31 Summarize performance of current memory allocators. 32 \end{itemize} 33 34 \noindent 35 ==================== 36 37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Performance Matrices 40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 42 43 44 \section{Benchmarks} 45 There are multiple benchmarks that are built individually and evaluate different aspects of a memory allocator. But, there is not standard set of benchamrks that can be used to evaluate multiple aspects of memory allocators. 46 47 \paragraph{threadtest} 48 (FIX ME: cite benchmark and hoard) Each thread repeatedly allocates and then deallocates 100,000 objects. Runtime of the benchmark evaluates its efficiency. 49 50 \paragraph{shbench} 51 (FIX ME: cite benchmark and hoard) Each thread allocates and randomly frees a number of random-sized objects. It is a stress test that also uses runtime to determine efficiency of the allocator. 52 53 \paragraph{larson} 54 (FIX ME: cite benchmark and hoard) Larson simulates a server environment. Multiple threads are created where each thread allocator and free a number of objects within a size range. Some objects are passed from threads to the child threads to free. It caluculates memory operations per second as an indicator of memory allocator's performance. 55 56 57 \section{Performance Matrices of Memory Allocators} 58 59 When it comes to memory allocators, there are no set standards of performance. Performance of a memory allocator depends highly on the usage pattern of the application. A memory allocator that is the best performer for a certain application X might be the worst for some other application which has completely different memory usage pattern compared to the application X. It is extremely difficult to make one universally best memory allocator which will outperform every other memory allocator for every usage pattern. So, there is a lack of a set of standard benchmarks that are used to evaluate a memory allocators's performance. 60 61 If we breakdown the goals of a memory allocator, there are two basic matrices on which a memory allocator's performance is evaluated. 62 \begin{enumerate} 63 \item 64 Memory Overhead 65 \item 66 Speed 67 \end{enumerate} 68 69 \subsection{Memory Overhead} 70 Memory overhead is the extra memory that a memory allocator takes from OS which is not requested by the application. Ideally, an allocator should get just enough memory from OS that can fulfill application's request and should return this memory to OS as soon as applications frees it. But, allocators retain more memory compared to what application has asked for which causes memory overhead. Memory overhead can happen for various reasons. 71 72 \subsubsection{Fragmentation} 73 Fragmentation is one of the major reasons behind memory overhead. Fragmentation happens because of situations that are either necassary for proper functioning of the allocator such as internal memory management and book-keeping or are out of allocator's control such as application's usage pattern. 74 75 \paragraph{Internal Fragmentation} 76 For internal book-keeping, allocators divide raw memory given by OS into chunks, blocks, or lists that can fulfill application's requested size. Allocators use memory given by OS for creating headers, footers etc. to store information about these chunks, blocks, or lists. This increases usage of memory in-addition to the memory requested by application as the allocators need to store their book-keeping information. This extra usage of memory for allocator's own book-keeping is called Internal Fragmentation. Although it cases memory overhead but this overhead is necassary for an allocator's proper funtioning. 77 78 *** FIX ME: Insert a figure of internal fragmentation with explanation 79 80 \paragraph{External Fragmentation} 81 External fragmentation is the free bits of memory between or around chunks of memory that are currently in-use of the application. Segmentation in memory due to application's usage pattern causes external fragmentation. The memory which is part of external fragmentation is completely free as it is neither used by allocator's internal book-keeping nor by the application. Ideally, an allocator should return a segment of memory back to the OS as soon as application frees it. But, this is not always the case. Allocators get memory from OS in one of the two ways. 82 83 \begin{itemize} 84 \item 85 MMap: an allocator can ask OS for whole pages in mmap area. Then, the allocator segments the page internally and fulfills application's request. 86 \item 87 Heap: an allocator can ask OS for memory in heap area using system calls such as sbrk. Heap are grows downwards and shrinks upwards. 88 \begin{itemize} 89 \item 90 If an allocator uses mmap area, it can only return extra memory back to OS if the whole page is free i.e. no chunk on the page is in-use of the application. Even if one chunk on the whole page is currently in-use of the application, the allocator has to retain the whole page. 91 \item 92 If an allocator uses the heap area, it can only return the continous free memory at the end of the heap area that is currently in allocator's possession as heap area shrinks upwards. If there are free bits of memory in-between chunks of memory that are currently in-use of the application, the allocator can not return these free bits. 93 94 *** FIX ME: Insert a figure of above scenrio with explanation 95 \item 96 Even if the entire heap area is free except one small chunk at the end of heap area that is being used by the application, the allocator cannot return the free heap area back to the OS as it is not a continous region at the end of heap area. 97 98 *** FIX ME: Insert a figure of above scenrio with explanation 99 100 \item 101 Such scenerios cause external fragmentation but it is out of the allocator's control and depend on application's usage pattern. 102 \end{itemize} 103 \end{itemize} 104 105 \subsubsection{Internal Memory Management} 106 Allocators such as je-malloc (FIX ME: insert reference) pro-actively get some memory from the OS and divide it into chunks of certain sizes that can be used in-future to fulfill application's request. This causes memory overhead as these chunks are made before application's request. There is also the possibility that an application may not even request memory of these sizes during their whole life-time. 107 108 *** FIX ME: Insert a figure of above scenrio with explanation 109 110 Allocators such as rp-malloc (FIX ME: insert reference) maintain lists or blocks of sized memory segments that is freed by the application for future use. These lists are maintained without any guarantee that application will even request these sizes again. 111 112 Such tactics are usually used to gain speed as allocator will not have to get raw memory from OS and manage it at the time of application's request but they do cause memory overhead. 113 114 Fragmentation and managed sized chunks of free memory can lead to Heap Blowup as the allocator may not be able to use the fragments or sized free chunks of free memory to fulfill application's requests of other sizes. 115 116 \subsection{Speed} 117 When it comes to performance evaluation of any piece of software, its runtime is usually the first thing that is evaluated. The same is true for memory allocators but, in case of memory allocators, speed does not only mean the runtime of memory allocator's routines but there are other factors too. 118 119 \subsubsection{Runtime Speed} 120 Low runtime is the main goal of a memory allocator when it comes it proving its speed. Runtime is the time that it takes for a routine of memory allocator to complete its execution. As mentioned in (FIX ME: refernce to routines' list), there four basic routines that are used in memory allocation. Ideally, each routine of a memory allocator should be fast. Some memory allocator designs use pro-active measures (FIX ME: local refernce) to gain speed when allocating some memory to the application. Some memory allocators do memory allocation faster than memory freeing (FIX ME: graph refernce) while others show similar speed whether memory is allocated or freed. 121 122 \subsubsection{Memory Access Speed} 123 Runtime speed is not the only speed matrix in memory allocators. The memory that a memory allocator has allocated to the application also needs to be accessible as quick as possible. The application should be able to read/write allocated memory quickly. The allocation method of a memory allocator may introduce some delays when it comes to memory access speed, which is specially important in concurrent applications. Ideally, a memory allocator should allocate all memory on a cache-line to only one thread and no cache-line should be shared among multiple threads. If a memory allocator allocates memory to multple threads on a same cache line, then cache may get invalidated more frequesntly when two different threads running on two different processes will try to read/write the same memory region. On the other hand, if one cache-line is used by only one thread then the cache may get invalidated less frequently. This sharing of one cache-line among multiple threads is called false sharing (FIX ME: cite wasik). 124 125 \paragraph{Active False Sharing} 126 Active false sharing is the sharing of one cache-line among multiple threads that is caused by memory allocator. It happens when two threads request memory from memory allocator and the allocator allocates memory to both of them on the same cache-line. After that, if the threads are running on different processes who have their own caches and both threads start reading/writing the allocated memory simultanously, their caches will start getting invalidated every time the other thread writes something to the memory. This will cause the application to slow down as the process has to load cache much more frequently. 127 128 *** FIX ME: Insert a figure of above scenrio with explanation 129 130 \paragraph{Passive False Sharing} 131 Passive false sharing is the kind of false sharing which is caused by the application and not the memory allocator. The memory allocator may preservce passive false sharing in future instead of eradicating it. But, passive false sharing is initiated by the application. 132 133 \subparagraph{Program Induced Passive False Sharing} 134 Program induced false sharing is completely out of memory allocator's control and is purely caused by the application. When a thread in the application creates multiple objects in the dynamic area and allocator allocates memory for these objects on the same cache-line as the objects are created by the same thread. Passive false sharing will occur if this thread passes one of these objects to another thread but it retains the rest of these objects or it passes some/all of the remaining objects to some third thread(s). Now, one cache-line is shared among multiple threads but it is caused by the application and not the allocator. It is out of allocator's control and has the similar performance impact as Active False Sharing (FIX ME: cite local) if these threads, who are sharing the same cache-line, start reading/writing the given objects simultanously. 135 136 *** FIX ME: Insert a figure of above scenrio 1 with explanation 137 138 *** FIX ME: Insert a figure of above scenrio 2 with explanation 139 140 \subparagraph{Program Induced Allocator Preserved Passive False Sharing} 141 Program induced allocator preserved passive false sharing is another interesting case of passive false sharing. Both the application and the allocator are partially responsible for it. It starts the same as Program Induced False Sharing (FIX ME: cite local). Once, an application thread has created multiple dynamic objects on the same cache-line and ditributed these objects among multiple threads causing sharing of one cache-line among multiple threads (Program Induced Passive False Sharing). This kind of false sharing occurs when one of these threads, which got the object on the shared cache-line, frees the passed object then re-allocates another object but the allocator returns the same object (on the shared cache-line) that this thread just freed. Although, the application caused the false sharing to happen in the frst place however, to prevent furthur false sharing, the allocator should have returned the new object on some other cache-line which is only shared by the allocating thread. When it comes to performnce impact, this passive false sharing will slow down the application just like any other kind of false sharing if the threads sharing the cache-line start reading/writing the objects simultanously. 142 143 144 *** FIX ME: Insert a figure of above scenrio with explanation 145 146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Micro Benchmark Suite 149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 151 152 \section{Micro Benchmark Suite} 153 The aim of micro benchmark suite is to create a set of programs that can evaluate a memory allocator based on the performance matrices described in (FIX ME: local cite). These programs can be taken as a standard to benchmark an allocator's basic goals. These programs give details of an allocator's memory overhead and speed under a certain allocation pattern. The speed of the allocator is benchmarked in different ways. Similarly, false sharing happening in an allocator is also measured in multiple ways. These benchmarks evalute the allocator under a certain allocation pattern which is configurable and can be changed using a few knobs to benchmark observe an allocator's performance under a desired allocation pattern. 154 155 Micro Benchmark Suite benchmarks an allocator's performance by allocating dynamic objects and, then, measuring specifc matrices. The benchmark suite evaluates an allocator with a certain allocation pattern. Bnechmarks have different knobs that can be used to change allocation pattern and evaluate an allocator under desired conditions. These can be set by giving commandline arguments to the benchmark on execution. 156 157 Following is the list of avalable knobs. 158 159 *** FIX ME: Add knobs items after finalize 160 161 \subsection{Memory Benchmark} 162 Memory benchmark measures memory overhead of an allocator. It allocates a number of dynamic objects. Then, by reading /self/proc/maps, gets the total memory that the allocator has reuested from the OS. Finally, it calculates the memory head by taking the difference between the memory the allocator has requested from the OS and the memory that program has allocated. 163 *** FIX ME: Insert a figure of above benchmark with description 164 165 \paragraph{Relevant Knobs} 166 *** FIX ME: Insert Relevant Knobs 167 168 \subsection{Speed Benchmark} 169 Speed benchmark calculates the runtime speed of an allocator's functions (FIX ME: cite allocator routines). It does by measuring the runtime of allocator routines in two different ways. 170 171 \subsubsection{Speed Time} 172 The time method does a certain amount of work by calling each routine of the allocator (FIX ME: cite allocator routines) a specific time. It calculates the total time it took to perform this workload. Then, it divides the time it took by the workload and calculates the average time taken by the allocator's routine. 173 *** FIX ME: Insert a figure of above benchmark with description 174 175 \paragraph{Relevant Knobs} 176 *** FIX ME: Insert Relevant Knobs 177 178 \subsubsection{Speed Workload} 179 The worload method uses the opposite approach. It calls the allocator's routines for a specific amount of time and measures how much work was done during that time. Then, similar to the time method, it divides the time by the workload done during that time and calculates the average time taken by the allocator's routine. 180 *** FIX ME: Insert a figure of above benchmark with description 181 182 \paragraph{Relevant Knobs} 183 *** FIX ME: Insert Relevant Knobs 184 185 \subsection{Cache Scratch} 186 Cache Scratch benchmark measures program induced allocator preserved passive false sharing (FIX ME CITE) in an allocator. It does so in two ways. 187 188 \subsubsection{Cache Scratch Time} 189 Cache Scratch Time allocates dynamic objects. Then, it benchmarks program induced allocator preserved passive false sharing (FIX ME CITE) in an allocator by measuring the time it takes to read/write these objects. 190 *** FIX ME: Insert a figure of above benchmark with description 191 192 \paragraph{Relevant Knobs} 193 *** FIX ME: Insert Relevant Knobs 194 195 \subsubsection{Cache Scratch Layout} 196 Cache Scratch Layout also allocates dynamic objects. Then, it benchmarks program induced allocator preserved passive false sharing (FIX ME CITE) by using heap addresses returned by the allocator. It calculates how many objects were allocated to different threads on the same cache line. 197 *** FIX ME: Insert a figure of above benchmark with description 198 199 \paragraph{Relevant Knobs} 200 *** FIX ME: Insert Relevant Knobs 201 202 \subsection{Cache Thrash} 203 Cache Thrash benchmark measures allocator induced passive false sharing (FIX ME CITE) in an allocator. It also does so in two ways. 204 205 \subsubsection{Cache Thrash Time} 206 Cache Thrash Time allocates dynamic objects. Then, it benchmarks allocator induced false sharing (FIX ME CITE) in an allocator by measuring the time it takes to read/write these objects. 207 *** FIX ME: Insert a figure of above benchmark with description 208 209 \paragraph{Relevant Knobs} 210 *** FIX ME: Insert Relevant Knobs 211 212 \subsubsection{Cache Thrash Layout} 213 Cache Thrash Layout also allocates dynamic objects. Then, it benchmarks allocator induced false sharing (FIX ME CITE) by using heap addresses returned by the allocator. It calculates how many objects were allocated to different threads on the same cache line. 214 *** FIX ME: Insert a figure of above benchmark with description 215 216 \paragraph{Relevant Knobs} 217 *** FIX ME: Insert Relevant Knobs 88 \begin{figure} 89 \centering 90 \includegraphics[width=1\textwidth]{figures/bench-speed.eps} 91 \caption{Benchmark Speed} 92 \label{fig:benchSpeedFig} 93 \end{figure} 94 95 As laid out in figure \ref{fig:benchSpeedFig}, each chain is measured separately. Each routine in the chain is called for N objects and then 96 those allocated objects are used when call the next routine in the allocation chain. This way we can measure the 97 complete latency of memory allocator when multiple routines are chained together e.g. malloc-realloc-free-calloc gives 98 us the whole picture of the major allocation routines when combined together in a chain. 99 100 For each chain, time taken is recorded which then can be used to visualize performance of a memory allocator against 101 each chain. 102 103 Number of worker threads can be adjust using a command-line argument -threadN. 104 105 \section{Churn Benchmark} Churn benchmark measures the overall runtime speed of an allocator in a multi-threaded 106 scenerio where each thread extinsevly allocates and frees dynamic memory. 107 108 \begin{figure} 109 \centering 110 \includegraphics[width=1\textwidth]{figures/bench-churn.eps} 111 \caption{Benchmark Churn} 112 \label{fig:benchChurnFig} 113 \end{figure} 114 115 Figure \ref{fig:benchChurnFig} illustrates churn benchmark. 116 This benchmark creates a buffer with M spots and starts K threads. Each thread randomly picks a 117 spot out of M spots, it frees the object currently at that spot and allocates a new object for that spot. Each thread 118 repeats this cycle for N times. Main threads measures the total time taken for the whole benchmark and that time is 119 used to evaluate memory allocator's performance. 120 121 Only malloc and free are used to allocate and free an object to eliminate any extra cost such as memcpy in realloc etc. 122 Malloc/free allows us to measure latency of memory allocation only without paying any extra cost. Churn simulates a 123 memory intensive program that can be tuned to create different scenerios. 124 125 Following commandline arguments can be used to tune the benchmark.\\ 126 -threadN : sets number of threads, K\\ 127 -cSpots : sets number of spots for churn, M\\ 128 -objN : sets number of objects per thread, N\\ 129 -maxS : sets max object size\\ 130 -minS : sets min object size\\ 131 -stepS : sets object size increment\\ 132 -distroS : sets object size distribution 133 134 \section{Cache Thrash}\label{sec:benchThrashSec} Cache Thrash benchmark measures allocator induced active false sharing 135 in an allocator as illustrated in figure \ref{f:AllocatorInducedActiveFalseSharing}. 136 If memory allocator allocates memory for multiple threads on 137 same cache line, this can slow down the program performance. If both threads, who share one cache line, frequently 138 read/write to their object on the cache line concurrently then this will cause cache miss everytime a thread accesse 139 the object as the other thread might have written something at their memory location on the same cache line. 140 141 \begin{figure} 142 \centering 143 \includegraphics[width=1\textwidth]{figures/bench-cache-thrash.eps} 144 \caption{Benchmark Allocator Induced Active False Sharing} 145 \label{fig:benchThrashFig} 146 \end{figure} 147 148 Cache thrash tries to create a scenerio that should lead to allocator induced false sharing if the underlying memory 149 allocator is allocating dynamic memory to multiple threads on same cache lines. Ideally, a memory allocator should 150 distance dynamic memory region of one thread from other threads'. Having multiple threads allocating small objects 151 simultanously should cause the memory allocator to allocate objects for multiple objects on the same cache line if its 152 not distancing the memory among different threads. 153 154 Figure \ref{fig:benchThrashFig} lays out flow of the cache thrash benchmark. 155 It creates K worker threads. Each worker thread allocates an object and intensively read/write 156 it for M times to invalidate cache lines frequently to slow down other threads who might be sharing this cache line 157 with it. Each thread repeats this for N times. Main thread measures the total time taken to for all worker threads to 158 complete. Worker threads sharing cahche lines with each other will take longer. 159 160 Different cache access scenerios can be created using the following commandline arguments.\\ 161 -threadN : sets number of threads, K\\ 162 -cacheIt : iterations for cache benchmark, N\\ 163 -cacheRep: repetations for cache benchmark, M\\ 164 -cacheObj: object size for cache benchmark 165 166 \section{Cache Scratch} Cache Scratch benchmark measures allocator induced passive false sharing in an allocator. An 167 allocator can unintentionally induce false sharing depending upon its management of the freed objects as described in 168 figure \ref{f:AllocatorInducedPassiveFalseSharing}. If a thread A allocates multiple objects together then they will be 169 possibly allocated on the same cache line by the memory allocator. If the thread now passes this object to another 170 thread B then the two of them will sharing the same cache line but this scenerio is not induced by the allocator. 171 Instead, the program induced this situation. Now it might be possible that if thread B frees this object and then 172 allocate an object of the same size then the allocator may return the same object which is on a cache line shared 173 with thread A. Now this false sharing is being caused by the memory allocator although it was started by the 174 program. 175 176 \begin{figure} 177 \centering 178 \includegraphics[width=1\textwidth]{figures/bench-cache-scratch.eps} 179 \caption{Benchmark Program Induced Passive False Sharing} 180 \label{fig:benchScratchFig} 181 \end{figure} 182 183 Cache scratch main thread induces false sharing and creates a scenerio that should make memory allocator preserve the 184 program-induced false sharing if it does not retur a freed object to its owner thread and, instead, re-uses it 185 instantly. An alloator using object ownership, as described in section \ref{s:Ownership}, would be less susceptible to allocator induced passive 186 false sharing. If the object is returned to the thread who owns it or originally allocated it then the thread B will 187 get a new object that will be less likely to be on the same cache line as thread A. 188 189 As in figure \ref{fig:benchScratchFig}, cache Scratch allocates K dynamic objects together, one for each of the K worker threads, 190 possibly causing memory allocator to allocate these objects on the same cache-line. Then it create K worker threads and passes 191 an object from the K allocated objects to each of the K threads. Each worker thread frees the object passed by the main thread. 192 Then, it allocates an object and reads/writes it repetitively for M times causing frequent cache invalidations. Each worker 193 repeats this for N times. 194 195 Each thread allocating an object after freeing the original object passed by the main thread should cause the memory 196 allocator to return the same object that was initially allocated by the main thread if the allocator did not return the 197 intial object bakc to its owner (main thread). Then, intensive read/write on the shared cache line by multiple threads 198 should slow down worker threads due to to high cache invalidations and misses. Main thread measures the total time 199 taken for all the workers to complete. 200 201 Similar to bechmark cache thrash in section \ref{sec:benchThrashSec}, different cache access scenerios can be created using the following commandline arguments.\\ 202 -threadN : sets number of threads, K\\ 203 -cacheIt : iterations for cache benchmark, N\\ 204 -cacheRep: repetations for cache benchmark, M\\ 205 -cacheObj: object size for cache benchmark -
doc/theses/mubeen_zulfiqar_MMath/performance.tex
rbf8b77e rba897d21 1 1 \chapter{Performance} 2 3 \noindent4 ====================5 6 Writing Points:7 \begin{itemize}8 \item9 Machine Specification10 \item11 Allocators and their details12 \item13 Benchmarks and their details14 \item15 Results16 \end{itemize}17 18 \noindent19 ====================20 2 21 3 \section{Machine Specification} … … 24 6 \begin{itemize} 25 7 \item 26 AMD EPYC 7662, 64-core socket $\times$ 2, 2.0 GHz 8 {\bf Nasus} AMD EPYC 7662, 64-core socket $\times$ 2, 2.0 GHz, GCC version 9.3.0 27 9 \item 28 Huawei ARM TaiShan 2280 V2 Kunpeng 920, 24-core socket $\times$ 4, 2.6 GHz 29 \item 30 Intel Xeon Gold 5220R, 48-core socket $\times$ 2, 2.20GHz 10 {\bf Algol} Huawei ARM TaiShan 2280 V2 Kunpeng 920, 24-core socket $\times$ 4, 2.6 GHz, GCC version 9.4.0 31 11 \end{itemize} 32 12 33 13 34 \section{Existing Memory Allocators} 14 \section{Existing Memory Allocators}\label{sec:curAllocatorSec} 35 15 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. 36 16 37 \paragraph{dlmalloc} 38 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) 39 40 \paragraph{hoard} 17 \subsection{dlmalloc} 18 dlmalloc (FIX ME: cite allocator with download link) 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) 19 \\ 20 \\ 21 {\bf Version:} 2.8.6\\ 22 {\bf Configuration:} Compiled with pre-processor USE\_LOCKS.\\ 23 {\bf Compilation command:}\\ 24 cc -g3 -O3 -Wall -Wextra -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -fPIC -shared -DUSE\_LOCKS -o libdlmalloc.so malloc-2.8.6.c 25 26 \subsection{hoard} 41 27 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) 42 43 \paragraph{jemalloc} 28 \\ 29 \\ 30 {\bf Version:} 3.13\\ 31 {\bf Configuration:} Compiled with hoard's default configurations and Makefile.\\ 32 {\bf Compilation command:}\\ 33 make all 34 35 \subsection{jemalloc} 44 36 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. 45 46 \paragraph{ptmalloc} 47 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. 48 49 \paragraph{rpmalloc} 37 \\ 38 \\ 39 {\bf Version:} 5.2.1\\ 40 {\bf Configuration:} Compiled with jemalloc's default configurations and Makefile.\\ 41 {\bf Compilation command:}\\ 42 ./autogen.sh\\ 43 ./configure\\ 44 make\\ 45 make install 46 47 \subsection{pt3malloc} 48 pt3malloc (FIX ME: cite allocator) is a modification of dlmalloc. It is a thread-safe multi-threaded memory allocator that uses multiple heaps. pt3malloc heap has similar design to dlmalloc's heap. 49 \\ 50 \\ 51 {\bf Version:} 1.8\\ 52 {\bf Configuration:} Compiled with pt3malloc's Makefile using option "linux-shared".\\ 53 {\bf Compilation command:}\\ 54 make linux-shared 55 56 \subsection{rpmalloc} 50 57 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. 51 52 \paragraph{tbb malloc} 58 \\ 59 \\ 60 {\bf Version:} 1.4.1\\ 61 {\bf Configuration:} Compiled with rpmalloc's default configurations and ninja build system.\\ 62 {\bf Compilation command:}\\ 63 python3 configure.py\\ 64 ninja 65 66 \subsection{tbb malloc} 53 67 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. 54 55 \paragraph{tc malloc} 56 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. 57 58 59 \section{Memory Allocators} 60 For these experiments, we used 7 memory allocators excluding our standalone memory allocator uHeapLmmm. 61 62 \begin{tabularx}{0.8\textwidth} { 63 | >{\raggedright\arraybackslash}X 64 | >{\centering\arraybackslash}X 65 | >{\raggedleft\arraybackslash}X | 66 } 67 \hline 68 Memory Allocator & Version & Configurations \\ 69 \hline 70 dl & & \\ 71 \hline 72 hoard & & \\ 73 \hline 74 je & & \\ 75 \hline 76 pt3 & & \\ 77 \hline 78 rp & & \\ 79 \hline 80 tbb & & \\ 81 \hline 82 tc & & \\ 83 \end{tabularx} 84 85 %(FIX ME: complete table) 68 \\ 69 \\ 70 {\bf Version:} intel tbb 2020 update 2, tbb\_interface\_version == 11102\\ 71 {\bf Configuration:} Compiled with tbbmalloc's default configurations and Makefile.\\ 72 {\bf Compilation command:}\\ 73 make 86 74 87 75 \section{Experiment Environment} 88 We conducted these experiments ... (FIX ME: what machine and which specifications to add). 89 90 We used our micro becnhmark suite (FIX ME: cite mbench) to evaluate other memory allocators (FIX ME: cite above memory allocators) and our uHeapLmmm. 76 We used our micro becnhmark suite (FIX ME: cite mbench) to evaluate these memory allocators \ref{sec:curAllocatorSec} and our own memory allocator uHeap \ref{sec:allocatorSec}. 91 77 92 78 \section{Results} 79 FIX ME: add experiment, knobs, graphs, description+analysis 80 81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 82 %% CHURN 83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 84 85 \subsection{Churn Benchmark} 86 87 Churn benchmark tested memory allocators for speed under intensive dynamic memory usage. 88 89 This experiment was run with following configurations: 90 91 -maxS : 500 92 93 -minS : 50 94 95 -stepS : 50 96 97 -distroS : fisher 98 99 -objN : 100000 100 101 -cSpots : 16 102 103 -threadN : \{ 1, 2, 4, 8, 16 \} * 104 105 * Each allocator was tested for its performance across different number of threads. Experiment was repeated for each allocator for 1, 2, 4, 8, and 16 threads by setting the configuration -threadN. 106 107 Results are shown in figure \ref{fig:churn} for both algol and nasus. 108 X-axis shows number of threads. Each allocator's performance for each thread is shown in different colors. 109 Y-axis shows the total time experiment took to finish. 110 111 \begin{figure} 112 \centering 113 \subfigure[Algol]{ \includegraphics[width=0.9\textwidth]{evaluations/algol-perf-eps/churn} } 114 \subfigure[Nasus]{ \includegraphics[width=0.9\textwidth]{evaluations/nasus-perf-eps/churn} } 115 \caption{Churn} 116 \label{fig:churn} 117 \end{figure} 118 119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 %% THRASH 121 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 122 123 \subsection{Cache Thrash} 124 125 Thrash benchmark tested memory allocators for active false sharing. 126 127 This experiment was run with following configurations: 128 129 -cacheIt : 1000 130 131 -cacheRep : 1000000 132 133 -cacheObj : 1 134 135 -threadN : \{ 1, 2, 4, 8, 16 \} * 136 137 * Each allocator was tested for its performance across different number of threads. Experiment was repeated for each allocator for 1, 2, 4, 8, and 16 threads by setting the configuration -threadN. 138 139 Results are shown in figure \ref{fig:cacheThrash} for both algol and nasus. 140 X-axis shows number of threads. Each allocator's performance for each thread is shown in different colors. 141 Y-axis shows the total time experiment took to finish. 142 143 \begin{figure} 144 \centering 145 \subfigure[Algol]{ \includegraphics[width=0.9\textwidth]{evaluations/algol-perf-eps/cache-time-0-thrash} } 146 \subfigure[Nasus]{ \includegraphics[width=0.9\textwidth]{evaluations/nasus-perf-eps/cache-time-0-thrash} } 147 \caption{Cache Thrash} 148 \label{fig:cacheThrash} 149 \end{figure} 150 151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 152 %% SCRATCH 153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 154 155 \subsection{Cache Scratch} 156 157 Scratch benchmark tested memory allocators for program induced allocator preserved passive false sharing. 158 159 This experiment was run with following configurations: 160 161 -cacheIt : 1000 162 163 -cacheRep : 1000000 164 165 -cacheObj : 1 166 167 -threadN : \{ 1, 2, 4, 8, 16 \} * 168 169 * Each allocator was tested for its performance across different number of threads. Experiment was repeated for each allocator for 1, 2, 4, 8, and 16 threads by setting the configuration -threadN. 170 171 Results are shown in figure \ref{fig:cacheScratch} for both algol and nasus. 172 X-axis shows number of threads. Each allocator's performance for each thread is shown in different colors. 173 Y-axis shows the total time experiment took to finish. 174 175 \begin{figure} 176 \centering 177 \subfigure[Algol]{ \includegraphics[width=0.9\textwidth]{evaluations/algol-perf-eps/cache-time-0-scratch} } 178 \subfigure[Nasus]{ \includegraphics[width=0.9\textwidth]{evaluations/nasus-perf-eps/cache-time-0-scratch} } 179 \caption{Cache Scratch} 180 \label{fig:cacheScratch} 181 \end{figure} 182 183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 184 %% SPEED 185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 186 187 \subsection{Speed Benchmark} 188 189 Speed benchmark tested memory allocators for program induced allocator preserved passive false sharing. 190 191 This experiment was run with following configurations: 192 193 -threadN : sets number of threads, K\\ 194 -cSpots : sets number of spots for churn, M\\ 195 -objN : sets number of objects per thread, N\\ 196 -maxS : sets max object size\\ 197 -minS : sets min object size\\ 198 -stepS : sets object size increment\\ 199 -distroS : sets object size distribution 200 201 %speed-1-malloc-null.eps 202 \begin{figure} 203 \centering 204 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-1-malloc-null} 205 \caption{speed-1-malloc-null} 206 \label{fig:speed-1-malloc-null} 207 \end{figure} 208 209 %speed-2-free-null.eps 210 \begin{figure} 211 \centering 212 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-2-free-null} 213 \caption{speed-2-free-null} 214 \label{fig:speed-2-free-null} 215 \end{figure} 216 217 %speed-3-malloc.eps 218 \begin{figure} 219 \centering 220 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-3-malloc} 221 \caption{speed-3-malloc} 222 \label{fig:speed-3-malloc} 223 \end{figure} 224 225 %speed-4-realloc.eps 226 \begin{figure} 227 \centering 228 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-4-realloc} 229 \caption{speed-4-realloc} 230 \label{fig:speed-4-realloc} 231 \end{figure} 232 233 %speed-5-free.eps 234 \begin{figure} 235 \centering 236 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-5-free} 237 \caption{speed-5-free} 238 \label{fig:speed-5-free} 239 \end{figure} 240 241 %speed-6-calloc.eps 242 \begin{figure} 243 \centering 244 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-6-calloc} 245 \caption{speed-6-calloc} 246 \label{fig:speed-6-calloc} 247 \end{figure} 248 249 %speed-7-malloc-free.eps 250 \begin{figure} 251 \centering 252 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-7-malloc-free} 253 \caption{speed-7-malloc-free} 254 \label{fig:speed-7-malloc-free} 255 \end{figure} 256 257 %speed-8-realloc-free.eps 258 \begin{figure} 259 \centering 260 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-8-realloc-free} 261 \caption{speed-8-realloc-free} 262 \label{fig:speed-8-realloc-free} 263 \end{figure} 264 265 %speed-9-calloc-free.eps 266 \begin{figure} 267 \centering 268 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-9-calloc-free} 269 \caption{speed-9-calloc-free} 270 \label{fig:speed-9-calloc-free} 271 \end{figure} 272 273 %speed-10-malloc-realloc.eps 274 \begin{figure} 275 \centering 276 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-10-malloc-realloc} 277 \caption{speed-10-malloc-realloc} 278 \label{fig:speed-10-malloc-realloc} 279 \end{figure} 280 281 %speed-11-calloc-realloc.eps 282 \begin{figure} 283 \centering 284 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-11-calloc-realloc} 285 \caption{speed-11-calloc-realloc} 286 \label{fig:speed-11-calloc-realloc} 287 \end{figure} 288 289 %speed-12-malloc-realloc-free.eps 290 \begin{figure} 291 \centering 292 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-12-malloc-realloc-free} 293 \caption{speed-12-malloc-realloc-free} 294 \label{fig:speed-12-malloc-realloc-free} 295 \end{figure} 296 297 %speed-13-calloc-realloc-free.eps 298 \begin{figure} 299 \centering 300 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-13-calloc-realloc-free} 301 \caption{speed-13-calloc-realloc-free} 302 \label{fig:speed-13-calloc-realloc-free} 303 \end{figure} 304 305 %speed-14-{m,c,re}alloc-free.eps 306 \begin{figure} 307 \centering 308 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/speed-14-{m,c,re}alloc-free} 309 \caption{speed-14-{m,c,re}alloc-free} 310 \label{fig:speed-14-{m,c,re}alloc-free} 311 \end{figure} 312 313 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 314 %% MEMORY 315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 93 316 94 317 \subsection{Memory Benchmark} 95 FIX ME: add experiment, knobs, graphs, and description 96 97 \subsection{Speed Benchmark} 98 FIX ME: add experiment, knobs, graphs, and description 99 100 \subsubsection{Speed Time} 101 FIX ME: add experiment, knobs, graphs, and description 102 103 \subsubsection{Speed Workload} 104 FIX ME: add experiment, knobs, graphs, and description 105 106 \subsection{Cache Scratch} 107 FIX ME: add experiment, knobs, graphs, and description 108 109 \subsubsection{Cache Scratch Time} 110 FIX ME: add experiment, knobs, graphs, and description 111 112 \subsubsection{Cache Scratch Layout} 113 FIX ME: add experiment, knobs, graphs, and description 114 115 \subsection{Cache Thrash} 116 FIX ME: add experiment, knobs, graphs, and description 117 118 \subsubsection{Cache Thrash Time} 119 FIX ME: add experiment, knobs, graphs, and description 120 121 \subsubsection{Cache Thrash Layout} 122 FIX ME: add experiment, knobs, graphs, and description 318 319 %mem-1-prod-1-cons-100-cfa.eps 320 \begin{figure} 321 \centering 322 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-cfa} 323 \caption{mem-1-prod-1-cons-100-cfa} 324 \label{fig:mem-1-prod-1-cons-100-cfa} 325 \end{figure} 326 327 %mem-1-prod-1-cons-100-dl.eps 328 \begin{figure} 329 \centering 330 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-dl} 331 \caption{mem-1-prod-1-cons-100-dl} 332 \label{fig:mem-1-prod-1-cons-100-dl} 333 \end{figure} 334 335 %mem-1-prod-1-cons-100-glc.eps 336 \begin{figure} 337 \centering 338 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-glc} 339 \caption{mem-1-prod-1-cons-100-glc} 340 \label{fig:mem-1-prod-1-cons-100-glc} 341 \end{figure} 342 343 %mem-1-prod-1-cons-100-hrd.eps 344 \begin{figure} 345 \centering 346 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-hrd} 347 \caption{mem-1-prod-1-cons-100-hrd} 348 \label{fig:mem-1-prod-1-cons-100-hrd} 349 \end{figure} 350 351 %mem-1-prod-1-cons-100-je.eps 352 \begin{figure} 353 \centering 354 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-je} 355 \caption{mem-1-prod-1-cons-100-je} 356 \label{fig:mem-1-prod-1-cons-100-je} 357 \end{figure} 358 359 %mem-1-prod-1-cons-100-pt3.eps 360 \begin{figure} 361 \centering 362 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-pt3} 363 \caption{mem-1-prod-1-cons-100-pt3} 364 \label{fig:mem-1-prod-1-cons-100-pt3} 365 \end{figure} 366 367 %mem-1-prod-1-cons-100-rp.eps 368 \begin{figure} 369 \centering 370 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-rp} 371 \caption{mem-1-prod-1-cons-100-rp} 372 \label{fig:mem-1-prod-1-cons-100-rp} 373 \end{figure} 374 375 %mem-1-prod-1-cons-100-tbb.eps 376 \begin{figure} 377 \centering 378 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-1-prod-1-cons-100-tbb} 379 \caption{mem-1-prod-1-cons-100-tbb} 380 \label{fig:mem-1-prod-1-cons-100-tbb} 381 \end{figure} 382 383 %mem-4-prod-4-cons-100-cfa.eps 384 \begin{figure} 385 \centering 386 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-cfa} 387 \caption{mem-4-prod-4-cons-100-cfa} 388 \label{fig:mem-4-prod-4-cons-100-cfa} 389 \end{figure} 390 391 %mem-4-prod-4-cons-100-dl.eps 392 \begin{figure} 393 \centering 394 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-dl} 395 \caption{mem-4-prod-4-cons-100-dl} 396 \label{fig:mem-4-prod-4-cons-100-dl} 397 \end{figure} 398 399 %mem-4-prod-4-cons-100-glc.eps 400 \begin{figure} 401 \centering 402 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-glc} 403 \caption{mem-4-prod-4-cons-100-glc} 404 \label{fig:mem-4-prod-4-cons-100-glc} 405 \end{figure} 406 407 %mem-4-prod-4-cons-100-hrd.eps 408 \begin{figure} 409 \centering 410 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-hrd} 411 \caption{mem-4-prod-4-cons-100-hrd} 412 \label{fig:mem-4-prod-4-cons-100-hrd} 413 \end{figure} 414 415 %mem-4-prod-4-cons-100-je.eps 416 \begin{figure} 417 \centering 418 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-je} 419 \caption{mem-4-prod-4-cons-100-je} 420 \label{fig:mem-4-prod-4-cons-100-je} 421 \end{figure} 422 423 %mem-4-prod-4-cons-100-pt3.eps 424 \begin{figure} 425 \centering 426 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-pt3} 427 \caption{mem-4-prod-4-cons-100-pt3} 428 \label{fig:mem-4-prod-4-cons-100-pt3} 429 \end{figure} 430 431 %mem-4-prod-4-cons-100-rp.eps 432 \begin{figure} 433 \centering 434 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-rp} 435 \caption{mem-4-prod-4-cons-100-rp} 436 \label{fig:mem-4-prod-4-cons-100-rp} 437 \end{figure} 438 439 %mem-4-prod-4-cons-100-tbb.eps 440 \begin{figure} 441 \centering 442 \includegraphics[width=1\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-tbb} 443 \caption{mem-4-prod-4-cons-100-tbb} 444 \label{fig:mem-4-prod-4-cons-100-tbb} 445 \end{figure}
Note: See TracChangeset
for help on using the changeset viewer.