Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2007 00:59:16 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        Dave Raven <dave@raven.za.net>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: Using "delay" to emulate a satellite link
Message-ID:  <20070330005916.A76128@xorpc.icir.org>
In-Reply-To: <015d01c77297$953ba250$bfb2e6f0$@za.net>; from dave@raven.za.net on Fri, Mar 30, 2007 at 08:49:19AM %2B0200
References:  <015d01c77297$953ba250$bfb2e6f0$@za.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 30, 2007 at 08:49:19AM +0200, Dave Raven wrote:
> Hi all,
> 	I've been looking at the ipfw (dummynet) ability to do delay and
> have a few questions - I hope this is the right list. I want to simulate a
> 1000ms RTT on a satellite link. To do that I've created an inbound and
> outbound pipe and given each 1mb and 500ms of delay.
> 
> However, I'm unable to get anywhere near 1mb of throughput on it until I
> drop the delay. I believe I understand the slowdown due to the latency, but
> my question is this - an http download through a 500ms "emulated" link
> that's running 1 mb can't get 1mb, yet if I download over the internet on a
> site that's pinging 500ms, it goes 1mb 
> 
> Whats the difference between dummynet delay and real life distance delay?

first make sure you are not comparing apples and oranges.
what sender and receiver are you using to get 1Mbit/s on a 500ms link ?
and, are you sure that if you ping from the source to the destination
you are using for your tests with dummynet you get the delay
you are expecting (1000ms as you configured it, and not 2000 ?)

500ms of delay on each pipe give at least 1000ms total
delay (assuming you have not misconfigured your dummynet box).
In order to fill the pipe you need at least 1Mbit worth of data
in the socket buffer/tcp window - the default on FreeBSD is
32kbytes sending, 64Kbytes receiving, so you won't be
able to achieve that unless you increase these two sysctls:

	net.inet.tcp.sendspace: 32768
	net.inet.tcp.recvspace: 65536

if you draw the bw vs delay that you achieve on your connection
you will likely find that either the limit is your socket
buffers or a misconfigured ipfw which results in twice the delay

	cheers
	luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070330005916.A76128>