• MySQL知识库 :: performance
  • What limitations are there when running MySQL on 32-bit operating system on 32-bit hardware?

  • Discussion

    If you're using 32bit hardware or running 32bit MySQL version on 64bit hardware, there are a number of limitations, which mostly come from operation system limitations:

    • An operation system limits address-space that a single process can use to 2 to 4gb. MySQL Server is a single process, having multiple threads so this is amount of memory it can use. If MySQL Server runs out of memory, it will print an Out of Memory error message in the error log or simply crash. In this case, decrease the amount of memory the MySQL server uses. On Unix, the ps or the top utility may be used to monitor the amount of address-space used. It is safe to keep it at 300-500mb below your address-space limit due to address-space fragmentation.
    • On some operating systems you will be able to use the remaining memory as file cache. This is less efficient than an internal database cache, but it is still much faster than disk IO. In some hardware-OS combinations, however, IO performance may be significantly lower if IO is performed in high memory (above 4gb), in some cases to extend it negates the benefit of a large cache. If you're experiencing unexpectedly low IO performance with your 32bit system and large amounts of memory, you might want to try limiting the available memory to 4gb and see if the problem persists. If it does, you might need to update your IO sub-system driver or replace the hardware to one which supports high memory IO.

    Best Practice

    In general at this point we only recommend to use 32bit platforms with light loads which do not require excessive memory amounts or if you have existing hardware. If you're planning to purchase new hardware consider using 64bit platforms instead.