Samba 3.0.1 read performance problem

Gerhard Wiesinger lists at wiesinger.com
Sun Jan 18 21:47:40 GMT 2004


On Sun, 18 Jan 2004, Richard Sharpe wrote:

> On Sun, 18 Jan 2004, Gerhard Wiesinger wrote:
>
> > Hello!
> >
> > I have a 100MBit switched network and run Samba 3.0.1 in a Samba
> > 2.2.8a domain (3.0.1 because of valid users = %S, and write list = %S fixes) on Fedora FC1 with
> > latest fixes.
> >
> > Read performance from Linux to Windows 2000 SP3 is very low
> > (around 2 to 4 MByte/s). Write performance is ok (>10MByte/s).
> >
> > I already used
> > socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> > (which is the performance optimum, other values are lower).
>
> Why do you think that SO_SNDBUF is the performance optimum?
>
> What is the delay-bandwidth product of the link between the clients? At
> 100Mbps, that is approximately 12MBytes/sec, so a 1ms round trip time
> would give a delay bandwitdh product of 12kBytes/s, and you are already
> lower than that.
>
> Setting SO_SNDBUF to 8192 means that the higher layers (Samba) can only
> put 8192 bytes of data into the socket buffers before it is forced to wait
> for the data to be acked. This is regardless of the window size that is
> offered by the other end!
>
> I would venture to say that leaving those values unset, or setting them to
> 65536 would give you better throughput!
>

OK, I tried (again) no option set and 65536 for the send buffer, but I'm
quite away from the optimum (about 5000kB/s average now). I also tried
buffer sizes up to 512KB, but performance still is not higher.

> Grab an ethereal trace and look at a TCP Sequence Number graph. You should
> see a stair-case effect caused by the delay between segments/packets as
> the sending end is forced to wait for ACKs to clear out the unacknowledged
> data in the send socket queue.
>

I had a look at the ethereal trace. With e.g. ftp it looks linear, but
with Samba it is like a stair. I understand the problem, but why does it
only appear with Samba?

Testfile: 30MB

ftp:
   /
  /
 /
/
around 2,5s

Samba:
         /
      /
   /
/
around 10s

But what I don't understand: The ftp and netio server/clients
aren't IHMO optimized with such big send buffers but work quite at the theoretical limit.

Any further tuning tips? (Linux or W2K)

Thank you.

Ciao,
Gerhard

> > Netio and ftp performance is >10MByte/s, in most cases >11MByte/s (for
> > reads and writes)
> >
> > Server: Linux Fedora FC1 with kernel 2.4.22-1.2149.nptl on an Epox 8KRA2+
> > Motherboard. Network adapter is a Gigabit Ethernet from Longshine
> > (rtl8169 driver).
> >
> > No special configuration is used.
> >
> > Any ideas?
> >
> > Thank you for the answer.
> >
> > Ciao,
> > Gerhard
> >
>


More information about the samba-technical mailing list