Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2000 23:02:09 -0800
From:      Julian Elischer <julian@elischer.org>
To:        FreeBSD-net@freebsd.org
Subject:   SAMBA/FreeBSD:[Fwd: Transportation tuning tips.]]
Message-ID:  <38D1D871.41C67EA6@elischer.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--------------446B9B3D2781E494167EB0E7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here are a set of tips via the SAMBA guys relevant to FreeBSD
it may be worth looking into these things a bit.


-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  presently in:  Perth
            v

--------------446B9B3D2781E494167EB0E7
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Return-Path: <daemon@whistle.com>
Received: from whistle.com (s205m131.whistle.com [207.76.205.131])
	by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA56446
	for <julian@elischer.org>; Thu, 16 Mar 2000 14:32:57 -0800 (PST)
Received: (from daemon@localhost) by whistle.com (8.7.5/8.6.12) id OAA00882; Thu, 16 Mar 2000 14:32:26 -0800 (PST)
Date: Thu, 16 Mar 2000 14:32:26 -0800 (PST)
From: Owner of many system processes <daemon@whistle.com>
Message-Id: <200003162232.OAA00882@whistle.com>
To: julian@elischer.org
Subject: [Fwd: Transportation tuning tips.]


mail to julian@whistle.com forwarded from whistle.com
----------------------------------------------------------------------
Please notify the sender of your new email address.
This forwarding will be stopped 3 months from the date it was started.
----------------------------------------------------------------------

>From jeremy@valinux.com  Thu Mar 16 14:32:25 2000
Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id OAA00875 for <julian@whistle.com>; Thu, 16 Mar 2000 14:32:25 -0800 (PST)
Received: from gatekeeper.whistle.com( 207.76.204.2) by whistle.com via smap (V2.0)
	id xma000873; Thu, 16 Mar 2000 14:31:56 -0800
Received: from wodc7-1.relay.mail.uu.net (wodc7-1.relay.mail.uu.net [199.171.54.114])
	by gatekeeper.whistle.com (8.9.3/8.9.3) with ESMTP id OAA28348
	for <julian@whistle.com>; Thu, 16 Mar 2000 14:31:55 -0800 (PST)
	(envelope-from jeremy@valinux.com)
Received: from mail.valinux.com by wodc7mr0.ffx.ops.us.uu.net with ESMTP 
	(peer crosschecked as: nat-su-33.valinux.com [198.186.202.33])
	id QQigva21070
	for <julian@whistle.com>; Thu, 16 Mar 2000 22:31:54 GMT
