Date: Tue, 21 Feb 2006 19:43:42 -0500 From: Mike Tancsa <mike@sentex.net> To: FreeLSD <freelsd@rea.mbslab.kiae.ru> Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6 and em interface speed Message-ID: <dobnv1tbb9o8ljb8v7fflb9vh1lr21inr7@4ax.com> In-Reply-To: <20060221165456.GZ44603@rea.mbslab.kiae.ru> References: <20060221165456.GZ44603@rea.mbslab.kiae.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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=3D1 made a big difference to the forwarding rate. Also, on your tcp tests, try sysctl -w net.inet.tcp.inflight.enable=3D0 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=20 =46reeBSD boxA ------FreeBSD-B---FreeBSD-C Where=20 A =3D AMD 3800 with PCI-e BGE B =3D P4 3Ghz with PCI-X 82546EB Dual Port Gigabit=20 C =3D 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 =3D 1000. > > Thanks! -------------------------------------------------------- Mike Tancsa, Sentex communications http://www.sentex.net Providing Internet Access since 1994 mike@sentex.net, (http://www.tancsa.com)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dobnv1tbb9o8ljb8v7fflb9vh1lr21inr7>