From owner-freebsd-current@freebsd.org Fri Oct 13 14:27:13 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DE71E499B7 for ; Fri, 13 Oct 2017 14:27:13 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 17D8566ED9; Fri, 13 Oct 2017 14:27:12 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-69-250-78.dyn.iinet.net.au [106.69.250.78]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v9DER11q090572 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 13 Oct 2017 07:27:05 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: RFC how to use kernel procs/threads efficiently To: Rick Macklem , Ian Lepore , "freebsd-current@freebsd.org" References: <1507317060.86205.268.camel@freebsd.org> From: Julian Elischer Message-ID: <776311c7-9676-c579-a156-8e929e8f1b31@freebsd.org> Date: Fri, 13 Oct 2017 22:26:55 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 13 Oct 2017 14:27:13 -0000 On 10/10/17 8:33 pm, Rick Macklem wrote: > Julian Elischer wrote: > [stuff snipped] >> On 10/10/17 4:25 am, Rick Macklem wrote: >>> --> As such, having a fixed reasonable # of threads is probably the best >>> that can be done. >>> - The current patch has the # of threads as a sysctl with a default of 32. >> why not set it to ncpu or something? > Well, each of these threads will do an RPC, which means a couple of short > bursts of CPU and then sleep the rest of the time waiting for the RPC reply > to come back from the Data Server. > As such, it would seem to me that you would want a lot more threads than > CPUs on the machine? > However, setting the default to "N * ncpu" seems better than just a fixed "32" > to me. (For nfsd, the current default is 8 * ncpu, so maybe that is a good > default for this too?) yeah I really just meant "some function of ncpu"..  not specifically "ncpu x 1" > What do you think? > > Thanks for the comment, rick > > >