MySQL, AIX5L and malloc()

PREVIOUS POST
NEXT POST

Some time ago I get brand new IBM POWER6 server as the replacement for “old” P5 used to host Oracle database. Because we planed to use advanced virtualization with VIOS + LPAR/DLPAR I conceived the idea to use one spare partition for MySQL tests. Because I had no past experience with it and there is not much documentation all around the web, I tried to set-up system and database traditional way. The first problem I hit was memory allocation and I think it is the best place share my remarks. Let’s start from the beginning..

For any reason, you decided to run MySQL database on AIX 5L operating system. You compiled it successfully, configured and.. unluckily database didn’t start due to memory allocation problem?

Basically, for some historical reasons AIX OS will allow your application to allocate maximum 256MB of memory per process by default. To use more, you have to use “Large Address Space” memory model so AIX will split memory into 256MB data segments, making possible to reserve more than one segment per single process.

You may set it up different ways:

  • – using –bmaxdata=0xN000000 option for linker
  • – setting MAXDATA value in LDR_CNTRL as run-time

[ LDR_CNTRL=’MAXDATA=0xN000000′ ] – where N is the number of segments.

So, to make your MySQL working fine:

export LDR_CNTRL=’MAXDATA=0×80000000′

It allows database to allocate 2GB of memory ( 8*256MB ) which is maximum value for 32-bit compiled applications.

But how to deal with 64-bit systems? It’s quite easy, but you have to remember about setting OBJECT_MODE to 64 for both, self-compiled and binary distributed databases. After it, you will be able to set up bigger segments multiplier in MAXDATA variable at run-time.

export LDR_CNTRL=’MAXDATA=0xFFFFFFFFFFFFFFFFFF’

PREVIOUS POST
NEXT POST

Comments

  1. Erkan says

    Great! Thx, would you recommend using AIX for MySQL?
    I used AIX in the “old” days. Now we are using Linux and SolarisZones.

  2. Ender says

    I’ve used mysql server 4.1 (4.1.17? binary from mysql.com) on 2 servers with AIX 5.3 (master/replica).
    It used 64 GB of ram without any problem. There was some problems with configuration (aix/mysql) for best performance.
    It worked fine.

  3. facundo says

    hi, i’ve been asking about this setup all around with almost no answer..even in mysqlperformanceblog.com forums..

    did you get any performance numbers?. how did this setup perform against intel platform?.

    which compiler did you use to compile mysql on aix?

    anyone has this kind of info?.

  4. Piotr Biel says

    facundo,

    I did some performance tests, but I have no representative results. For sure, I’d like to perform wide tests in close future (of course I’ll share my results here).

    Regarding to compiler used – MySQL binaries are standard, GCC ones and I used them to tests, but at the same time I compiled it from sources with xlC. I think it will be great idea to check for performance of gcc vs. xlC compiled MySQL..

  5. Piotr Biel says

    Erkan,

    As far as I did not test it well in production, I’d rather use Linux or Solaris. It simply decreases probability of hitting potential, undiscovered bugs. There is also not so much info about MySQL + AIX performance. In case of any problems you’ll spend a lot of time looking for solutions or just workarounds, which might not be acceptable while running MySQL in production environment.

  6. facundo says

    Piotr,
    thanks a lot for sharing this with us. Im expecting to use this kind of setups in production some day..

    on gcc vs xlC.. my guess is that xlC version of mysql should be fast by far.

    another test is Linux on Power6 and mysql vs AIX and mysql.

    which version of aix are you using?. any chance to know how are this power6 machine configured?.

    Thanks,
    Facundo.-

  7. facundo says

    Peter,
    i work almost mostly with informix and db2 on aix but i think that this params apply to mysql too (with different results depending the storage engine)

  8. SAM says

    Let me give you a little advice for running mysql on aix5.3(powerCPU)

    After a migration from SLES9 (Intel Xeon) to AIX 5.3 (Power6) we run into severe performance problems with MySQL 5.0. (64bit)

    MySQL and IBM Support were involved to analyze, optimize and resolve the troubleticket.

    After recommendation from IBM we have changed vmo parameters and the ratio between real cpu´s and virtual cpu´s. Mysql supplied many new compiled (Xlc + gcc) mysql 5.0.x versions.

    Even though all manufacturer worked together our problems couldn´t be fixed until now.

    Maybe there is an incompatibility between Power6 CPUs and Mysql!?!?!?

    Hope this helps for your decision.

    SAM

  9. Erkan says

    Great,

    you make me post some experiences with solaris on M4000 and T5220.
    To make it short: MySQL performs on Linux on DL 380/285/580/585 much better:-)

Leave a Reply

Your email address will not be published. Required fields are marked *