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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 = 256M > sort_buffer_size = 1M > read_buffer_size = 1M > max_connections = 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 = > 155824 > K > bytes of memory This is bogus: 256 + ( 1 + 1) * 2000 = 2256M. So you're bound to get into trouble with a large number of connections (or be swapping at least, which defeats the purpose of having a large key_buffer_size). Secondly - the calculation is independent of InnoDB values, you should add innodb_buffer_pool_size to the equation: innodb_buffer_pool_size + key_buffer_size + (read_buffer_size + sort_buffer_size) * max_used_connections = max_used_memory_since_startup These values are *all* malloced and as such affect MAXDSIZE. -- Melvyn ======================================================= FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Tue Dec 30 14:31:47 CET 2003 root@sarevok.idg.nl:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386 ======================================================= [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAF4XSOv9JNmfFN5URAoabAJ9DIqZLr54oeCw6medv9+eykJcZWgCeP2UL vTjGizctFjSXadbPcGI3/Rg= =JHhH -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401281050.10930.freebsd-current>
