From f5f8807a8227b99b87c8dafc88fcf773326efc0a Mon Sep 17 00:00:00 2001 From: TudorCazangiu Date: Wed, 6 Jun 2012 06:06:10 +0300 Subject: [PATCH] results and conclusion --- doc/img/comparison.png | Bin 0 -> 10424 bytes doc/src/conclusions.tex | 5 +++- doc/src/results.tex | 49 ++++++++++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 16 deletions(-) create mode 100755 doc/img/comparison.png diff --git a/doc/img/comparison.png b/doc/img/comparison.png new file mode 100755 index 0000000000000000000000000000000000000000..e620487c00d45f67097cd3b32bab53c3f912fc6c GIT binary patch literal 10424 zcmdsdc{tQ<`?s6QSi)4+tRq`uDoe74L2eaMD2!w$TlPJSjGe66CE1tAzGcry$et~` z?8Z9Q-!)VB^E|)z{r&g8$NR_Y=;-*)%yoUQbHC2>bDn`}50uW6Gm#S!5uI1Qi%=&b zBGx7%`pX_d48E}n_&GyF#Otk$kbUIxV>S6u|FL8JY4@b9m-J+N68yf#FT?&?+Q6qK z=cvbnI__N1U{y%EkJ&iOg;FGqxWxCBLOVPDl8N$L?xm2|H#0MJHeS~LB%AuH`qmkp zHG0{P>sh$3PfATnM_xSBA99mslXSTz{bFyTsBZCirF3usYa>HKM6?+1J;MoTK|qLz zUP1mMBBJ2{pI~Q*i0+`k1DXc>2L;5k%l&_|=>MFRp7q7`_0ykz)JWI4n3k3noeJxY zw%Ay@j9#tjC7? z`>$MX4fpi)oKCB$aqoSnK*a>a;S5KMuU*NL=5N{4);YVQ}zgAX4f`Z-ei6G^9kmNEQ$Rlb!mi>vB6y3u^<92ae)~;t_qTXfm z`AB?B4A-jJNA2f^hAhG`ImBJO^0dZfnLMny&C;lqbc zPUSDI2?~De>@0m+Fj`^L-PPsTgN8sk49N1hpyY;RHd46RsG?ddW*|??*wEQ|?_08j z>9-`l`n~OK-kTC0`x~{cTkjW)47If4dd-qVt$qOh->(v%(3hP?lhkyFK%~0-NU2+@ zLPA3BDJuh3qeBM<2JGzY&iTnE^$redl7^ybpn%7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n8$7(V=7Nn)v6kI@rdFXYBNS@4 zHGlu)3Ydjjr09KnQLirb)XP%M;g`6Cguch70xs|S_wU)+yqSkw5=K0#DZrJrSlLek zCF!I@dqtvEc@H8nTlx)No}f^kzO%@4r#1eDAp*=-_=HXvE#&9qD6@iAC_U0embrH8 zn*(+5$raorY5(V`I8@#m1d&^KkL1px^^$hS0W|_Hh1i*X_kfmkNNsVU^N5zz`0w zHu?H(fMWr;%b4_0Wkdrx7#9+qr~Rf-_uiU-uEFZ#qIA2 z*-OXQjm4C~@Px8*;L9Tb>vixXi90UMb;cEFE`w$=fJuLWkb~h-RaLdIwyw9G@?Dg` z2Q=ZJZ^mG1rAy~&wL{KE;r_y;$JYI4&whpjgWZ~3*SvZxBWrA&xj1SyQCs!#<7P|X z#p%aOOH1e6V>tAmN``;oWo56G@ILYQEjEY&Q*bLR9E?<<^a}MG1ig<&Cr?BT+bDZ= z4i1)!fXTbLyDQ892hN~uz0{6rplvU?%#*SKx)^dipmYii3Q}+LCGUa+k{brDXJ%%W z*n!*?0BoW*papH-@rLVN^B%x|@0xd5KiAPo#4;Ex%baY6r+V(bbqSa*!*q7C)M6sw zdiwfsar8S-M=^SmgAnuC8A>;6!ix6+c;AQnHTDZssU+aj|AlG1|9Ob-6)1M-9@P|l TUO7A=0)NU14-kcN&wT$2@7MO( literal 0 HcmV?d00001 diff --git a/doc/src/conclusions.tex b/doc/src/conclusions.tex index d53f2d4..bc5e6d1 100644 --- a/doc/src/conclusions.tex +++ b/doc/src/conclusions.tex @@ -1,3 +1,6 @@ \section{Conclusions and Further Work} \label{sec:conclusions} -Our conclusions based on the results gathered at Section \ref{sec:results}. + +In this paper we presented an kernel alternative for building peer to peer systems. We done this because when files are transferred in peer to peer system important time is lost when context switch is done because of system calls. With our basic implementation, we demonstrate the viability of file transfer implemented in kernel, mainly because the performances were acceptable when a small number of peers are transferring the same file, compared to \texttt{sendfile}, and good for a large number of peers who transfer the same file. + +To make the protocol viable for real peer-to-peer systems important improvements are needed. First a mechanism for sending just some parts of a file will be needed. Also support for the TCP protocol must be implemented in order to make transfers safe and reliable. diff --git a/doc/src/results.tex b/doc/src/results.tex index fa18e4f..a08b4fc 100644 --- a/doc/src/results.tex +++ b/doc/src/results.tex @@ -1,43 +1,62 @@ \section{Results} \label{sec:results} -The results of the tests performed. + +We want to view if our implementation is viable in terms of performances. To do this we compare our results with the results of \texttt{sendfile} system call. The \texttt{sendfile} command (\textbf{ssize\_t sendfile(int} \textit{out\_fd,} \textbf{int} \textit{in\_fd,} \textbf{off\_t *}\textit{offset,} \textbf{size\_t} \textit{count}\textbf{);}) is used to send \texttt{count} bytes from \texttt{in\_fd} to \texttt{out\_fd}. \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} +In the first test we sent files of 32, 64, 128 and 256 MB from one node to a different number of peers. We varied the number of peers from 1 to 8. The results can be seen in Table \ref{sendfile-results}. We can see that the time needed to send files of different size grows almost linearly, with a factor smaller than 1. This is expected because for each peer we execute a different sendfile system call. + +In the second test, we used our peer-to-peer kernel protocol also on files with size growing from 32MB to 256MB. The number of peers used in 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 the sender to peers but with a smaller factor than in the case of \texttt{sendfile}. For small number of peers, one two or three, the results were better in the tests made with sendfile, but for a greater number of peers the results are better when using the p2pkp. + \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 & 13 & 29 & 35 & 45 \\ + 32 & 13 & 29 & 35 & 45 & 53 \\ \hline - 64 & 34 & 53 & 67 & 103 \\ + 64 & 34 & 53 & 67 & 103 & 125 \\ \hline - 128 & 66 & 118 & 142 & 167 \\ + 128 & 66 & 118 & 142 & 167 & 197 \\ \hline - 256 & 121 & 223 & 277 & 378 \\ + 256 & 121 & 223 & 277 & 378 & 446 \\ \hline \end{tabular} \end{center} \caption{P2PKP Results} - \label{p2pkp_results} + \label{p2pkp-results} \end{table} + +We also made a graphic shown in Figure \ref{fig:comp} to view more clearly the differences between sendfile and peer-to-peer kernel protocol. As we can see, with the increase of the number of peers p2pkp become more and more good, and finally overcame the performances of sendfile. + +\begin{figure}[h!] + \centering + \includegraphics[scale=0.6]{img/comparison.png} + \caption{Comparison} + \label{fig:comp} +\end{figure} + -- 2.20.1