Subject: MySQL: very large key_buffer on amd64?
To: None <port-amd64@netbsd.org>
From: Chris Kantarjiev <cak@dimebank.com>
List: port-amd64
Date: 09/19/2005 12:36:36
We're starting to use mysql (4.0.25) on an amd64 machine (running
NetBSD-3). One of the reasons for doing this is to use much more
RAM - we tend to thrash the key_buffer on i386 because one of our
indexes is 10GB in size (the table is 15GB).

It appears that mysqld won't start if the setting for key_buffer
is more than 2GB. 

053419 11:34:15  Starting mysqld daemon with databases from /var/mysql
053419 11:34:15  mysqld started
mysqld: Couldn't allocate stack for idle thread!: Cannot allocate memory
053419 11:34:15  STOPPING server from pid file /var/mysql/vern.landsonar.com.pid
053419 11:34:15  mysqld ended

I'd like it to be 10GB (we have 16GB of RAM).  I'm guessing that
the variable(s) that deal with the key_buffer are 32-bit ints ...
is there a straightforward way to find all the relevant places and
make them 64-bit ints? I haven't really dug through the pkgsrc
in great detail to make certain that it's using 64-bit
properly...

Or is the problem that every thread is ending up with its
own key_buffer, so there isn't enough memory to do this?

Or something else?

Thanks.