Received: from legion.su.varesearch.com ([10.1.1.223] helo=valinux.com)
	by mail.valinux.com with esmtp (Exim 2.12 #6)
	id 12ViOd-0004ug-00
	for julian@whistle.com; Thu, 16 Mar 2000 14:05:35 -0800
Sender: jeremy@valinux.com
Message-ID: <38D1686C.C967C10E@valinux.com>
Date: Thu, 16 Mar 2000 15:04:12 -0800
From: Jeremy Allison <jeremy@valinux.com>
Organization: VA Linux Systems
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-0.7 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Julian Elischer <julian@whistle.com>
Subject: [Fwd: Transportation tuning tips.]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Julian,

	FYI: You might want to make this available on the FreeBSD
lists. Looks like very good work.

Jeremy.

Kenichi Okuyama wrote:
> 
> Dear all,
> 
> I'm new here. So, if this is not the right place to talk, please
> do tell me so.
> 
> I think there are several key tips missing on "smb.conf.5".
> ( or I might be mis-reading the manual, but at least, I couldn't
>   find the very key words when I read it.)
> 
> 1) Service Parameter "include":
>    Even if you fail in reading "include file", smbd will not fail.
>    It simply skip to next line.
> 
> 2) Only "very last declared" 'socket options' line will take effect.
> 
> # Or, am I wrong? ... but at least, it works on 2.0.6 ....
> 
> Here is what I have just experenced that I beleave they are so important:
> 
>             ----------------------------
> 
> I'm using Samba 2.0.6 on FreeBSD(from now, I'll call this machine
> 'Samba'), connecting Windows98SP1 on ThinkPad535E with Laneed
> 10/100CD(from now, I'll call this machine 'Win98'), and WindowsNT4
> SP6a(from now, I'll call this machine 'WinNT').
> 
> When I tried to send 12Mbytes of files from Samba->Win98, it took me
> 660 sec. I thought that this was the normal case, but when I (by
> mitake) tried Win98->Samba direction, it only took 30sec for
> transfer.
> 
> So, I decided to measure the time, and what's going on using tcpdump
> on Samba. Here are the results:
> 
> Samba->Win98:  660sec
> Samba->WinNT:  600sec
> Win98->Samba:   36sec
> WinNT->Samba:   40sec
> Win98->WinNT:   31sec
> WinNT->Win98:   33sec
> 
> What was happening on Samba->Win* was, that Windows drops many IP
> packets, right after they sent Ack, but FreeBSD tries to send as
> much as possible. Then, since there are so many "resend" request ack
> pattern, FreeBSD sleeps for 1sec to settle, then start sending
> again.
> 
> This "1sec sleep" occurs from 500 to 550 times on Samba->Win*. And
> this was the reason why it's taking so long time.
> I did set SO_SNDBUF to 8192bytes, but this still occur.
> 
> So, I looked at Win98->WinNT sending pattern and found that,
> if Winsock2 communicates with Winsock2, sender takes following steps:
> 
>    Send IP packet.
>    Send IP packet.
>    Wait for Ack.
> 
> Also, for some reasons I could not figure out, Win98 will claim for
> mss=536 against Samba, and 1460 against WinNT.
> 
> WinNT's mss was always 1460bytes.
> 
> # It was NetBIOS/TCP transfer. I did check it with tcpdump.
> 
> Finally, I've found the way to make Samba take exactly the same
> steps as Winsock are doing. That is:
> 
> 1) find out the mss size of specific target.
> 2) Set SO_SNDBUF to '<mss size>*2'.
>    (even <mss size>*2+4 will mess the balance :p)
> 
> By this, though I could not fix the mss, I got good performance of
> 
> Samba->Win98:   30sec
> Samba->WinNT:   35sec.
> 
> Now, the problem was, that I wanted to change SO_SNDBUF for each
> machine smbd was connecting to. But there were no guide about it.
> Nor, smb.conf.5 had any comment about "include will not make smbd
> fail even if file was not found."
> 
> .. I did found those things out, by try-and-error + many helps from
> Japanese Samba user group peoples. So, my final smb.conf's [global]
> field looks like:
> 
> [global]
>   .....
>   # all the general settings being defined above.
> 
>   include /usr/local/etc/smb.conf.global.%a
>   include /usr/local/etc/smb.conf.global.%M
>   include /usr/local/etc/smb.conf.global.%a.%M
> 
> and having:
> 
> smb.conf.global.Win98.Win98.my.network:
>   socket options = TCP_NODELAY SO_SNDBUF=1072
> 
> smb.conf.global.WinNT.WinNT.my.network:
>   socket options = TCP_NODELAY SO_SNDBUF=2920
> 
> With them, now I have (at least) as same performance as
> WinNT<->Win98 communication.
> 
> So, I beleave that:
> 
> * include will not fail smbd even if file is not found.
> * only very last line of 'socket options' will take effect.
> 
> is very important keywords.
> 
> #Plus, above tips is important for Speed.txt.
> 
> ----
> 
> By the way, Is it possible to print out mss size to smb.log?
> I don't think it is nice idea to use tcpdump everytime you need to
> tune for stupid Network Interface cards.
> 
> # Or, if there are way to have mss size like %MSS on smb.conf,
> #it's also nice, I beleave.
> 
> best regards,
> ----
> Kenichi Okuyama@ Tokyo Research Lab. IBM. Co. Japan

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------

--------------446B9B3D2781E494167EB0E7--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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