0

My curent config works great but my innodb_buffer_pool_size is too small as the database is very large.

All I am changing in my MySQL.cnf is

innodb_buffer_pool_size = 1G

to

innodb_buffer_pool_size = 2G

I then try and restart MySQL and it errors with the following..

110715  8:44:48  InnoDB: Error: cannot allocate 2147500032 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 25166072 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...

This is a 4GB x86 machine dedicated to MySQL!

2 Answers2

1

I had the same problem with 32 bit version of MySQL on a windows server 2008 VM 64 bit with 4G Ram. I tried increasing system ram to 6G and still could not allocate over 1G for innoDB.

Since I was already on 64 bit OS, I tried the 64 bit installer for MySQL and had no issues at all allocating 2G on my 4G system.

RobDigital
  • 283
  • 3
  • 9
0

I'm going with x86_32 (given the error message), and hence you're out of luck -- even with PAE, the maximum process size is still limited by the 4GB address space. Get yourself a 64-bit system and be done with it.

womble
  • 96,255
  • 29
  • 175
  • 230
  • Thanks I probably will do, strange as I have other x86_32 systems able to set that to 2G – Lee Armstrong Jul 15 '11 at 10:50
  • Sure, if your other settings (and usage patterns) are such that the process uses less than 3GB of memory, you'll be fine. Dangerous to be running that close to the limit, though. That brings another thought to mind -- is this system running a 2G/2G split kernel, instead of a 3G/1G on the rest of them? – womble Jul 15 '11 at 11:05
  • No exactly the same build, will go x64 I think as this is a large DB! – Lee Armstrong Jul 15 '11 at 14:50
  • Note "and usage patterns". – womble Jul 15 '11 at 22:20