From owner-freebsd-questions@FreeBSD.ORG Mon Nov 7 17:47:33 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16BE616A41F for ; Mon, 7 Nov 2005 17:47:33 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFD1E43D45 for ; Mon, 7 Nov 2005 17:47:32 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 1C7365FAC; Mon, 7 Nov 2005 12:47:32 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08690-01; Mon, 7 Nov 2005 12:47:31 -0500 (EST) Received: from [199.103.21.238] (pan.codefab.com [199.103.21.238]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 4ACB05CE9; Mon, 7 Nov 2005 12:47:31 -0500 (EST) In-Reply-To: <200511070942.41964.kirk@strauser.com> References: <200511070942.41964.kirk@strauser.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Mon, 7 Nov 2005 12:47:27 -0500 To: Kirk Strauser X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Re: smbfs small read tuning? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2005 17:47:33 -0000 On Nov 7, 2005, at 10:42 AM, Kirk Strauser wrote: > I have an application that makes hundreds of thousands of small read > ()s (a > few hundred bytes each time). If I run it directly on files on an > smbfs > mount, the runtime is on the order of an hour. If I copy the files > to my > local hard drive first and then run it, the total copy + run time > is on the > order of four minutes. > > The mount_smbfs(8) man page doesn't mention anything about tuning > and I'm > not sure where else to look. Is there a way to enable some kind of > read-ahead cache or otherwise trade some memory or CPU for a speed > boost? Yes, but most of the tunables are on the server side. If the server is running Samba, look for the client caching tuning option in smb.conf ("csc policy") and the various oplocks options. You want to have level-2 oplocks working for best performance... -- -Chuck