Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2008 11:05:20 +0800
From:      "Adrian Chadd" <adrian@freebsd.org>
To:        "Lev Serebryakov" <lev@serebryakov.spb.ru>
Cc:        net@freebsd.org
Subject:   Re: samba performance on 1Gig link: how to replace black magic with science? And why TCP windows scaling is not in play?
Message-ID:  <d763ac660806042005q352abc88q911617ba4b67a7b0@mail.gmail.com>
In-Reply-To: <1761236634.20080604234231@serebryakov.spb.ru>
References:  <1761236634.20080604234231@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Figure out why window scaling isn't working - look at the options
being negotiated (use tcpdump) and try to figure out which side isn't
offering or is rejecting window size scaling negotiation.

CIFS isn't the same profile as iperf/etc - its not just shovelling raw
data down the socket, there's a whole protocol involved in scheduling
what to transfer. Latency in handling commands screws your
performance..



Adrian


2008/6/5 Lev Serebryakov <lev@serebryakov.spb.ru>:
> Hello, net.
>
>  I'm setupping file server for WindowsXP/SP3 clients, based on
> FreeBSD 7.0-Stable nad latest samba port.
>
>  First of all, Is et these kernel variables:
>
> kern.ipc.maxsockbuf=16777216
> net.inet.tcp.sendbuf_max=16777216
> net.inet.tcp.recvbuf_max=16777216
> net.inet.tcp.sendspace=131072
> net.inet.tcp.recvspace=131072
>
>  All tests are performed with only one client for start. Server and
> client are linked with 1Gig link, jumbo frames are enabled (9014
> bytes) and iperf shows about 900Mbit/s of raw TCP with big windows
> (about 256Kb for start).
>
>  Local tests shows 75Mb/s Read/write from/to shared file system with
> big files.
>
>  Default configuration of samba gives me only 20Mb/s read and loosy
> 15Mb/s write.
>
>  With "socket options = TCP_NODELAY" speed becomes 25/20 Mb/S R/W.
>
>  Then I start to change SO_RCVBUF/SO_SNDBUF and found (with binary
> search), that best values are 49152. Yes, this strange values. 65536
> is worse, and 32768 is worse too. This magic value gives me about
> 40MB/s read and 30-35Mb/s write.
>
>  "Recommended" 8192 gives me 40K/s read (YES, 40 _K_ilobytes per
> second!)
>
>  But I don't like this situation. Why? Because, it is black magic,
> not science. Why 49152? How can this value be found without binary
> search? What affects this value?
>
>  Second problem is about TCP windows, which can give more thoughtput
> on 1Gig link. I've tried to tcpdump traffic between samba and WinXP
> client, and it shows, that window scaling is turned off. Always. It is
> enabled on WinXP client, it is enabled on FreeBSD server, it us used
> by iperf (with great effect), but not by samba! What do I do wrong?
>
> --
> // Black Lion AKA Lev Serebryakov <lev@serebryakov.spb.ru>
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



-- 
Adrian Chadd - adrian@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d763ac660806042005q352abc88q911617ba4b67a7b0>