X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=doc%2Fsrc%2Fresults.tex;h=a4ca2e8037635d44e1719d273ef7b10c7d8e8f9f;hb=HEAD;hp=f2a328e378c59bad4cae80ea6fafe798a8ace454;hpb=ff860ca1651625fa3c6eee06796e7b341a4d66fa;p=p2p-kernel-protocol.git diff --git a/doc/src/results.tex b/doc/src/results.tex index f2a328e..a4ca2e8 100644 --- a/doc/src/results.tex +++ b/doc/src/results.tex @@ -1,23 +1,81 @@ \section{Results} \label{sec:results} -The results of the tests performed. + +Our goal is to stress our implementation in order to determine if it is +viable in terms of performance. In order to achieve this, we have compared our +results with the \texttt{sendfile} system call. As already stated in Section +\ref{sec:intro}, this function uses a zero-copy mechanism to avoid passing +information from kernel space and back. \begin{table} \begin{center} - \begin{tabular}{| c | c | c | c | c |} + \begin{tabular}{| c | c | c | c | c | c |} \hline - Sent(MB) & Time(s) & Two peers & Tree peers & Six peers \\ + Sent(MB) & \multicolumn{5}{|c|} {Time} \\ + \cline{2-6} + & one peer & two peers & tree peers & six peers & eight peers\\ \hline - 32 & 4 & 10 & 18 & 49 \\ + 32 & 4 & 10 & 18 & 49 & 61 \\ \hline - 64 & 10 & 20 & 35 & 80 \\ + 64 & 10 & 20 & 35 & 80 & 115 \\ \hline - 128 & 20 & 42 & 58 & 226 \\ + 128 & 20 & 42 & 58 & 226 & 347\\ \hline - 256 & 41 & 75 & 129 & 385 \\ + 256 & 41 & 75 & 129 & 385 & 534 \\ \hline \end{tabular} \end{center} \caption{Sendfile Results} - \label{sendfile_results} + \label{sendfile-results} +\end{table} + +Section \ref{sec:testing} largely details the test scenarios we have +performed. Particularly, this is the test where we varied the number of peers +from 1 to 8. The results gathered are displayed in Table \ref{sendfile-results}. +We can easily observe that the time needed to send files of different size grows +almost linearly, with a factor lower than 1. This was expected because for each +peer, we execute at least one more \texttt{sendfile} system call. + +For the second test, we used our peer-to-peer kernel protocol for sending +files on with sizes growing from 32MB up to 256MB. The number of peers used in +this test was varied from 1 to 8. The results presented in Table, +\ref{p2pkp-results}, show an almost linear growth of the time needed to send the +files from sender to peers, but with a smaller factor than the one achieved in +case of the \texttt{sendfile} system call. For small number of peers, one, two +or three, \texttt{senfile} has a higher performance rate, but for a greater +number of peers our implementation has better results. + +\begin{table} + \begin{center} + \begin{tabular}{| c | c | c | c | c | c |} + \hline + Sent(MB) & \multicolumn{5}{|c|} {Time} \\ + \cline{2-6} + & one peer & two peers & tree peers & six peers & eight peers\\ + \hline + 32 & 13 & 29 & 35 & 45 & 53 \\ + \hline + 64 & 34 & 53 & 67 & 103 & 125 \\ + \hline + 128 & 66 & 118 & 142 & 167 & 197 \\ + \hline + 256 & 121 & 223 & 277 & 378 & 446 \\ + \hline + \end{tabular} + \end{center} + \caption{P2PKP Results} + \label{p2pkp-results} \end{table} + +We have also compiled a graphic, shown in Figure \ref{fig:comp}, that better +exposes the differences between \texttt{sendfile} and the P2PKP kernel module. +As we can see, while the number of peers increase, our implementation +overcomes the performance of \texttt{sendfile}. + +\begin{figure}[h!] + \centering + \includegraphics[scale=0.6]{img/comparison.png} + \caption{\texttt{sendfile} vs P2PKP} + \label{fig:comp} +\end{figure} +