From owner-freebsd-current@FreeBSD.ORG Wed Aug 27 02:52:05 2008 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 B257D1065686 for ; Wed, 27 Aug 2008 02:52:05 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from canonware.com (canonware.com [64.183.146.166]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7F28FC15 for ; Wed, 27 Aug 2008 02:52:05 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from [192.168.168.201] (unknown [192.168.168.201]) by canonware.com (Postfix) with ESMTP id 3189C1298C0 for ; Tue, 26 Aug 2008 19:23:20 -0700 (PDT) Message-ID: <48B4B986.6010906@FreeBSD.org> Date: Tue, 26 Aug 2008 19:18:46 -0700 From: Jason Evans User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Thread-caching added to jemalloc 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: Wed, 27 Aug 2008 02:52:05 -0000 I committed a largish set of jemalloc changes today, including the addition of thread-specific caching. This has the potential to dramatically reduce the amount of locking necessary, but it can also increase memory usage. I'm interested in feedback on how well the code works for your real-world multi-threaded applications. If you do perform benchmarks, don't forget to define MALLOC_PRODUCTION in src/lib/libc/stdlib/malloc.c before building, and see the malloc(3) man page for tuning information. In particular, note that you can disable thread-specific caching by setting MALLOC_OPTIONS=g in the environment, so it should be easy to perform comparative benchmarks. Thanks, Jason