Slowish 5.3 network throughput (LAN)

Robert Watson rwatson at freebsd.org
Fri Nov 12 09:53:48 GMT 2004


On Thu, 11 Nov 2004 klr at 6s-gaming.com wrote:

> What's happening here? I can download at 1mBps from my crappy P200 MMX
> w/ freebsd 4.10 at my lan. This server is a Dual Xeon 2.4Ghz w/ 2GB ram
> and a decent hdd. It should saturate the 100mbps, but won't go past
> 130kB/s. 

That's very slow.

> Could this be because the server NIC is an em(4) ? I heard there are
> some problems with the em driver under 5.3. 

Not generally this level of problem.

> I don't have polling enabled. sacks on, delayed acks on. 
> the PF queue:
> 
> queue  http_out bandwidth 40Mb priority 5
>   [ pkts:      59257  bytes:   88471020  dropped pkts:      0 bytes:      0 ]
>   [ qlength:   0/ 50  borrows:      0  suspends:    177 ]
> 
> Any ideas of what might be causing the tremendous slowdown ? 

I think I would follow two avenues in investigation:

(1) Look for poor hardware interaction with the OS.  In particular, use
    vmstat -i or systat -vmstat 1 or the like to look for interrupt storms
    (interrupt delivery in excess of 10,000 interrupts per second per
    source is usually too big). 

(2) Check the negotiation of the if_em card to the switch -- if you have a
    gig-e network, it should be full duplex gig-e.  If 100mbps, you might
    want to force the negotiation using the media option if
    autonegotiation is having problems. 

(3) Try selectively removing configured network pieces to see if one is
    having an unexpected result.  I'd begin by disabling pf and see if the
    bandwidth jumps up.  We may be able to isolate the source of the
    problem to a particular component.

(4) Look at CPU consumption -- are you pegging out the CPU or busses with
    other work or traffic, or does the system have capacity left?  A bug
    or problem elsewhere in the system may be starving the network stack.
    The performance drop you're seeing is excessive for this scenario, but
    it's worth checking into. 

There are some performance optimizations for if_em that were merged to
RELENG_5 shortly after the release, but they would generally be measurable
only in reduced CPU consumption, not increased network performance at
100mbps speeds on modern hardware.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Principal Research Scientist, McAfee Research





More information about the freebsd-questions mailing list