fxp performance with POLLING

Bartosz Stec admin at kkip.pl
Mon Oct 6 09:19:06 UTC 2008


Jeremy Chadwick pisze:
> On Mon, Oct 06, 2008 at 09:02:33AM +0200, Bartosz Stec wrote:
>   
>> Alfred Perlstein wrote:
>>     
>>> * Bartosz Stec <admin at kkip.pl> [081003 07:23] wrote:
>>>   
>>>       
>>>> Hello again :)
>>>>
>>>> With POLLING enabled I experience about 10%-25% performance drop when 
>>>> copying files over network. Tested with both SAMBA and NFS. Is it 
>>>> normal?
>>>>
>>>>    FreeBSD 7.1-PRERELEASE #0: Sat Sep  6 01:52:12 CEST 2008
>>>>    fxp0: <Intel 82801DB (ICH4) Pro/100 Ethernet> port 0xc800-0xc83f mem
>>>>    0xe1021000-0xe1021fff irq 20 at device 8.0 on pci1
>>>>
>>>>    # ifconfig fxp0
>>>>    fxp0: flags=9843<UP,BROADCAST,RUNNING,SIMPLEX,LINK0,MULTICAST>
>>>>    metric 0 mtu 1500
>>>>            options=8<VLAN_MTU>
>>>>            ether 00:20:ed:42:87:13
>>>>            inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
>>>>            media: Ethernet autoselect (100baseTX <full-duplex>)
>>>>            status: active
>>>>
>>>> BTW overall SAMBA performance still sucks on 7.1-pre as much as on  
>>>> RELENG_5 ...:( - 7.5 MB/s peak.
>>>>     
>>>>         
>>> 7.5MB is 75% effeciency of a 100mbit card.  Not amazing, but
>>> not "sucks".
>>>
>>> Where do you see faster performance?
>>>
>>> Between windows machines on the same hardware or linux server?
>>>
>>>   
>>>       
>> It sucks because it is a peak performance. About 5-6 MB/s average. I  
>> tried polling only because I found some suggestions on mailing lists,  
>> that it could improve performance with SAMBA on FreeBSD. As you see at  
>> the top of this thread - not in my case :) I also tried sysctl tunings,  
>> and smb.conf settings, also suggested on maling lists, with no or very  
>> little improvements noticed. Most of suggestions unfortunately end with  
>> "change OS to Linux if you want to use SAMBA". I think I will try to  
>> change NIC to 1Gbit - hope that helps :) Or maybe there's some "FreeBSD  
>> and SAMBA tuning guide" which I didn't found?
>>     
>
> Can you please test network I/O using something like netperf or one of
> the other network-benchmark tools and not things like NFS or Samba
> which rely on disk I/O and other aspects?
>
>   
OK
It was first time i was using nerperf so I'm not sure I did it 
correctly. I installed netperf port on SAMBA serwer (IP 192.168.0.2), 
and also download windows binary to windows xp machine (IP 
192.168.0.10). All tests ran for one minute.

First test - netperf on FreeBSD and netserver on Windows:

    # netperf -l 60 -t TCP_STREAM -H 192.168.0.10
    TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
    192.168.0.10 (192.168.0.10) port 0 AF_INET
    Recv   Send    Send
    Socket Socket  Message  Elapsed
    Size   Size    Size     Time     Throughput
    bytes  bytes   bytes    secs.    10^6bits/sec

      8192  32768  32768    60.00      93.97

    # netperf -l 60 -t TCP_SENDFILE -H 192.168.0.10
    TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
    192.168.0.10 (192.168.0.10) port 0 AF_INET
    Recv   Send    Send
    Socket Socket  Message  Elapsed
    Size   Size    Size     Time     Throughput
    bytes  bytes   bytes    secs.    10^6bits/sec

      8192  32768  32768    60.00      93.45

    # netperf -l 60 -t TCP_RR -H 192.168.0.10
    TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
    192.168.0.10 (192.168.0.10) port 0 AF_INET
    Local /Remote
    Socket Size   Request  Resp.   Elapsed  Trans.
    Send   Recv   Size     Size    Time     Rate
    bytes  Bytes  bytes    bytes   secs.    per sec

    32768  65536  1        1       60.00    2433.99
    8192   8192

    # ifconfig fxp0
    fxp0: flags=9843<UP,BROADCAST,RUNNING,SIMPLEX,LINK0,MULTICAST>
    metric 0 mtu 1500
            options=8<VLAN_MTU>
            ether 00:20:ed:42:87:13
            inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
            media: Ethernet autoselect (100baseTX <full-duplex>)
            status: active

Second test - netperf on Windows and netserver on FreeBSD:

    Unfortunately won't run:
    C:\software>netperf-a4 -l 60 -H 192.168.0.2
    TCP STREAM TEST to 192.168.0.2
    recv_response: partial response received: 0 bytes

Hovewer, thanks to Alfred Perlstein who send mefollowing link: 
http://www.mavetju.org/mail/view_message.php?list=freebsd-net&id=755111&thread=no&tag=yes, 
I set SO_SNBUF and SO_RCVBUF in smb.conf to 2920. Without any additional 
tuning in sysctl I now got about 8MB/s which is *much* better result 
than before. It still could be better than that if I am reading netpertf 
results correctly :)

Thanks Alfred!

-- 
Bartosz Stec



More information about the freebsd-stable mailing list