doc: final revise of the document
[p2p-kernel-protocol.git] / doc / src / testing.tex
1 \section{Testing Scenarios}
2 \label{subsec:testing}
3 In order to test our implementation performance, we have settled two virtual
4 machines located in the same network and installed the P2PKP module on both of
5 them. Our goal was to compare the results of our implementation with the
6 results of the \texttt{sendfile} system call, the solution that offers the
7 highest performance for file transferring over the network nowadays. We rely
8 on the assumption that for sending a file to multiple destinations, the
9 user space application would have to execute several \texttt{sendfile} system
10 calls, one for each destination. Our module will require only one
11 \texttt{write} system call to achieve the same behavior.
12
13 Our testing scenarios imply sending several files, with different sizes, over
14 the network, to different numbers of destinations/peers. Following this, we have
15 randomly generated four different files, with sizes varying from 32MB, to 256
16 MB. The number of sites was also varying, starting from a single site up to
17 eight sites.
18
19 Our measurements were done not only between the two virtual machine deployed,
20 but also on the loopback interfaces. We considered that the tests would be
21 more relevant if they were performed on different machines, because this would
22 be the practical use case. However, the results were not different at all, as
23 the module algorithm is the same, regardless the device implementation.
24 Therefore, in Section \ref{sec:results}, we have only specified the
25 measurements we obtained for the tests between the two virtual machines
26 deployed.
27
28 The only metric we considered in our tests is the time spent on the
29 distribution of the file content, from a single peer, to multiple
30 destinations. We decided that this is the most relevant metric from the
31 application's perspective, as a programmer looks for the best solution
32 performance in terms of time spent. Section \ref{sec:results} illustrates the
33 test results we have obtained and performs a comparison between the two
34 solutions.