AIX designed I/O for performance
Estimating I/O demand is a tricky but necessary that you must consider when building any complex database.
How well you manage the demand for disk I/O across several disk storage devices and controllers can have a dramatic effect on how fast the database can.
Also, how you divide a limited amount of storage between indexes and data among tablespaces?. Yes, for enough budget it is easier for spliting storage indexes and data tablespaces.
For greater performance in AIX, you should use a striped configuration for large workload transactional MySQL database configurations. Easy way, the AIX OS uses its Logical Volume Manager (LVM) to handle the configuration setup.
Striping involves chopping data into logical chunks (the size is configured through LVM).
These chunks are then written to separate physical volumes in parallel in a round-robin fashion until all the data is written to disk.
Conversely, in the read phase these chunks are read from those physical volumes similarly.
Striping maximizes I/O performance by mapping data evenly across the number of physical volumes as known as “striped width”.
Striping provides maximum throughput of data across physical volumes compared with the traditional read/write access on one volume.
To create a striped logical volume, you must use the -S option of the mklv command or run “smit mklv”.
Ensure that you edit the option for “striped size” with your desired value (256K, 128K, 64K, 32K, 16K, 8K, and 4K size), and create filesystem on that logical volume later.
Install XL C/C++ for AIX
Why is use XL C/C++
Because the xlC_r is used during install the MySQL from source instead of the gcc library (prefer).
From features and benefits page, New XL C and XL C++ built-in functions for atomic memory access, whose behavior corresponds to that provided by GNU Compiler Collection (GCC). In a program with multiple threads, users can use these functions to atomically and safely modify data in one thread without interference from another thread.
System Requirements
Version | AIX Version | Architecture |
XL C/C++ for AIX, V12.1 | AIX 5.3 TL 5300-07 (or later), AIX 6.1, or AIX 7.1, or IBM PASE for i 6.1 (with PTF SI30636 or later), or IBM PASE for i 7.1 | IBM Power Architecture / 500 MB disk space |
XL C/C++ for AIX, V11.1 | AIX 5.3 TL 5300-07 (or later), AIX 6.1, AIX 7.1, or IBM PASE for i 6.1 (with PTF SI30636 or later), IBM PASE for i 7.1 | IBM Power Architecture / 500 MB disk space |
XL C/C++ for AIX, V10.1 | AIX 5.3 TL 5300-06 (or higher), AIX 6.1, or IBM i V6.1 PASE | IBM Power Architecture / 500 MB disk space |
Download link
For AIX 5.3 TL6 and MySQL5.1.66, I get the XL C/C++ for AIX, V10.1 → vacpp.10.1.0.0.aix.eval.tar.gz
http://www-01.ibm.com/software/awdtools/xlcpp/aix/
Install Package
Easy way to used smit tool for install the new package.
1 2 3 4 |
dev[/]# cd vacpp.10.1.0.0.aix.eval/runtime dev[/]# smit install |
Then choose Install and Update Software → Install Software → INPUT device / directory for software
Enter “.” which mean current directory (vacpp.10.1.0.0.aix.eval/runtime)
Install MySQL from Source
Brief History
In mid-1995, Michael “Monty” Widenius and David Axmark developed MySQL for internal use.
Once, they needed a lightweight solution that gave them access to their information over the Internet.
No viable solution was available then. When completing their project, they realized its value and released it to the open source community in hopes that would benefit. Consequently, in 1998 when the Internet really took off and when web developers needed access to their data, MySQL was there.
System Requirements
Operating System | AIX ® 5.2 or higher |
Compiler | XL C/C++ (xlc_r, xlC_r) or latest GNU compiler (gcc) |
MySQL | MySQL 4.0.21 and higher |
Make | GNU Make (make) |
Get MySQL Source
MySQL Community Server is a freely downloadable version of the world’s most popular open source database that is supported by an active community of open source developers and enthusiasts.
Get the MySQL Community Server 5.1.66 (GA*) – Source Code Platform
Download http://www.mysql.com/downloads/mysql/5.1.html#downloads
*GA – Generally Available
Install MySQL Source
Use IBM compiler
Below is a number of variables need to be set before running configure.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
dev[/]# export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192" dev[/]# export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192" dev[/]# export CFLAGS="-I /usr/local/include" dev[/]# export LDFLAGS="-L /usr/local/lib" dev[/]# export CPPFLAGS=$CFLAGS dev[/]# export CXXFLAGS=$CFLAGS dev[/]# ./configure --prefix=/usr/local \ --localstatedir=/var/mysql \ --sbindir='/usr/local/bin' \ --libexecdir='/usr/local/bin' \ --enable-thread-safe-client \ --enable-large-files dev[/]# make dev[/]# make install |
option -qmaxmem=8192, you can adjust 8192 MB by a half of your total memory size.
Use GNU C Compiler
If you compile MySQL with gcc, you must use the -fno-exceptions flag because the exception handling in gcc is not thread-safe.
Or if you have problems with signals (MySQL dies unexpectedly under high load), you may have found an OS bug with threads and signals. In this case, you can tell MySQL not to use signals by configuring as follows:
1 2 3 4 5 6 7 8 |
dev[/]# CFLAGS=-DDONT_USE_THR_ALARM CXX=gcc \ dev[/]# CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti \ -DDONT_USE_THR_ALARM" \ dev[/]# ./configure --prefix=/usr/local/mysql --with-debug --with-low-memory dev[/]# make dev[/]# make install |
Read more information Notes on Installing MySQL on AIX from Source. (update Dec 15,2017 – Page Not Found)