4GB limit on 32 bit os?

Hello,

I am setting up a new MySQL server that will be dedicated to only MySQL.

The new server runs CentOS 5. By default it only recognized 4GB so I updated the kernel to PAE version and now the OS recognizes the full 8GB of RAM.

I was talking with a server admin and he said that MySQL will only be able to use a max of 4GB and of that 4GB, 1GB will be used for the OS and the other 3GB will be used for the MySQL server.

First is it true that only the first 4GB will be used? If so, is there anything that I can do to make it use the full 8GB?

The processors do not support 64 bit, so I can’t go that route.

If MySQL will only use the first 4GB, then I can pull it and beef up some of our other servers that only have 2GB. I am just hoping that we can make use of all the ram as I feel that our DB server could really use it.

Thanks for you help with this.

I beleive the work around is that when you create tables
you need to specify the size of the possible rows/table size.

I don’t have my book with me but the 4GIG limit can be
bypassed…

It was a default back in the days because 4GIG was huge
when most people only had 100meg drives…

In 32-bit OS (actually, it is architecture limit) each process’ address space is limited by 2**32 bytes which is 4Gb. So Mysql (one process) could not use more than 4Gb on 32-bit platforms.

If you use myisam tables, then it is ok (imho) to use 4Gb for mysql and left remain memory to be used for disk caches. But in case of innodb, it is much better to give more memory to innodb and it is weird when you can’t do it.

[B]scoundrel wrote on Thu, 13 September 2007 10:25[/B]
In 32-bit OS (actually, it is architecture limit) each process' address space is limited by 2**32 bytes which is 4Gb. So Mysql (one process) could not use more than 4Gb on 32-bit platforms.

If you use myisam tables, then it is ok (imho) to use 4Gb for mysql and left remain memory to be used for disk caches. But in case of innodb, it is much better to give more memory to innodb and it is weird when you can’t do it.

scoundrel,

So just to clarify, I will be able to use the full 8GB on the server? We have a mixed environment - we use both MyISAM and InnoDB table types.

Thanks.

You can use all your memory for your software running on this server, but only 4gb of this memory could be used for MySQL itself (key/read/sort buffers, innodb buffers pool, etc).

So since this server is dedicated to MySQL, there really is no point to having 8GB, I can take it down to 4GB and it would be the same, right?

Thanks for your help.

Not really. On 8gb system, mysql would use 4gb for its own needs (indexes, buffers, etc) and the rest 4gb would be used by os for disk caches. In 4gb system you’d give about 2,5-3Gb to mysql, and system would have not so much memory for disk caches.

Of course, it’s all relative. It depends on your db size and workload.

375 Gb database with about a hundred tables. Many, many reads and writes.

I guess I’ll stay with the 8GB if you think it’ll help.

Yes - it would definitely be better for your DB performance.

Btw, If you’ll need any consulting related to your 4Gb usage by mysql (it is not obvious how to split these 4Gb between innodb/myisam/buffers), we would be glad to help.