[ovs-discuss] ????: Method to verify openvswitch unicast netlink I/O performance

Thomas Graf tgraf at redhat.com
Wed Dec 4 08:56:50 UTC 2013


On 12/04/2013 07:28 AM, Ben Pfaff wrote:
> I'm surprised you're not CCing Thomas then.
>
> Thomas's setup and results look pretty clear to me.  pktgen to generate
> traffic.  Without the patch, 74 kpps, with the patch 206 kpps, roughly
> 3x performance.
>
> On Wed, Dec 04, 2013 at 06:22:17AM +0000, Zhuangyuxin wrote:
>> Actually, the result I mentioned is from Thomas' review. Here's the
>> whole snippet. I'm wondering how to test and measure the unicast
>> netlink I/O performance improvement.

I'm glad to share additional details.

Attached is the script to configure and run pktgen. You have to modify
CPU_MAX and CPU_USE to match the number of cores and number of threads.
You want to leave some cores to run upcall threads as well.

The script as-is produces jumbo frames and no checksumming is performed
as it would happen for offloaded checksummin. Setting the flag "udpsum"
will triger UDP checksum calculation in the upcall.

OVS setup:
ovs-vsctl add-br br0
ovs-vsctl add-port br0 int0 -- set Interface int0 type=internal
-------------- next part --------------
#!/bin/bash

modprobe pktgen

function pgset() {
    local result
    echo $1 > $PGDEV
}

CPU_MAX=7
CPU_USE=4
OUTDEV="int0"

# Cleanup
for processor in $(seq 0 $CPU_MAX)
do
	PGDEV=/proc/net/pktgen/kpktgend_$processor
	pgset "rem_device_all"
done

for ((processor=0;processor<$CPU_USE;processor++))
do
	PGDEV=/proc/net/pktgen/kpktgend_$processor
	pgset "add_device $OUTDEV@$processor"
 
	PGDEV=/proc/net/pktgen/$OUTDEV@$processor
	pgset "count 5000000"
	pgset "flag QUEUE_MAP_CPU"
	pgset "pkt_size 9000"
	pgset "dst 10.0.0.1" 
	pgset "dst_mac 5e:ed:0f:2c:cb:40"
	pgset "flag IPDST_RND"
	pgset "dst_min 10.0.0.0"
	pgset "dst_max 10.255.255.255"
	pgset "flows 5000000"
	pgset "flowlen 1"
done

# Time to run
PGDEV=/proc/net/pktgen/pgctrl

echo "Running... ctrl^C to stop"
pgset "start" 
echo "Done"

for ((processor=0;processor<$CPU_USE;processor++))
do
	cat /proc/net/pktgen/$OUTDEV@$processor
done


More information about the discuss mailing list