From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:12:25 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6507E16A419 for ; Tue, 28 Aug 2007 18:12:25 +0000 (UTC) (envelope-from brooks@illuminati.org) Received: from zmail.illuminati.org (mail.illuminati.org [70.42.141.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4B66E13C465 for ; Tue, 28 Aug 2007 18:12:25 +0000 (UTC) (envelope-from brooks@illuminati.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.illuminati.org (Postfix) with ESMTP id B638616C86DF for ; Tue, 28 Aug 2007 11:12:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at X-Spam-Score: -4.399 X-Spam-Level: X-Spam-Status: No, score=-4.399 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599] Received: from zmail.illuminati.org ([127.0.0.1]) by localhost (zmail.illuminati.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id coSXScKezmgd for ; Tue, 28 Aug 2007 11:12:12 -0700 (PDT) Received: from zmail.illuminati.org (zmail.illuminati.org [10.32.1.33]) by zmail.illuminati.org (Postfix) with ESMTP id E7A0016C86DE for ; Tue, 28 Aug 2007 11:12:12 -0700 (PDT) Date: Tue, 28 Aug 2007 11:12:12 -0700 (PDT) From: Brooks Talley To: freebsd-current Message-ID: <16447218.32631188324732895.JavaMail.root@zmail.illuminati.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [63.231.27.116] Subject: Tidbit for improving Samba performance X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2007 18:12:25 -0000 I've been fighting with a new 7.0-CURRENT install, trying to get decent Samba performance between the FreeBSD box and a Vista workstation on a gigabit network. Lots of stuff out there recommends setting Samba's SO_RCVBUF and SO_SNDBUF options to 8192. Bad idea! In lots of testing, what I've found is that performance is at its best when those options match net.inet.tcp.recvspace and net.inet.tcp.sendspace respectively. With a default install, I was seeing about 15MB/s transfer rates. Setting SO_RECVBUF and SO_SNDBUF to 8192 dropped me to about 11MB/s, which made me experiment a bit. Right now, with net.inet.tcp.recvspace and net.inet.tcp.sendspace both at 65536 and SO_RCVBUF and SO_SNDBUF also at 65536, I'm seeing about 60MB/s. Still not great, but a significant improvement. FWIW, going higher than 65536 causes the Vista workstation to lose its mapped drive all the time. And changing the MTU on both FreeBSD and Vista (to either 4088 or 9014) had no discernable benefit. This is on a 7.0-CURRENT compiled without all of the debugging stuff, and it's at 0.7 load and 73% idle when transferring 60MB/s, so I think there's still some headroom there for improvement. Anyways, thought I'd share with the group, since I haven't seen this mentioned in copious amounts of Googling. -b