「ports/125616: Add --with-fast-mutexes to databases/mysql51-server」這個 PR 中所提到的 --with-fast-mutex
在 ale@ commit 後,他也順便問是否有變快 (或是變慢)。我回了他一封信,MyISAM 在十個 clients 的模擬測試下有快一些,大約 6%。
不過這是 Super Smack 測試的結果,如果沒有其他比較好的工具,拿來當參考還可以,把結果當作事實就有點偏頗了。我打算複製一份 real data 到其他空機器上,再測試一次看看。
下面這是 Super Smack 測試的結果,最後面的單位是 qps,愈高愈好。
(without fast mutexes) $ repeat 10 super-smack -D/tmp \ /usr/local/share/super-smack/select-key.smack \ 10 2000 | grep ... select_index 40000 0 0 56503.40 select_index 40000 0 0 55638.24 select_index 40000 0 0 55750.29 select_index 40000 0 0 56229.37 select_index 40000 0 0 55770.81 select_index 40000 0 0 56083.44 select_index 40000 0 0 56411.05 select_index 40000 1 0 55156.36 select_index 40000 0 0 56268.21 select_index 40000 0 0 55059.18 (with fast mutexes) $ repeat 10 super-smack -D/tmp \ /usr/local/share/super-smack/select-key.smack \ 10 2000 | grep ... select_index 40000 0 0 59652.25 select_index 40000 0 0 58040.66 select_index 40000 0 0 57937.60 select_index 40000 0 0 58511.95 select_index 40000 0 0 57319.65 select_index 40000 0 0 58308.02 select_index 40000 0 0 58514.35 select_index 40000 0 0 58493.64 select_index 40000 0 0 57937.01 select_index 40000 0 0 59348.24 The first one is 55887 qps (avg), the second one is 58406.3 qps.