Home » Performance » MySQL » 4GB limit on 32 bit os?
4GB limit on 32 bit os? [message #1806] Wed, 12 September 2007 20:23 Go to next message
jstrellner  is currently offline jstrellner
Messages: 4
Registered: September 2007
Junior Member
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.


Joel Strellner, Owner
UrlTrends, LLC.
Re: 4GB limit on 32 bit os? [message #1809 is a reply to message #1806 ] Thu, 13 September 2007 10:17 Go to previous messageGo to next message
allworknoplay  is currently offline allworknoplay
Messages: 58
Registered: September 2007
Location: New York
Member
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...
Re: 4GB limit on 32 bit os? [message #1810 is a reply to message #1806 ] Thu, 13 September 2007 10:25 Go to previous messageGo to next message
scoundrel  is currently offline scoundrel
Messages: 58
Registered: August 2006
Location: Toronto, ON, Canada
Member

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.


Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: 4GB limit on 32 bit os? [message #1811 is a reply to message #1810 ] Thu, 13 September 2007 10:29 Go to previous messageGo to next message
jstrellner  is currently offline jstrellner
Messages: 4
Registered: September 2007
Junior Member
scoundrel wrote on Thu, 13 September 2007 10:25

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.


Joel Strellner, Owner
UrlTrends, LLC.
Re: 4GB limit on 32 bit os? [message #1814 is a reply to message #1806 ] Thu, 13 September 2007 10:35 Go to previous messageGo to next message
scoundrel  is currently offline scoundrel
Messages: 58
Registered: August 2006
Location: Toronto, ON, Canada
Member

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).


Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: 4GB limit on 32 bit os? [message #1816 is a reply to message #1806 ] Thu, 13 September 2007 10:41 Go to previous messageGo to next message
jstrellner  is currently offline jstrellner
Messages: 4
Registered: September 2007
Junior Member
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.


Joel Strellner, Owner
UrlTrends, LLC.
Re: 4GB limit on 32 bit os? [message #1817 is a reply to message #1816 ] Thu, 13 September 2007 11:27 Go to previous messageGo to next message
scoundrel  is currently offline scoundrel
Messages: 58
Registered: August 2006
Location: Toronto, ON, Canada
Member

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.


Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: 4GB limit on 32 bit os? [message #1818 is a reply to message #1806 ] Thu, 13 September 2007 11:32 Go to previous messageGo to next message
jstrellner  is currently offline jstrellner
Messages: 4
Registered: September 2007
Junior Member
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.


Joel Strellner, Owner
UrlTrends, LLC.
Re: 4GB limit on 32 bit os? [message #1819 is a reply to message #1818 ] Thu, 13 September 2007 13:02 Go to previous message
scoundrel  is currently offline scoundrel
Messages: 58
Registered: August 2006
Location: Toronto, ON, Canada
Member

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.


Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Previous Topic:Performance comparison between mutliple tables and multiple databases
Next Topic:Experience with innodb_flush_method setting
Goto Forum:
  


Current Time: Sun Jul 5 15:16:41 EDT 2009

Total time taken to generate the page: 0.01410 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.