MySQL PowerPC optimizations

Home Info Benchmarks Altivec Case Studies Patches

Altivec is a speciality of the PowerPC. Altivec is the 128-bit vector execution unit of certain PowerPC CPUs that operates concurrently with existing integer and floating-point units. This provides for highly parallel operations, allowing for simultaneous execution of up to 16 operations in a single clock cycle.

Many thanks goes to Freescale and Genesi for their professional help on the work and test of performance optimizations for the MySQL database engine based on Altivec.

The performance of MySQL is, in the optimal case, limited by your memory bandwidth. If your database is much bigger than your memory then the performance will be IO bound. Linux current memory functions don't use the potential of many PowerPC CPUs. Using Altivec for memory operation is very simple and will increase memory throughput by up to 75%, speeding up MySQL accordingly.

Adding functional performance improvements of the MySQL server by using Altivec:
Vectorizing of some single functions showed impressive results: 400-800% speed ups where no problem. But the majority of the database engine is very difficult to vectorize.

The conclusion I come to was that by using Altivec for memory operating MySQL can easely speed up a lot. General vectorizing of most MySQL functions is not worth the effort. But if, as in one usage case we had, a certain vectorizebale database function is the bottleneck of the whole site, then adding Altivec support can result in impressive total performance increases. We had a 400% total server performance increase for one site.