Date: Wed, 05 Nov 2003 14:35:14 -0800 From: Michael Nadler <mnadler@floating-oak.org> To: freebsd-ipfw@freebsd.org Subject: Re: maximum pipes in dummynet? Message-ID: <3FA97B22.7010808@floating-oak.org> In-Reply-To: <20031105200049.B897F16A51A@hub.freebsd.org> References: <20031105200049.B897F16A51A@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
The basic problem you are having is with ipfw, not merely dummynet. ipfw uses a linked list to hold the rules. Every packet must be matched against these rules using a linear search. And this search happens in the interrupt thread. Packets that match none of the rules end up having the worst latency. There is an inverse relationship between the number of packets and the number of rules. In my experience, 4000 ipfw rules is quite a lot. We had to implement a custom modification to ipfw, creating a special class of static rules that were handled similar to the dynamic rules. This mod permitted more than 100,000 rules with litte performance degredation. The ipfw pipe rule, just like a regular rule, can match multiple ports. See ipfw(8). Date: Wed, 5 Nov 2003 10:59:50 -0800 From: Yuchung Chen Subject: maximum pipes in dummynet? To: [1]ipfw@freebsd.org Cc: [2]ycheng@cs.ucsd.edu Message-ID: [3]<20031105105949.A15915@cs.ucsd.edu> Content-Type: text/plain; charset=us-ascii Hi all, I am using dummynet to simulate many different links. After dummynet seems to slow down after more than 4000 (static) pipes. That is, the link delay is more than the specified delay. My config file looks like ipfw add 1 pipe 7 tcp from 192.168.2.100 10003 to 192.168.1.100 out ipfw pipe 7 config bw 730KByte/s queue 40 delay 4ms plr 0.01 ipfw add 1 pipe 8 tcp from 192.168.1.100 to 192.168.2.100 10003 in ipfw pipe 8 config bw 730KByte/s queue 40 delay 4ms plr 0.01 ipfw add 1 pipe 9 tcp from 192.168.2.100 10004 to 192.168.1.100 out ipfw pipe 9 config bw 1400KByte/s queue 40 delay 28ms plr 0.00 ipfw add 1 pipe 10 tcp from 192.168.1.100 to 192.168.2.100 10004 in ipfw pipe 10 config bw 1503KByte/s queue 40 delay 28ms plr 0.00 My machine is 2.66 P4 w/ 1G mem. Does anybody know how to make dummynet support more pipes? Also is it possible to specify one pipe for more than one port? i.e., ipfw add 1 pipe 10 tcp from 192.168.1.100 to 192.168.2.100 10004,10537,3045 in Thanks. Yu-chung References 1. mailto:ipfw@freebsd.org 2. mailto:ycheng@cs.ucsd.edu 3. mailto:20031105105949.A15915@cs.ucsd.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FA97B22.7010808>