From owner-freebsd-ipfw@FreeBSD.ORG Wed Nov 13 05:06:18 2013 Return-Path: Delivered-To: freebsd-ipfw@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 A82ED693; Wed, 13 Nov 2013 05:06:18 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8123322F7; Wed, 13 Nov 2013 05:06:18 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id y13so5137630pdi.28 for ; Tue, 12 Nov 2013 21:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tnDkyrBxLWDWcnCFN5Lf9zoIE+Uk8RRF5giTKod6LI8=; b=l/xsvzHSFzH3VJMOmBQIxQLM30PBaIRMZEap/nOzsW52qdCWpxDlT0nN+XhVAKAHuU 2nD2+v/HtvnRGnKNpmI5+rGScu9vLDV7u5V9EwiKUjR4cg6ZbgsjX/jagwvcRsM/VCPW IXe3SYkr2SW8Xg5J79IC9nUuTdAfPnaqZTqYQaMUm2mp9g2pIghj1UZGeGQ9mx7g2xkv 2JRHlHJSIeQSwjbMiXicN1eC2mR1DXhz41a/G9s5lIZ2Ah0lVza2gFSdY9w1E5BuJ+vG +/LSd+SdG0UsojY9dDbiENrTZxG6zijusjet3Mqxh1BlOlNvluj7pvsYmm7zqPZfAVZX 0fbw== MIME-Version: 1.0 X-Received: by 10.68.224.38 with SMTP id qz6mr11958747pbc.156.1384319177470; Tue, 12 Nov 2013 21:06:17 -0800 (PST) Received: by 10.68.101.98 with HTTP; Tue, 12 Nov 2013 21:06:17 -0800 (PST) In-Reply-To: <52830502.30809@freebsd.org> References: <52830502.30809@freebsd.org> Date: Tue, 12 Nov 2013 21:06:17 -0800 Message-ID: Subject: Re: Bursty data transfer with Dummynet From: Ahmed Hamza To: Julian Elischer , freebsd-ipfw@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 05:06:18 -0000 On Tue, Nov 12, 2013 at 8:50 PM, Julian Elischer wrote: > On 11/12/13, 6:35 PM, Ahmed Hamza wrote: >> >> Hi All, >> >> I'm trying to use Dummynet to test the behaviour of my video streaming >> application in various network conditions. Dummynet was compiled and >> installed on an Ubuntu 12.04 box with a 2.6 Linux kernel. I'm >> experiencing a strange behaviour when I reduce the bandwidth of the >> link/path. >> >> For some reason, instead of having a slow download speed. It seems as >> if the download is happening in bursts! A portion of the data is >> downloaded at a high speed, then the data transfer stops for a period >> of time and then resumes again (and so on). Does anyone have an idea >> what could be the cause? Or is this even an expected behaviour? If so, >> why? > > > I can't really speak for dummynet on Linux but the granularity of the queues > is dependent on the timer granularity of the kernel you have and to some > extent will rely on the correct integration of dummynet into the timer > facility of the kernel you are running it in. On freeBSD with a 1kHz 'tick' > I'd' expect to see packets being release from the queue each mSec or so. > if you are getting second sized chunks then it probably is a bug. Either > dummynet is not compatible with that kind of kernel, something else has gone > wrong. It COULD also be that you are catching the wrong packets.. I've seen > similar behaviour when I was accidentally queuing all the acks instead of > all the data going in the other direction, but I presume you have already > checked to see what you are queuing. > Thanks Julian and Matthew for your replies. To clarify my settings, below are the outputs from 'ipfw show' and 'ipfw pipe show'. I should also mention that it seems the by default the Ubuntu kernel is configured for 250Hz, not 1000Hz. root@vm1:~/# ipfw pipe 1 config bw 500Kbit/s queue 500Kbyte root@nsl-vm1:~/# ipfw show 00100 202247 105063701 pipe 1 ip from 192.168.56.4 to any 65535 2245577 2648958386 allow ip from any to any root@nsl-vm1:~/# ipfw pipe show 00001: 500.000 Kbit/s 0 ms 500 KB 1 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp 0 tcp 192.168.56.1/33547 192.168.56.4/80 238083 134515909 0 0 623