Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2007 11:22:33 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        rihad <rihad@mail.ru>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Pipe queues
Message-ID:  <DCFF3417-FC01-4F2C-ACA5-03CC0881DE59@mac.com>
In-Reply-To: <475D6FD7.2000500@mail.ru>
References:  <475D6FD7.2000500@mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 10, 2007, at 8:56 AM, rihad wrote:
> Hi,
>
> I'm having a hard time to understand what pipe queues are with  
> respect to bandwidth limitation. ipfw(8) and dummynet(4) manuals  
> didn't help me much.

Pipes and queues are two different things; a pipe simulates a network  
link, and a queue is used to hold packets which are backlogged because  
they are arriving faster than the outbound link (ie, a pipe) can  
transmit them.

> How does dummynet's traffic shaping function?

It uses a variant of weighted fair queuing.

> Why does it need a queue at all?

So the traffic shaper can choose which of the queues with traffic it  
should drain and send out next.  Unless you use multiple queues, you  
won't be able to prioritize traffic between 'em.

> As each connection's queue takes some memory, can I just disable the  
> queueing, or set its size to 1 slot (1500 bytes)?

You could, but that would largely disable effective traffic shaping  
also.

> What if I set it to 10000 slots, why should it wait to fill the  
> queue before starting to send stuff out the network interface?

Well, it *doesn't* wait for the queue to be filled before starting to  
send stuff out the network.

> As packets arrive, AFAIK they are stored in mbufs in system memroy.  
> Do pipe queues also use mbufs? I might be servicing hundreds of  
> pipes simultaneously, this is why I'm concerned about memory use.

Pipes aren't queues.  Queues buffer packets into mbufs.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DCFF3417-FC01-4F2C-ACA5-03CC0881DE59>