From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 22 16:29:30 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6FB62E32; Mon, 22 Apr 2013 16:29:30 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) by mx1.freebsd.org (Postfix) with ESMTP id 258F41531; Mon, 22 Apr 2013 16:29:30 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id t2so2265784qcq.14 for ; Mon, 22 Apr 2013 09:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tLdbe5jRS2NUe7wD4tu+1O9YH8ZpdOqsb0UVwJhn2VM=; b=RE6CJXQ1Kb7c4EjJnPtz8jbhwOtKHGF3ypOKGcO7rUV0d340G9/K6/HrluCTyHdSGf spkSdwtUsUdWOLU0RPbUn7SSLaZbDCZa7JPT6iR2974veia0qOpfMlexp96xIy8j937f uSNuTYi+B9lHUgWZHqCrdAHhMNUQJ20TSh3UDdYWRXNo2w1zsKMO6nUE0pVQeOaWUH4D SCHTFLUzAAqsEMobQxDBjgGhB6CueJnZqp7kyG5PmArQ9+dPV2nVXFugLOAxzYJeDF56 y++bvbBbwld8YafCQBU8TrEavxqEDMMZtikDrpnXi+1ZNhAEJD7AfE/NOdTSzYD0j3Lw ShWw== MIME-Version: 1.0 X-Received: by 10.49.35.132 with SMTP id h4mr11671842qej.29.1366648169687; Mon, 22 Apr 2013 09:29:29 -0700 (PDT) Received: by 10.49.51.9 with HTTP; Mon, 22 Apr 2013 09:29:29 -0700 (PDT) In-Reply-To: <201304221132.08194.jhb@freebsd.org> References: <201304221132.08194.jhb@freebsd.org> Date: Mon, 22 Apr 2013 09:29:29 -0700 Message-ID: Subject: Re: NUMA, cpuset and malloc From: Freddie Cash To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Hackers , 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:29:30 -0000 On Mon, Apr 22, 2013 at 8:32 AM, John Baldwin wrote: > 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.) > How does one enable NUMA? A "grep -i numa /usr/src/sys/conf/NOTES /usr/src/sys/amd64/conf/NOTES" turns up 0 hits for both 9-STABLE r248547 and 10-CURRENT (April 11, used svnup so no way to get the exact revision number, that I know of). Or, is it enabled automatically? -- Freddie Cash fjwcash@gmail.com