From owner-freebsd-stable@FreeBSD.ORG Sun Jul 9 21:52:05 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 376AB16A4DD for ; Sun, 9 Jul 2006 21:52:05 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from plouf.absolight.net (plouf.absolight.net [193.30.224.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A29F43D60 for ; Sun, 9 Jul 2006 21:52:03 +0000 (GMT) (envelope-from mat@FreeBSD.org) Received: from pouet.in.mat.cc (pouet.in.mat.cc [193.30.224.122]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by plouf.absolight.net (Postfix) with ESMTP id 483924B3331; Sun, 9 Jul 2006 23:52:02 +0200 (CEST) Date: Sun, 09 Jul 2006 23:52:00 +0200 From: Mathieu Arnold To: Mike Jakubik Message-ID: <146D5072D1FBB23E25430AD6@[192.168.1.5]> In-Reply-To: <44B176D2.3080501@rogers.com> References: <44B16BE9.60508@rogers.com> <44B176D2.3080501@rogers.com> X-Mailer: Mulberry/4.0.4 (Win32) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========F735760550EA3754F2F7==========" Cc: stable@freebsd.org Subject: Re: MySQL and default memory limits (mysqld: Out of memory) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jul 2006 21:52:05 -0000 --==========F735760550EA3754F2F7========== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline +-Le 09/07/2006 17:36 -0400, Mike Jakubik a dit : | Mathieu Arnold wrote: |> +-Le 09/07/2006 16:49 -0400, Mike Jakubik a dit : |> | I just setup a new system with MySQL 5.0.22, and to my surprise i get |> | this error in MySQL's log. |> | |> | /usr/local/libexec/mysqld: Out of memory (Needed 237527040 bytes) |> | /usr/local/libexec/mysqld: Out of memory (Needed 178145280 bytes) |> | |> | The system has 1GB of ram, which is plenty for MySQLs configuration |> | (its using the my-large.cnf, which is tuned for a system of 512MB) |> | |> | |> | Why am i getting this error? I read somewhere that FreeBSD by default |> | limits process size to 512MB, however the variables used to tune it do |> | not seems to exist in FreeBSD-6.1 any more. How can i let MySQL use |> | more memory? |> |> If you're using a i386, the max process memory size limit is at 512M, |> you'll have to tune kern.maxdsiz in /boot/loader.conf to say 1G. |> |> | | Why are the limits so low by default? In any case, this is what i found | in LINT. | | options MAXDSIZ=(1024UL*1024*1024) | options MAXSSIZ=(128UL*1024*1024) | options DFLDSIZ=(1024UL*1024*1024) That's the LINT value, the *real* default values are in /include/vmparam.h that is, 1G on alpha, ia64 and sparc64, 512K on i386, powerpc and arm and 32G (?) on amd64 | I have no idea what those values mean, what should i set them to to be | safe? A limit 768MB should work for me. You can put 1G and you'd be safe for some time. It has no real, hum, relation with the amount of ram you get, because some parts of your process will get swapped out : PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 9860 mysql 18 96 0 614M 257M ucond 1 1:22 1.22% mysqld so, as I understand it, mysqld has 614M allocated, from which 257 are actually in RAM (the rest being swapped out.) -- Mathieu Arnold --==========F735760550EA3754F2F7========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) iD8DBQFEsXqAJqR8av5thQ8RAg/8AKCAcbrO7LekY1zUVZzE9RKaygkVeQCcDg1E D5jKQtT312DhZois6TNuuso= =yoSS -----END PGP SIGNATURE----- --==========F735760550EA3754F2F7==========--