ちょっと調べ物:MySQLとLinuxとthreadとMulti-coreな話

Linux上でCPUの実際のコア数よりも多いスレッドを実行するとMySQLのパフォーマンスが落ちる話だが。2007年の初めに話題になったことなんだけど、現在はどうなのか。
以下、目に付いたページをメモ。

これ以前にも、MySQL 5.0.24と5.0.32でベンチマークをとって問題に気づいていたらしい。5.0.32では、性能の劣化が解消されていたそうだ。(つまりLinuxのバグ避けをしたと考えられる)

MySQL自体の問題というか、Linuxのカーネルにも問題があったという話だ。


特にHyperthreadingに対してのスケジューリングに問題があったらしい。

MySQL5.1は5.0とは別な問題を抱えている(らしい)

MySQL :: MySQL 5.1 リファレンスマニュアル :: 2.13.1.3 Linux バイナリ ディストリビューションの注釈MySQL Database performance

で、重要なのは
innodb_thread_concurrency=0
という設定ができることだ。(mysql5.0.51)

現状FC8あたりまででは上記"MySQL Database performance"によれば、

Initial progress in improving mysql performance on 8 CPU systems was reported here (Feb 2007).
At that time FreeBSD out-performed Linux by a large margin at high loads.
As of Linux 2.6.22 (Fedora 8) they have fixed the most serious scaling problem but they still have 15% lower performance than FreeBSD on this workload.
Linux 2.6.23 incorporated a new "Completely Fair" Scheduler which performs significantly worse than 2.6.22 on this workload. 2.6.24 has not yet been evaluated.

らしい。