Friday, May 30, 2008

Limitations of MySQL on 32-bit OS -- RedHat Linux Enterprise

Most developers will never run into this situation. But if you're running a Linux server RHE 32-bit OS and have a large MySQL database, watch out!

It took a few days of crashing this database with a table that has over 14GB of data.

The index on that table had grown over 2GB and was causing MySQL server to page the data (writing temp data to the hard drive instead of RAM). Disk I/O is thousands of times slower than RAM, and being over the MySQL limit on the 32-bit OS was just a recipe for disaster.

Oh, and also, at first the techs determined that our MySQL temp directory was full... so that was another major crash.

The solution included:
- upgrade the OS to 64-bit RHE
- change the storage engine to InnoDB
- get bigger drives
- set up the drives in a RAID 10 configuration
- optimize the various indexes that are used in JOIN statements...
- make sure the temp directory partition will have plenty of room

Of course that's just the beginning -- in the right direction.

-j

Labels: , , ,


0 Comments:

Post a Comment

<< Home