Miracle Linux Corporation, 2006-03-31
The dual-core Intel Xeon and AMD Opteron CPU architectures for MySQL servers had not been tested with the OSS-DB development board WG. Using a machine with these CPU architectures incorporated, we measured the performance of the MySQL database server to analyze and investigate the characteristics of each CPU architecture.
This document treats the measurement results for dual-core Intel Xeon.
To conduct measurement, we operated both the target MySQL server and measurement tool DBT-1 on the same machine.
The machine used consisted of the following hardware:
The OS and MySQL were 64-bit (x86-64). DBT-1 was 32-bit (IA32) because MySQL Connector/ODBC was not 64-bit.
We built an environment which complied with "OSS performance/Reliability Evaluation/Troubleshooting Tool Development" DB Layer – DBMS Evaluation Using OSDL DBT-1/3 for the First Half of the 2005 Fiscal Year." All the other environments were used as default.
We set the MySQL server (mysqld) parameters as shown below. The default for innodb_thread_concurrency changed from 8 to 20 for MySQL 5.0.8 and later versions released after the first half of 2005. Thus, we added parameters for matching the necessary conditions.
The following three CPU configurations were used for measurement:
We set the parameters, turned after the fist half of 2005, in the MySQL server. Then, we measured the performance by changing EU.

All these measurement results were similar to those for the SMP machine with the single-core Intel Xeon incorporated.
The peak performance of the 1-core and 2-core CPUs increased about 150%. This increase is smaller than the 168% increase which was achieved by changing the single-core Xeon configuration from UP to SMP in the first half of 2005. But, this increase is similar to the value which was measured in the second half of 2005.
The performance was uninfluenced by whether Hyper-Threading (HT) was on or off. It is similar to the performance which was measured in the first half of 2005. The peak performance measured with HT off was 1% higher than that measured with HT on. However, as EU increased, the difference between the performance values became smaller. This was unexpected because we thought the MySQL server for running multiple threads would be suitable for HT.



These measurement results are similar to those for single-core Xeon UP/SMP. As EU increased, the CPU utilization rate for the 1-core CPU moved toward 100%. On the other hand, the maximum CPU utilization rate for the 2-core CPU was about 95%. The maximum value measured with HT on was closer to 95% than that measured with HT off.
The CPU utilization rate measured with HT on was a little smaller than that measured with HT off as long as these rates were below their maximum values.



When the performance (BT/s) began to decrease for certain EU, the response time measured with HT on was longer than that measured with HT off. The difference in response time became greater with an increase in EU.
There seemed to be a bottleneck specific to dual-core Xeon, not single-core Xeon SMP. Dual-core Xeon differs on whether the cores share the L2 cache or have independent L2 caches, whether cache coherency control is provided by the inside of the CPU or via external buses or chip sets and whether the CPU shares the interface with the front side bus (FSB) or has its own interface. The differences in the peripherals might cause a performance difference between the dual-core CPU and CPU arranged in SMP configuration even though they are identical in core performance. There was a high potential for the CPU configurations to affect the performance because there were not significant differences in CPU utilization rate and I/O load.
The following shows a block diagram of dual-core Xeon 2.8 GHz in DELL PowerEedge 1850 used for our measurement.

I/F: Interface, MCH: Memory Controller Hub, FSB: Front Side Bus
The CPU utilization rate was low for the problem EU range. This means that the MySQL server did not leverage the HT characteristics.
We could see various characteristics by this measurement. But, the causes of the characteristics are unknown. In the future, we will identify these causes. For further detailed analysis, we will select a dual-core Xeon CPU and Xeon SMP CPU. These CPUs, together with their peripherals, will be as similar to each other as possible. To compare these CPUs, we will use DBT-1 and a tool for further detailed analysis such as OProfile.
We measured DBT-1 by adding parameters and changing the existing parameters. These parameters are those tuned after the first half of 2005, including the typical tuning parameters as well as parameters which were likely to produce different effects depending on the CPU architecture.
EU used was 190000 for which the BT/s value below the theoretical value was close to the peak performance.
Note that we did not conduct measurement with the 1-core CPU. We measured data when HT was on and off for the 2-core CPU.

Only the parameters that affected the performance are shown above. The parameters which enhanced the performance are highlighted.
The meanings of the parameters are as follows (quotation from the English version of the MySQL 5.0 online manual).
If the maximum number of threads for InnoDB is set to infinite (innodb_thread_concurrency = 20), the thread count check and threads do not enter the InnoDB queue. Thus, the innodb_concurrency_tickets and innotdb_thread_sleep_delay parameters should be ineffective. But, their ineffectiveness has not been confirmed.
The parameters below did not influence the measurement results. They are not detailed here. If necessary, refer to the performance data on the individual parameters.
We could gain a 5% to 10% increase in performance by tuning the values. However, the CPU utilization rate decreased. Thus, the performance can be further enhanced by adjusting other parameters.
When HT was off, the absolute value and increase rate of performance tended to become higher. This means that the CPUs were not suitable for HT.
When HT was off, we could gain an approximately 10% increase in performance by setting the maximum number of threads to infinite.However, the CPU utilization rate decreased. Thus, the performance can be further enhanced by adjusting other parameters.
When HT was on, the performance significantly degraded. For information about the analysis and consideration when HT was on, refer to the results (FIXME: Link) of measurement and analysis with OProfile.
This performance measurement focused on each single parameter. A combination of several parameters is expected to further enhance the performance. When parameters are combined, they might affect each other to increase or decrease the performance. Thus, we should understand the effect of each parameter and then combine the parameters for more sophisticated tuning.
HT was almost ineffective. It might be utterly useless for processing with some parameters. This problem is very serious. Version 8.1 of PostgreSQL is another excellent OSS DB. It offers significantly increased performance and makes HT more effective, thereby destroying the assumption that MySQL performs better than PostgreSQL. We will have to seriously address the problem above and solve it so MySQL and PostgreSQL can evolve while competing with each other.