Date: Wed, 28 Jan 2004 10:50:06 +0100 From: Melvyn Sopacua <freebsd-current@webteckies.org> To: current@FreeBSD.org Subject: Re: FreeBSD 5.2: malloc(): error: allocation failed Message-ID: <200401281050.10930.freebsd-current@webteckies.org> In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAjsr3Y8m61BGK3QDgfQG1wCKBAAAQAAAAQw7wR/MadkyKklRl7q1e3gEAAAAA@bimmer.at> References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAjsr3Y8m61BGK3QDgfQG1wCKBAAAQAAAAQw7wR/MadkyKklRl7q1e3gEAAAAA@bimmer.at>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-02=_SX4FATv7FaafELM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 25 January 2004 21:13, Christian B. wrote: > For the MySQL 4.0.17, I use following configuration (the same as under > FreeBSD 5.1): > ---------------------------------- > key_buffer =3D 256M > sort_buffer_size =3D 1M > read_buffer_size =3D 1M > max_connections =3D 2000 > ---------------------------------- > > But after I start the mysql-server, I get following error: > ---------------------------------- > It is possible that mysqld could use up to > key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = =3D > 155824 > K > bytes of memory This is bogus: 256 + ( 1 + 1) * 2000 =3D 2256M. So you're bound to get into trouble with a large number of connections (or = be=20 swapping at least, which defeats the purpose of having a large=20 key_buffer_size). Secondly - the calculation is independent of InnoDB values, you should add= =20 innodb_buffer_pool_size to the equation: innodb_buffer_pool_size + key_buffer_size + (read_buffer_size +=20 sort_buffer_size) * max_used_connections =3D max_used_memory_since_startup These values are *all* malloced and as such affect MAXDSIZE. =2D-=20 Melvyn =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =46reeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Tue De= c 30=20 14:31:47 CET 2003 =20 root@sarevok.idg.nl:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --Boundary-02=_SX4FATv7FaafELM Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAF4XSOv9JNmfFN5URAoabAJ9DIqZLr54oeCw6medv9+eykJcZWgCeP2UL vTjGizctFjSXadbPcGI3/Rg= =JHhH -----END PGP SIGNATURE----- --Boundary-02=_SX4FATv7FaafELM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401281050.10930.freebsd-current>