Tuesday May 06, 2008

A Handy Tool for Network Performance Measurement - uPerf

uPerf stands for unified Performance. It is a micro-benchmark to measure server networking performance. You must be wondering that there are already a lot of open source network benchmarking tools such as iperf and netperf, why uPerf? One big problem of these existing tools is that they do not model real-world applications. They usually just generate simple TCP/UDP flows and collect basic statistics such as throughput and latency. Real applications can mix and match multiple protocols. For example, web server applications usually involves a small TCP read and a large TCP write; while VoIP forwarding servers contain consecutive UDP reads and writes. What's more, applications need to spend some CPU cycles on their own logic here and there, which affects the real networking performance too. With uPerf, different networking operations (We call them "flowops" in uPerf) can be mixed together realistically, with application processing time (We call them "think flowop") placed appropriately. In other words, we can mimic real application network traffic characteristics by writing an uPerf profile for it.

Too much theory, let's come to the real profiles. In the following text I am gonna give two examples. The first one is bulk throughput profile. As a server, in some cases it needs to push out bulk data consistently. Video server or data storage server are two examples. In other cases the server needs to receive bulk data for a while. Backup is a typical case. The following profile can mimic the bulk throughput in both directions:


<?xml version="1.0"?>
    <profile name="bulkperf">
        <group nthreads="$nth">
            <transaction iterations="1">
                <flowop type="connect" options="remotehost=10.0.0.101 protocol=$pro wndsz=$wnd"/>
            </transaction>
            <transaction duration="$dur">
                <flowop type="$op" options="size=$msg "/>
            </transaction>
            <transaction iterations="1">
                <flowop type="disconnect" />
            </transaction>
        </group>
    </profile>

In this profile, the shell variable $nth is number of threads, $pro is transport protocol and can be "tcp", "udp" or "sctp", $op is "read" or "write", $wnd is window size, $dur is duration of the run, $msg is read/write message size.

What if we want to simulate a web server? The network traffic on web servers usually consists an incoming small request message followed by a large response message. In the following web server profile, two groups of threads are deployed. In practice, we usually use a client to represent a group. Therefore, in this simulation, two clients are used to drive a SUT.


<?xml version="1.0"?>
    <profile name="specweb">
        <group nthreads="$nth">
            <transaction iterations="1">
                <flowop type="connect" options="remotehost=10.0.0.101 protocol=$pro wndsz=32k"/>
            </transaction>
            <transaction duration="$dur">
                <flowop type="read" options="size=$read_msg "/>
                  <flowop type="write" options="size=$write_msg "/>
           </transaction>
            <transaction iterations="1">
                <flowop type="disconnect" />
            </transaction>
        </group>
        <group nthreads="$nth">
            <transaction iterations="1">
                <flowop type="connect" options="remotehost=10.0.0.102 protocol=$pro wndsz=32k"/>
            </transaction>
            <transaction duration="$dur">
                <flowop type="read" options="size=$read_msg "/>
                  <flowop type="write" options="size=$write_msg "/>
           </transaction>
            <transaction iterations="1">
                <flowop type="disconnect" />
            </transaction>
        </group>
    </profile>
 

By arranging the flowops and protocols properly, a lot of real applications can be simulated by uPerf. So play with it, and share with the community good workload profiles and your experience. Find more detail in http://www.uperf.org

About

Ding He

Search


Categories
Archives
« March 2017
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today