# A Secure Link-Layer Connectivity Platform for Multi-Site NFV Services
## 4 Implementation and Validation
### Performance Evaluation
#### 4.2.2 Parallelization of L2S Operations  
The results of our practical experiments suggest that L2S operations can be parallelized, taking advantage of the availability of multiple virtual processors. In the following, we present a methodology to gain a better understanding of the extent at which L2S can exploit parallelism. This methodology is based on the Amdahl's law [28], which is formulated as indicated in Equation (1). \[S(p)=\frac{1}{(1-f)+\frac{f}{p}} \tag{1}\]  
Let \(f\) be the fraction of a program or task that can be parallelized (\(1-f\) represents the fraction of the task that cannot exploit parallelism and needs to be executed sequentially). Let \(p\) be the number of processors (e.g., CPUs) that are available in a system to support the parallel execution of the fraction \(f\) of the task. Then, \(S(p)\) represents an upper bound for the speedup in the execution time of a task when using \(p\) processors, compared to the case where the task is executed on a single processor (i.e., sequentially). In our experiments, one of the communication endpoints acts as a TCP traffic source, sending at the maximum transmission rate that is supported by the LzS platform (this is the transmission rate that will be achieved by TCP congestion control mechanisms). Let \(b\) be an arbitrarily large number of bits produced by the traffic source. \(Th(p)\) denotes the maximum average throughput that be achieved when LzS VNFs are allocated \(p\) virtual CPUs. Considering that both LzS VNFs will require equivalent computation in executing VXLAN and IPsec related processes, \(Th(p)\) represents the maximum average throughput offered by each LzS VNF to the communication endpoints. In this situation, the time \(T(b,p)\) required to process an equivalent workload of \(b\) bits at any of our LzS VNFs can be approximated as:  
\[T(b,p)\approx\frac{b}{Th(p)} \tag{2}\]  
Using Equation (2), we can calculate the achievable speedup, \(S(b,p)\), in processing a workload of \(b\) bits when using \(p\) virtual CPUs at each LzS VNF instead of a single CPU. The achievable speedup can be expressed as the relation between \(T(b,1)\) and \(T(b,p)\), which exhibits no dependency on \(b\):  
\[S(b,p)=\frac{T(b,1)}{T(b,p)}\approx\frac{\frac{b}{Th(1)}}{\frac{b}{Th(p)}}= \frac{Th(p)}{Th(1)} \tag{3}\]  
Let us consider that the task of processing an arbitrarily large sequence of \(b\) bits at the LzS VNFs has a fraction \(f\) of operations that can be parallelized. Assuming that these operations can always exploit the \(p\) virtual CPUs that are available at the LzS VNFs, then the value given by Equation (3) will approximate the upper bound for the speedup determined by [PERSON]'s law (see Equation (1)). Under these assumptions, we can combine Equation (1) and Equation (3) to formulate the following expression:  
\[\frac{Th(p)}{Th(1)}\approx\frac{1}{(1-f)+\frac{f}{p}} \tag{4}\]  
From Equation (4), we can derive the fraction of the task that can be parallelized when processing an arbitrarily large sequence of \(b\) bits at the LzS VNFs:  
\[f\approx\frac{p}{p-1}\cdot\left[1-\frac{Th(1)}{Th(p)}\right] \tag{5}\]  
This equation will be valid for any number of \(p\) virtual CPUs, providing that all of them are used to execute the fraction \(f\) of operations that can be parallelized. In the case of LzS VNFs, this condition will most probably be satisfied when 2 virtual CPUs are used, i.e., \(p=2\). For higher values of \(p\), parallel operations might not always exploit all the available CPUs. In this case, Equation (5) will provide an underestimation of the actual fraction \(f\) of operations that can run in parallel. Going back to our experimentation results, in case that IPsec security mechanisms are enabled in the LzS VNFs and the MTU of the LzS VLANs is set to 1400 bytes (the MTU value that avoids fragmentation and reassembly procedures at the LzS VNFs), Equation (5) indicates that approximately 63.4% of all the operations on the LzS VNFs can be parallelized.