Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Sep 2005 09:47:53 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        vladone <vladone@spaingsm.com>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: dummynet patch
Message-ID:  <20050920094753.A88575@xorpc.icir.org>
In-Reply-To: <1135123196.20050920192026@spaingsm.com>; from vladone@spaingsm.com on Tue, Sep 20, 2005 at 07:20:26PM %2B0300
References:  <97663975.20050917141303@spaingsm.com> <20050919122154.GM51142@obiwan.tataz.chchile.org> <477488950.20050920130453@spaingsm.com> <20050920152714.GF24643@obiwan.tataz.chchile.org> <1135123196.20050920192026@spaingsm.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 20, 2005 at 07:20:26PM +0300, vladone wrote:
> I know what is WF2Q, but still dont see what is the problem for wich
> dont't exist a possibility to limit bandwidth that is given to a
> queue, with queue settings.

it not implemented because there is an equivalently efficient
mechanism which is first pass packets through a shaper
and then to the WF2Q "queue".

say you want to select on src-ip:

	sysctl net.inet.ip.fw.one_pass=0

	// misc stuff that sends your traffic to rule 4500

(1)	ipfw add 4500 pipe 1 ip from any to any
	ipfw add 4501 queue 2 ip from any to any
	ipfw add 4502 allow ip from any to any

(2)	ipfw pipe 1 config bw 300kbit/s mask src-ip 0xffffffff
	ipfw queue 2 config weight 10 pipe 3 mask src-ip 0xffffffff
	ipfw pipe 3 config bw 1Mbit/s

and there you have 1mbit total, 300k max per flow.

if you think your proposed scheme (which saves lines 1 and 2
from the configuration, but part of line 2 must be folded back
into the next line) is more efficient, implement it and measure it.
My take is that it saves maybe 5-10us/packet on 500MHz class boxes.
To me, it is not worth the effort in terms of added code
complexity.

	cheers
	luigi


> And exist a precedent, "queue" paramater that exist for pipe and
> queue.
> For example, if a "bw" parameter is not used for queue, then bandwidth
> is given only acording with they weight, so use this option who want,
> like anothers parameters ("dst-ip, mask, queue, even weight").
> And my suggestion isn't a caprice.
> For example: if i have multiple users, that acces internet throught an
> freebsd gateway. How split bandwidth?
> I have two clear solutions:
> 1. assign for each host an pipe. But i dont know if in this mode, in
> conditions of heavy traffic, bandwidth is well splited. Is possibil
> for an user to take more bandwidth (according with his pipe), and
> another user remain without bandwidth.
> 2. share total bandwidth, to different hosts, with queue. This is more
> efficient but have a little problem. If an user is alone on traffic
> can get all bandwith. For this reason, i want (and i think many
> admins) an possibility to limit bandwidth that is given to a queue.
> 
> I don't think that passing packets to multiple pipe and queue is e
> efficiently for traffic flow.
> My sugestion about "bw" parameter for queue is only for convenience. U
> can named how you want, so i dont see problem about "... pipes and queues are two distinct objects which have
> different semantics."
> 
> _______________________________________________
> freebsd-ipfw@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org"



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