From owner-freebsd-net@FreeBSD.ORG Sun Jan 26 01:40:45 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53913559 for ; Sun, 26 Jan 2014 01:40:45 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0D11A2F for ; Sun, 26 Jan 2014 01:40:43 +0000 (UTC) Received: from 172.24.2.119 (EHLO szxeml207-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BPD48434; Sun, 26 Jan 2014 09:40:23 +0800 (CST) Received: from SZXEML410-HUB.china.huawei.com (10.82.67.137) by szxeml207-edg.china.huawei.com (172.24.2.56) with Microsoft SMTP Server (TLS) id 14.3.158.1; Sun, 26 Jan 2014 09:40:15 +0800 Received: from [127.0.0.1] (10.177.18.75) by szxeml410-hub.china.huawei.com (10.82.67.137) with Microsoft SMTP Server id 14.3.158.1; Sun, 26 Jan 2014 09:40:01 +0800 Message-ID: <52E46770.2000000@huawei.com> Date: Sun, 26 Jan 2014 09:40:00 +0800 From: Wang Weidong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Vincenzo Maffione Subject: Re: netmap: I got some troubles with netmap References: <52D74E15.1040909@huawei.com> <92C7725B-B30A-4A19-925A-A93A2489A525@iet.unipi.it> <52D8A5E1.9020408@huawei.com> <52DD1914.7090506@iet.unipi.it> <52E1E272.8060009@huawei.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.18.75] X-CFilter-Loop: Reflected Cc: =?ISO-8859-1?Q?facolt=E0?= , Giuseppe Lettieri , Luigi Rizzo , net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jan 2014 01:40:45 -0000 On 2014/1/24 22:56, Vincenzo Maffione wrote: > > > > 2014/1/24 Wang Weidong > > [...] > > Hello, > [...] > > You are using the old/deprecated QEMU command line syntax (-net), and therefore honestly It's not clear to me what kind of network configuration you are running. > Here, I use the default configuration which provided by the QEMU. > Please use our scripts "launch-qemu.sh", "prep-taps.sh", according to what described in the README.images file (attached). > Alternatively, use the syntax like in the following examples > > (#1) qemu-system-x86_64 archdisk.qcow -enable-kvm -device virtio-net-pci,netdev=mynet -netdev tap,ifname=tap01,id=mynet,script=no,downscript=no -smp 2 > (#2) qemu-system-x86_64 archdisk.qcow -enable-kvm -device e1000,mitigation=off,mac=00:AA:BB:CC:DD:01,netdev=mynet -netdev netmap,ifname=vale0:01,id=mynet -smp 2 > I will use them, thanks. > so that it's clear to us what network frontend (e.g. emulated NIC) and network backend (e.g. netmap, tap, vde, ecc..) you are using. > In example #1 we are using virtio-net as frontend and tap as backend, while in example #2 we are using e1000 as frontend and netmap as backend. > Also consider giving more than one core (e.g. -smp 2) to each guest, to mitigate receiver livelock problems. > > > > 2. I use the vale below: > qemu-system-x86_64 -m 2048 -boot c -net nic -net netmap,vale0:0 -hda /home/wwd/tinycores/20131019-tinycore-netmap.hdd -enable-kvm -vnc :0 > > Same for here, it's not clear what you are using. I guess each guest has an e1000 device and is connected to a different port of the same vale switch (e.g. vale0:0 and vale0:1)? > > Test with 2 vms from the same host > vale0 without device. > I use the pkt-gen, the speed is 938 Kpps > > > You should get ~4Mpps with e1000 frontend + netmap backend on a reasonably good machine. Make sure you have ./configure'd QEMU with --enable-e1000-paravirt. > > > I use netperf -H 10.0.0.2 -t UDP_STREAM, I got the speed is 195M/195M, then add -- -m 8, I only got 1.07M/1.07M. > When use the smaller msg size, the speed will smaller? > > > If you use e1000 with netperf (without pkt-gen) your performance is doomed to be horrible. Use e1000-paravirt (as a frontend) instead if you are interested in netperf experiment. > Also consider that the point in using the "-- -m8" options is experimenting high packet rates, so what you should measure here is not the througput in Mbps, but the packet rate: netperf reports the number of packets sent and received, so you can obtain the packet rate by dividing by the running time. > The throughput in Mbps is uninteresting, if you want high bulk throughput you just don't use "-- -m 8", but leave the defaults. > Using virtio-net in this case will help because of the TSO offloadings. > > cheers > Vincenzo > Hi Vincenzo, Nice, I will retest them. Thanks, Wang > > > with vale-ctl -a vale0:eth2, > use pkt-gen, the speed is 928 Kpps > I use netperf -H 10.0.0.2 -t UDP_STREAM, I got the speed is 209M/208M, then add -- -m 8, I only got 1.06M/1.06M. > > with vale-ctl -h vale0:eth2, > use pkt-gen, the speed is 928 Kpps > I use netperf -H 10.0.0.2 -t UDP_STREAM, I got the speed is 192M/192M, then add -- -m 8, I only got 1.06M/1.06M. > > Test with 2 vms form two host, > I only can test it by vale-ctl -h vale0:eth2 and set eth2 into promisc > use pkt-gen with the default params, the speed is about 750 Kpps > use netperf -H 10.0.0.2 -t UDP_STREAM, I got the speed is 160M/160M > Is this right? > > > 3. I can't use the l2 utils. > When I do the "sudo l2open -t eth0 l2recv[l2send], I got that "l2open ioctl(TUNSETIFF...): Invalid argument" > and "use l2open -r eth0 l2recv", wait a moment (only several seconds), I got the result: > TEST-RESULT: 0.901 kpps 1pkts > select/read=100.00 err=0 > > And I can't find the l2 utils from the net? Is it implemented by your team? > > All of them is tested on vms. > > Cheers. > Wang > > > > > > Cheers, > > Giuseppe > > > > Il 17/01/2014 04:39, Wang Weidong ha scritto: > >> On 2014/1/16 18:24, facoltà wrote: > [...] > >> > >> > > > > > > > > > > -- > Vincenzo Maffione