| 4GB limit on 32 bit os? [message #1806] |
Wed, 12 September 2007 20:23  |
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 #1810 is a reply to message #1806 ] |
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.
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   |
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   |
|
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   |
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   |
|
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   |
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  |
|
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
|
|
|