FreeBSD 5.2: malloc(): error: allocation failed
Melvyn Sopacua
freebsd-current at webteckies.org
Wed Jan 28 01:50:13 PST 2004
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 at sarevok.idg.nl:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386
=======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040128/9aa09512/attachment-0001.bin
More information about the freebsd-current
mailing list