From owner-freebsd-current@FreeBSD.ORG Wed Apr 26 14:29:12 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67BB516A403 for ; Wed, 26 Apr 2006 14:29:12 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id D60DA43D46 for ; Wed, 26 Apr 2006 14:29:11 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: by lh.synack.net (Postfix, from userid 100) id AC6E45E4921; Wed, 26 Apr 2006 07:29:11 -0700 (PDT) Received: from [192.168.168.201] (moscow-cuda-gen2-68-64-60-20.losaca.adelphia.net [68.64.60.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id 56E765E490E; Wed, 26 Apr 2006 07:29:10 -0700 (PDT) Message-ID: <444F83AD.9040207@FreeBSD.org> Date: Wed, 26 Apr 2006 07:29:01 -0700 From: Jason Evans User-Agent: Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Attila Nagy References: <444F71F3.6030901@fsn.hu> In-Reply-To: <444F71F3.6030901@fsn.hu> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.5 (2005-11-28) on lh.synack.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.5 Cc: freebsd-current@FreeBSD.org Subject: Re: malloc problems with MySQL? 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, 26 Apr 2006 14:29:12 -0000 Attila Nagy wrote: > Hello, > > I have an SMP i386 machine with 2G RAM on which I would like to test > MySQL. The OS is CURRENT as of today. > > The problem is that with the exact same configuration as with 6-STABLE, > MySQL cannot allocate more than about 400-500MB of memory: > > mysqld: (malloc) Error in malloc(838877200): out of memory > mysqld got signal 6; > > Limits seems to be OK: > datasize 2097152 kB > I have kern.maxdsiz=2G in loader.conf. > > MySQL gets errno 12 (ENOMEM) when trying to allocate that amount of RAM. > > What else is needed to make it work with the new malloc implementation? > I can malloc the same amount of memory from a one liner program... Allocations that are larger than the chunk size (2 MB by default) are allocated using mmap(2), rather than sbrk(2). Most likely, your problems will go away if you reduce the heap size, so that mmap has more address space to work with. Jason