low network speed

Kevin Oberman kob6558 at gmail.com
Wed Jan 25 07:25:59 UTC 2012


On Tue, Jan 24, 2012 at 9:27 PM, Eugene M. Zheganin <eugene at zhegan.in> wrote:
> Hi.
>
> I'm suffering from low network performance on one of my FreeBSDs.
> I have an i386 8.2-RELEASE machine with an fxp(4) adapter. It's connected
> though a bunch of catalysts 2950 to another 8.2. While other machines in
> this server room using the same sequence of switches and the same target
> source server (which, btw, is equipped with an em(4) and a gigabit link bia
> catalyst 3750) show sufficient speed, this particular machine while using
> scp starts with a speed of 200 Kbytes/sec and while copying the file shows
> speed about 600-800 Kbytes/sec.
>
> I've added this tweak to the sysctl:
>
> net.local.stream.recvspace=196605
> net.local.stream.sendspace=196605
> net.inet.tcp.sendspace=196605
> net.inet.tcp.recvspace=196605
> net.inet.udp.recvspace=196605
> kern.ipc.maxsockbuf=2621440
> kern.ipc.somaxconn=4096
> net.inet.tcp.sendbuf_max=524288
> net.inet.tcp.recvbuf_max=524288
>
> With these settings the copying starts at 9.5 Mbytes/sec speed, but then, as
> file is copying, drops down to 3.5 Megs/sec in about two-three minutes.
>
> Is there some way to maintain 9.5 Mbytes/sec (I like this speed more) ?
>
>
> Thanks.
> Eugene.
>
> P.S. This machine also runs zfs, I don't know if it's important but I
> decided to mention it.

9.5 MBytes? That's 76 Mbps which is reasonable. 28 Mbps is not, but
it's too good to make be think it's a duplex mis-match, but it's
probably worth checking. Look at the output of  'sysctl
dev.fxp.0.stats'. See if you are getting framing and CRC errors.

If this does not point at something, a packet capture of header and
tcptrace may show the cause of the problem, but the output is not easy
to understand. tcptrace is in ports. You could also look at the
capture with wireshark. It won't tell as much, but will flag errors
and "unusual" activity. Both tools are in ports.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-net mailing list