On Tue, 21 Feb 2006 19:54:56 +0300, in sentex.lists.freebsd.hackers
you wrote:

>  Good day!
> I've obtained the following strang results with the em Ethernet interface
>speeds on a 6.1-PRERELEASE:
> Polling on:
>  UDP stream to FreeBSD: 327843.84 Kbit/sec,
>  TCP stream to FreeBSD: 524550.12 Kbit/sec.
> Polling off:
>  UDP stream to FreeBSD: 740409.38 Kbit/sec,
>  TCP stream to FreeBSD: 794348.44 Kbit/sec.
>
> It is funny that TCP speed is greater than UDP. It can be related to the
>hardware, not to the OS, because I've seen such behaviour on a linux-2.6.
>But on linux-2.4 with the same hardware as for FreeBSD and with the same
>source host I've got
> UDP stream to Linux: 927891.44 Kbit/sec,
> TCP stream to Linux: 850202.50 Kbit/sec.
>The figures are higher and UDP rate > TCP rate.
>

I found that setting kern.polling.idle_poll=1 made a big difference to
the forwarding rate.  Also, on your tcp tests, try
sysctl -w net.inet.tcp.inflight.enable=0
You might also adjust the amount of CPU allocated to userland when
using polling.

Without polling, I found I was able to livelock the middle box with
just a dozen rules.  I had 

FreeBSD boxA ------FreeBSD-B---FreeBSD-C

Where 
A = AMD 3800 with PCI-e BGE
B = P4 3Ghz with PCI-X 82546EB Dual Port Gigabit 
C = AMD 3800 with PCI-e BGE

using netrate and iperf from A to C going across B, I had to switch to
polling so as not to live lock B using
/usr/src/tools/tools/netrate/netblast.  Without ipfw or pflog, it was
not an issue.  but load up ipfw or pf, B would become unresponsive in
non polling mode.

> The questions: can anyone explain the relation 'TCP rate > UDP rate'? Why
>polling slows down the interface? And can FreeBSD stack can be tuned to
>get the Linux performance?
>
> Kernel config deviations from GENERIC:
>options        SCHED_ULE

get rid of that and use SCHED_4BSD

        ---Mike

>options        ADAPTIVE_GIANT
>device pf
>device pflog
>device pfsync
>
> System is running at hz = 1000.
>
> Thanks!

--------------------------------------------------------
Mike Tancsa, Sentex communications http://www.sentex.net
Providing Internet Access since 1994
[EMAIL PROTECTED], (http://www.tancsa.com)
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to