From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 22 16:07:05 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6EA34FA for ; Mon, 22 Apr 2013 16:07:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF681348 for ; Mon, 22 Apr 2013 16:07:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 86155B96C; Mon, 22 Apr 2013 12:07:04 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: NUMA, cpuset and malloc Date: Mon, 22 Apr 2013 11:32:08 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201304221132.08194.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Apr 2013 12:07:04 -0400 (EDT) Cc: Robert Waksmundzki X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 16:07:05 -0000 On Saturday, April 20, 2013 6:43:26 pm Robert Waksmundzki wrote: > On NUMA systems allocated memory is striped across local and non-local banks in order to have consistent performance in case the task is rescheduled to a different CPU socket. > When a process is pinned to a single CPU socket with cpuset having the memory allocator prefer local banks would probably improve performance. Default system behavior would stay the same and the optimization would only be triggered on big multi socket systems when administrator used cpuset (command mostly used for performance optimization anyway). > > Is this something currently implemented in FreeBSD? Is this even a good idea? You can get something sort of like this by enabling NUMA in your kernel (9.0 and later) and always pinning your processes with cpuset. (The simple NUMA bits always allocate memory in the memory domain the current thread is running in at the time of the fault.) -- John Baldwin