Virtual interfaces performance

S

sa6kad

Guest
Hi. I am relatively new to Linux, but currently i am working on my thesis that requires some measurements and experiments of Linux performance while using hundreds (even thousands) virtual interfaces. My current task is to find out...
"1. How long does it take for kernel to (1) start and (2) shutdown a virtual interface? For that purpose, I would write a script that sequentially starts and shutdowns, say, 1000 virtual interfaces and observe the start/shutdown durations. Among these 1000 samples, I'd calculate the min/max/avg/stddev. I'd repeat the same experiment, but instead of sequentially spawning interfaces, this time I'd spawn them using 2, 3, 4, and so on threads. This way, I'd be able to observe the kernel's performance under concurrent load."

I wrote a simple script that starts N interfaces and assigns IP address to them:
Code:
echo "Enter number of interfaces: "
read int
a=8 #I use 10.0.0.0/20 network, but here i start from 10.0.8.0
b=2 #Physical interface has address 10.0.8.1, so virtual starts from 10.0.8.2

for (( i=1; i<=$int; i++ ))
do
   ifconfig eth2:$i 10.0.$a.$b/20
   
     if [ $b -eq 255 ] #incrementing third octet of the IP address when forth reaches 255
     then ((a++))
       b=0
     else (( b++ ))     
     fi
   
done

Similar script stops all the interfaces when needed with the following code:
Code:
ifconfig eth2:$i down

So, my questions are:
1. How to measure this:
sequentially starts and shutdowns, say, 1000 virtual interfaces and observe the start/shutdown durations
2. How to do this part:
but instead of sequentially spawning interfaces, this time I'd spawn them using 2, 3, 4, and so on threads
3. What tools, techniques to use to observe/measure this:
...to observe the kernel's performance under concurrent load.

Thank you.
 


ss may be able to display some useful information. Or maybe looking through the /proc directory?
 

Members online


Top