4 Our goal is to stress our implementation in order to determine if it is
5 viable in terms of performance. In order to achieve this, we have compared our
6 results with the \texttt{sendfile} system call. As already stated in Section
7 \ref{sec:intro}, this function uses a zero-copy mechanism to avoid passing
8 information from kernel space and back.
12 \begin{tabular}{| c | c | c | c | c | c |}
14 Sent(MB) & \multicolumn{5}{|c|} {Time} \\
16 & one peer & two peers & tree peers & six peers & eight peers\\
18 32 & 4 & 10 & 18 & 49 & 61 \\
20 64 & 10 & 20 & 35 & 80 & 115 \\
22 128 & 20 & 42 & 58 & 226 & 347\\
24 256 & 41 & 75 & 129 & 385 & 534 \\
28 \caption{Sendfile Results}
29 \label{sendfile-results}
32 Section \ref{sec:testing} largely details the test scenarios we have
33 performed. Particularly, this is the test where we varied the number of peers
34 from 1 to 8. The results gathered are displayed in Table \ref{sendfile-results}.
35 We can easily observe that the time needed to send files of different size grows
36 almost linearly, with a factor lower than 1. This was expected because for each
37 peer, we execute at least one more \texttt{sendfile} system call.
39 For the second test, we used our peer-to-peer kernel protocol for sending
40 files on with sizes growing from 32MB up to 256MB. The number of peers used in
41 this test was varied from 1 to 8. The results presented in Table,
42 \ref{p2pkp-results}, show an almost linear growth of the time needed to send the
43 files from sender to peers, but with a smaller factor than the one achieved in
44 case of the \texttt{sendfile} system call. For small number of peers, one, two
45 or three, \texttt{senfile} has a higher performance rate, but for a greater
46 number of peers our implementation has better results.
50 \begin{tabular}{| c | c | c | c | c | c |}
52 Sent(MB) & \multicolumn{5}{|c|} {Time} \\
54 & one peer & two peers & tree peers & six peers & eight peers\\
56 32 & 13 & 29 & 35 & 45 & 53 \\
58 64 & 34 & 53 & 67 & 103 & 125 \\
60 128 & 66 & 118 & 142 & 167 & 197 \\
62 256 & 121 & 223 & 277 & 378 & 446 \\
66 \caption{P2PKP Results}
70 We have also compiled a graphic, shown in Figure \ref{fig:comp}, that better
71 exposes the differences between \texttt{sendfile} and the P2PKP kernel module.
72 As we can see, while the number of peers increase, our implementation
73 overcomes the performance of \texttt{sendfile}.
77 \includegraphics[scale=0.6]{img/comparison.png}
78 \caption{\texttt{sendfile} vs P2PKP}